<commit_before>---
title: BatchNode
description: BatchNode handles creating several child QueryNodes. Each call to `query` creates a child batch node that can further be configured. The `batch` variable in batch tasks is an instance of BatchNode.
note: Auto generated by tickdoc

menu:
  kapacitor_1_5:
    name: BatchNode
    identifier: batch_node
    weight: 4
    parent: nodes
---

The `batch` node handles the creation of several child QueryNodes.
Each call to [`query`](/kapacitor/v1.5/nodes/query_node) creates a child batch node that
can further be configured. *See [QueryNode](/kapacitor/v1.5/nodes/query\node/)*.
The `batch` variable in batch tasks is an instance of
a [BatchNode.](/kapacitor/v1.5/nodes/batch_node/)

> A **QueryNode** is required when using **BatchNode**.
> It defines the source and schedule for batch data and should be used before
> any other [chaining methods](#chaining-methods-1).

Example:


```js
  var errors = batch
                  |query('SELECT value from errors')
                  ...
  var views = batch
                  |query('SELECT value from views')
                  ...
```

Available Statistics:
<commit_msg>updated broken link in batch node doc<commit_after>---
title: BatchNode
description: BatchNode handles creating several child QueryNodes. Each call to `query` creates a child batch node that can further be configured. The `batch` variable in batch tasks is an instance of BatchNode.
note: Auto generated by tickdoc

menu:
  kapacitor_1_5:
    name: BatchNode
    identifier: batch_node
    weight: 4
    parent: nodes
---

The `batch` node handles the creation of several child QueryNodes.
Each call to [`query`](/kapacitor/v1.5/nodes/query_node) creates a child batch node that
can further be configured. *See [QueryNode](/kapacitor/v1.5/nodes/query_node/)*.
The `batch` variable in batch tasks is an instance of
a [BatchNode.](/kapacitor/v1.5/nodes/batch_node/)

> A **QueryNode** is required when using **BatchNode**.
> It defines the source and schedule for batch data and should be used before
> any other [chaining methods](#chaining-methods-1).

Example:


```js
  var errors = batch
                  |query('SELECT value from errors')
                  ...
  var views = batch
                  |query('SELECT value from views')
                  ...
```

Available Statistics:

{'fraction_non_alphanumeric': 0.09574468085106383, 'fraction_numerical': 0.00851063829787234, 'mean_word_length': 3.124561403508772, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3858475', 'n_tokens_mistral': 669, 'n_tokens_neox': 650, 'n_words': 268}