diff --git a/docs/README.md b/docs/README.md index 765b6c1544..df49924781 100644 --- a/docs/README.md +++ b/docs/README.md @@ -45,7 +45,7 @@ same abstract Zed data model. * A [Zed lake](commands/zed.md) is a collection of Zed data stored across one or more [data pools](commands/zed.md#data-pools) with ACID commit semantics and accessed via a [Git](https://git-scm.com/)-like API. -* The [Zed language](language/README.md) is the system's dataflow language for performing +* The [Zed language](language/README.md) is the system's pipeline language for performing queries, searches, analytics, transformations, or any of the above combined together. * A [Zed query](language/overview.md) is a Zed script that performs search and/or analytics. diff --git a/docs/commands/zed.md b/docs/commands/zed.md index a49fc83b2d..af3159c432 100644 --- a/docs/commands/zed.md +++ b/docs/commands/zed.md @@ -263,7 +263,7 @@ As pool data is often comprised of Zed records (analogous to JSON objects), the pool key is typically a field of the stored records. When pool data is not structured as records/objects (e.g., scalar or arrays or other non-record types), then the pool key would typically be configured -as the [special value `this`](../language/dataflow-model.md#the-special-value-this). +as the [special value `this`](../language/pipeline-model.md#the-special-value-this). Data can be efficiently scanned if a query has a filter operating on the pool key. For example, on a pool with pool key `ts`, the query `ts == 100` @@ -396,7 +396,7 @@ The `-orderby` option indicates the pool key that is used to sort the data in lake, which may be in ascending or descending order. If a pool key is not specified, then it defaults to -the [special value `this`](../language/dataflow-model.md#the-special-value-this). +the [special value `this`](../language/pipeline-model.md#the-special-value-this). A newly created pool is initialized with a branch called `main`. diff --git a/docs/commands/zq.md b/docs/commands/zq.md index 13a45f6cd9..ce064f8e11 100644 --- a/docs/commands/zq.md +++ b/docs/commands/zq.md @@ -85,7 +85,7 @@ emits ```mdtest-output 2 ``` -Note here that the query `1+1` [implies](../language/dataflow-model.md#implied-operators) +Note here that the query `1+1` [implies](../language/pipeline-model.md#implied-operators) `yield 1+1`. ## Input Formats @@ -478,7 +478,7 @@ If you are ever stumped about how the `zq` compiler is parsing your query, you can always run `zq -C` to compile and display your query in canonical form without running it. This can be especially handy when you are learning the language and -[its shortcuts](../language/dataflow-model.md#implied-operators). +[its shortcuts](../language/pipeline-model.md#implied-operators). For example, this query ```mdtest-command diff --git a/docs/language/README.md b/docs/language/README.md index 39ff6268a2..2bcd9ab64d 100644 --- a/docs/language/README.md +++ b/docs/language/README.md @@ -2,7 +2,7 @@ The language documents: * provide an [overview](overview.md) of the Zed language, -* describe Zed's [dataflow model](dataflow-model.md), +* describe Zed's [pipeline model](pipeline-model.md), * explain Zed's [data types](data-types.md), * show the syntax of [statements](statements.md) that define constants, functions, operators, and named types, * describe the syntax of [expressions](expressions.md) and [search expressions](search-expressions.md), diff --git a/docs/language/expressions.md b/docs/language/expressions.md index 3391b295ff..654f5c3546 100644 --- a/docs/language/expressions.md +++ b/docs/language/expressions.md @@ -6,9 +6,9 @@ sidebar_label: Expressions # Expressions Zed expressions follow the typical patterns in programming languages. -Expressions are typically used within data flow operators +Expressions are typically used within pipeline operators to perform computations on input values and are typically evaluated once per each -input value [`this`](dataflow-model.md#the-special-value-this). +input value [`this`](pipeline-model.md#the-special-value-this). For example, `yield`, `where`, `cut`, `put`, `sort` and so forth all take various expressions as part of their operation. @@ -109,7 +109,7 @@ where `` is an identifier representing the field name referenced. If a field name is not representable as an identifier, then [indexing](#indexing) may be used with a quoted string to represent any valid field name. Such field names can be accessed using -[`this`](dataflow-model.md#the-special-value-this) and an array-style reference, e.g., +[`this`](pipeline-model.md#the-special-value-this) and an array-style reference, e.g., `this["field with spaces"]`. If the dot operator is applied to a value that is not a record @@ -353,7 +353,7 @@ where a `` has one of three forms: ``` The first form is a customary colon-separated field and value similar to JavaScript, where `` may be an identifier or quoted string. -The second form is an [implied field reference](dataflow-model.md#implied-field-references) +The second form is an [implied field reference](pipeline-model.md#implied-field-references) ``, which is shorthand for `:`. The third form is the `...` spread operator which expects a record value as the result of `` and inserts all of the fields from the resulting record. diff --git a/docs/language/lateral-subqueries.md b/docs/language/lateral-subqueries.md index 7a03fe1a6c..d3a807c9f1 100644 --- a/docs/language/lateral-subqueries.md +++ b/docs/language/lateral-subqueries.md @@ -7,7 +7,7 @@ sidebar_label: Lateral Subqueries Lateral subqueries provide a powerful means to apply a Zed query to each subsequence of values generated from an outer sequence of values. -The inner query may be _any_ dataflow operator sequence (excluding +The inner query may be _any_ pipeline operator sequence (excluding [`from` operators](operators/from.md)) and may refer to values from the outer sequence. @@ -91,7 +91,7 @@ In the field reference form, a single identifier `` refers to a field in the parent scope and makes that field's value available in the lateral scope via the same name. -Note that any such variable definitions override [implied field references](dataflow-model.md#implied-field-references) of +Note that any such variable definitions override [implied field references](pipeline-model.md#implied-field-references) of `this`. If a both a field named `x` and a variable named `x` need be referenced in the lateral scope, the field reference should be qualified as `this.x` while the variable is referenced simply as `x`. @@ -102,7 +102,7 @@ the value `this` refers to the inner sequence generated from the `over` expressi This query runs to completion for each inner sequence and emits each subquery result as each inner sequence traversal completes. -This structure is powerful because _any_ dataflow operator sequence (excluding +This structure is powerful because _any_ pipeline operator sequence (excluding [`from` operators](operators/from.md)) can appear in the body of the lateral scope. In contrast to the [`yield`](operators/yield.md) example above, a [`sort`](operators/sort.md) could be applied to each subsequence in the subquery, where `sort` @@ -128,13 +128,13 @@ parenthesized form: ``` :::tip -The parentheses disambiguate a lateral expression from a [lateral dataflow operator](operators/over.md). +The parentheses disambiguate a lateral expression from a [lateral pipeline operator](operators/over.md). ::: This form must always include a [lateral scope](#lateral-scope) as indicated by ``. The lateral expression is evaluated by evaluating each `` and feeding -the results as inputs to the `` dataflow operators. Each time the +the results as inputs to the `` pipeline. Each time the lateral expression is evaluated, the lateral operators are run to completion, e.g., ```mdtest-command @@ -162,7 +162,7 @@ produces {sorted:[1,2,3],sum:6} ``` Because Zed expressions evaluate to a single result, if multiple values remain -at the conclusion of the lateral dataflow, they are automatically wrapped in +at the conclusion of the lateral pipeline, they are automatically wrapped in an array, e.g., ```mdtest-command echo '{x:1} {x:[2]} {x:[3,4]}' | @@ -174,7 +174,7 @@ produces {s:3} {s:[4,5]} ``` -To handle such dynamic input data, you can ensure your downstream dataflow +To handle such dynamic input data, you can ensure your downstream pipeline always receives consistently packaged values by explicitly wrapping the result of the lateral scope, e.g., ```mdtest-command diff --git a/docs/language/operators/README.md b/docs/language/operators/README.md index 332f4f1e5b..51276d4fa9 100644 --- a/docs/language/operators/README.md +++ b/docs/language/operators/README.md @@ -2,25 +2,25 @@ --- -Dataflow operators process a sequence of input values to create an output sequence -and appear as the components of a dataflow pipeline. In addition to the built-in +Operators process a sequence of input values to create an output sequence +and appear as the components of a [pipeline](../pipeline-model.md). In addition to the built-in operators listed below, Zed also allows for the creation of [user-defined operators](../statements.md#operator-statements). * [assert](assert.md) - evaluate an assertion -* [combine](combine.md) - combine parallel paths into a single output +* [combine](combine.md) - combine parallel pipeline branches into a single output * [cut](cut.md) - extract subsets of record fields into new records * [debug](debug.md) - write intermediate values to stderr * [drop](drop.md) - drop fields from record values * [file](from.md) - source data from a file -* [fork](fork.md) - copy values to parallel paths +* [fork](fork.md) - copy values to parallel pipeline branches * [from](from.md) - source data from pools, files, or URIs * [fuse](fuse.md) - coerce all input values into a merged type * [get](from.md) - source data from a URI * [head](head.md) - copy leading values of input sequence * [join](join.md) - combine data from two inputs using a join predicate * [load](load.md) - add and commit data to a pool -* [merge](merge.md) - combine parallel paths into a single, ordered output +* [merge](merge.md) - combine parallel pipeline branches into a single, ordered output * [over](over.md) - traverse nested values as a lateral query * [pass](pass.md) - copy input values to output * [put](put.md) - add or modify fields of records diff --git a/docs/language/operators/combine.md b/docs/language/operators/combine.md index 67a384616d..9a5db1192c 100644 --- a/docs/language/operators/combine.md +++ b/docs/language/operators/combine.md @@ -1,6 +1,6 @@ ### Operator -  **combine** — combine parallel paths into a single output +  **combine** — combine parallel pipeline branches into a single output ### Synopsis @@ -9,8 +9,8 @@ ``` ### Description -The implied `combine` operator merges inputs from multiple upstream legs of -the dataflow path into a single output. The order of values in the combined +The implied `combine` operator merges inputs from multiple upstream branches of +the pipeline into a single output. The order of values in the combined output is undefined. You need not explicit reference the operator with any text. Instead, the @@ -19,7 +19,7 @@ and its semantics of undefined merge order. ### Examples -_Copy input to two paths and combine with the implied operator_ +_Copy input to two pipeline branches and combine with the implied operator_ ```mdtest-command echo '1 2' | zq -z 'fork (=>pass =>pass) | sort this' - ``` diff --git a/docs/language/operators/cut.md b/docs/language/operators/cut.md index 6c26badbb5..9a22b7d3f6 100644 --- a/docs/language/operators/cut.md +++ b/docs/language/operators/cut.md @@ -10,7 +10,7 @@ cut [:=] [, [:=] ...] ### Description The `cut` operator extracts values from each input record in the -form of one or more [field assignments](../dataflow-model.md#field-assignments), +form of one or more [field assignments](../pipeline-model.md#field-assignments), creating one field for each expression. Unlike the `put` operator, which adds or modifies the fields of a record, `cut` retains only the fields enumerated, much like a SQL projection. diff --git a/docs/language/operators/fork.md b/docs/language/operators/fork.md index d802539e2c..aa2dc300af 100644 --- a/docs/language/operators/fork.md +++ b/docs/language/operators/fork.md @@ -1,28 +1,28 @@ ### Operator -  **fork** — copy values to parallel paths +  **fork** — copy values to parallel pipeline branches ### Synopsis ``` fork ( - => - => + => + => ... ) ``` ### Description -The `fork` operator copies each input value to multiple, parallel legs of -the dataflow path. +The `fork` operator copies each input value to multiple, parallel branches of +the pipeline. -The output of a fork consists of multiple legs that must be merged. -If the downstream operator expects a single input, then the output legs are +The output of a fork consists of multiple branches that must be merged. +If the downstream operator expects a single input, then the output branches are merged with an automatically inserted [combine operator](combine.md). ### Examples -_Copy input to two paths and merge_ +_Copy input to two pipeline branches and merge_ ```mdtest-command echo '1 2' | zq -z 'fork (=>pass =>pass) | sort this' - ``` diff --git a/docs/language/operators/from.md b/docs/language/operators/from.md index 7ae53dcc70..ffcc5d404b 100644 --- a/docs/language/operators/from.md +++ b/docs/language/operators/from.md @@ -10,10 +10,10 @@ from file [format ] get [format ] from ( - pool [@] [ => ] + pool [@] [ => ] pool - file [format ] [ => ] - get [format ] [ => ] + file [format ] [ => ] + get [format ] [ => ] pass ... ) @@ -26,7 +26,7 @@ their data to its output. A data source can be * the names of multiple data pools, expressed as a [regular expression](../search-expressions.md#regular-expressions) or [glob](../search-expressions.md#globs) pattern; * a path to a file; * an HTTP, HTTPS, or S3 URI; or -* the [`pass` operator](pass.md), to treat the upstream data path as a source. +* the [`pass` operator](pass.md), to treat the upstream pipeline branch as a source. :::tip Note File paths and URIs may be followed by an optional [format](../../commands/zq.md#input-formats) specifier. @@ -45,7 +45,7 @@ In the first four forms, a single source is connected to a single output. In the fifth form, multiple sources are accessed in parallel and may be [joined](join.md), [combined](combine.md), or [merged](merge.md). -A data path can be split with the [`fork` operator](fork.md) as in +A pipeline can be split with the [`fork` operator](fork.md) as in ``` from PoolOne | fork ( => op1 | op2 | ... @@ -61,7 +61,7 @@ from ( ) | join on key=key | ... ``` -Similarly, data can be routed to different paths with replication +Similarly, data can be routed to different pipeline branches with replication using the [`switch` operator](switch.md): ``` from ... | switch color ( diff --git a/docs/language/operators/merge.md b/docs/language/operators/merge.md index 2603c7d869..cddb2aa381 100644 --- a/docs/language/operators/merge.md +++ b/docs/language/operators/merge.md @@ -1,6 +1,6 @@ ### Operator -  **merge** — combine parallel paths into a single, ordered output +  **merge** — combine parallel pipeline branches into a single, ordered output ### Synopsis @@ -9,14 +9,14 @@ ``` ### Description -The `merge` operator merges inputs from multiple upstream legs of -the dataflow path into a single output. The order of values in the combined +The `merge` operator merges inputs from multiple upstream branches of +the pipeline into a single output. The order of values in the combined output is determined by the `` arguments, which act as sort expressions -where the values from the upstream paths are forwarded based on these expressions. +where the values from the upstream pipeline branches are forwarded based on these expressions. ### Examples -_Copy input to two paths and combine_ +_Copy input to two pipeline branches and merge_ ```mdtest-command echo '1 2' | zq -z 'fork (=>pass =>pass) | merge this' - ``` diff --git a/docs/language/operators/over.md b/docs/language/operators/over.md index 1793b6804e..2c9f0b039a 100644 --- a/docs/language/operators/over.md +++ b/docs/language/operators/over.md @@ -13,7 +13,7 @@ of derived values (e.g., the elements of an array) and either (in the first form) sends the new values directly to its output or (in the second form) sends the values to a scoped computation as indicated by ``, which may represent any Zed [subquery](../lateral-subqueries.md) operating on the -derived sequence of values as [`this`](../dataflow-model.md#the-special-value-this). +derived sequence of values as [`this`](../pipeline-model.md#the-special-value-this). Each expression `` is evaluated in left-to-right order and derived sequences are generated from each such result depending on its types: diff --git a/docs/language/operators/pass.md b/docs/language/operators/pass.md index 336cbe2b2d..43c2b1f756 100644 --- a/docs/language/operators/pass.md +++ b/docs/language/operators/pass.md @@ -10,7 +10,7 @@ pass ### Description The `pass` operator outputs a copy of each input value. It is typically used -with operators that handle multiple legs of the dataflow path such as +with operators that handle multiple branches of the pipeline such as [`fork`](fork.md) and [`join`](join.md). ### Examples @@ -26,7 +26,7 @@ echo '1 2 3' | zq -z pass - 3 ``` -_Copy each input value to three parallel legs and leave the values unmodified on one of them_ +_Copy each input value to three parallel pipeline branches and leave the values unmodified on one of them_ ```mdtest-command echo '"HeLlo, WoRlD!"' | zq -z ' fork ( diff --git a/docs/language/operators/put.md b/docs/language/operators/put.md index 7cf174ef3c..09289fed25 100644 --- a/docs/language/operators/put.md +++ b/docs/language/operators/put.md @@ -9,7 +9,7 @@ ### Description The `put` operator modifies its input with -one or more [field assignments](../dataflow-model.md#field-assignments). +one or more [field assignments](../pipeline-model.md#field-assignments). Each expression is evaluated based on the input record and the result is either assigned to a new field of the input record if it does not exist, or the existing field is modified in its original location with the result. @@ -23,7 +23,7 @@ a computed value cannot be referenced in another expression. If you need to re-use a computed result, this can be done by chaining multiple `put` operators. The `put` keyword is optional since it is an -[implied operator](../dataflow-model.md#implied-operators). +[implied operator](../pipeline-model.md#implied-operators). Each `` expression must be a field reference expressed as a dotted path or one more constant index operations on `this`, e.g., `a.b`, `this["a"]["b"]`, diff --git a/docs/language/operators/search.md b/docs/language/operators/search.md index d5238c5f04..bba3e93b29 100644 --- a/docs/language/operators/search.md +++ b/docs/language/operators/search.md @@ -13,7 +13,7 @@ to each input value and dropping each value for which the expression evaluates to `false` or to an error. The `search` keyword is optional since it is an -[implied operator](../dataflow-model.md#implied-operators). +[implied operator](../pipeline-model.md#implied-operators). When Zed queries are run interactively, it is convenient to be able to omit the "search" keyword, but when search filters appear in Zed source files, diff --git a/docs/language/operators/sort.md b/docs/language/operators/sort.md index 5657dbde68..e625a1a3f4 100644 --- a/docs/language/operators/sort.md +++ b/docs/language/operators/sort.md @@ -66,7 +66,7 @@ echo '2 null 1 3' | zq -z 'sort this' - 3 null ``` -_With no sort expression, sort will sort by [`this`](../dataflow-model.md#the-special-value-this) for non-records_ +_With no sort expression, sort will sort by [`this`](../pipeline-model.md#the-special-value-this) for non-records_ ```mdtest-command echo '2 null 1 3' | zq -z sort - ``` diff --git a/docs/language/operators/summarize.md b/docs/language/operators/summarize.md index 749d48e758..a6658e8e3f 100644 --- a/docs/language/operators/summarize.md +++ b/docs/language/operators/summarize.md @@ -24,7 +24,7 @@ unique combination of values of the group-by keys specified after the `by` keyword. The `summarize` keyword is optional since it is an -[implied operator](../dataflow-model.md#implied-operators). +[implied operator](../pipeline-model.md#implied-operators). Each aggregate function may be optionally followed by a `where` clause, which applies a Boolean expression that indicates, for each input value, diff --git a/docs/language/operators/switch.md b/docs/language/operators/switch.md index d7e4be59d9..455b241f18 100644 --- a/docs/language/operators/switch.md +++ b/docs/language/operators/switch.md @@ -6,42 +6,42 @@ ``` switch ( - case => - case => + case => + case => ... - [ default => ] + [ default => ] ) switch ( - case => - case => + case => + case => ... - [ default => ] + [ default => ] ) ``` ### Description -The `switch` operator routes input values to multiple, parallel legs of -the dataflow path based on case matching. +The `switch` operator routes input values to multiple, parallel branches of +the pipeline based on case matching. In this first form, the expression `` is evaluated for each input value and its result is compared with all of the case values, which must be distinct, compile-time constant -expressions. The value is propagated to the matching leg. +expressions. The value is propagated to the matching branch. In the second form, each case is evaluated for each input value in the order that the cases appear. -The first case to match causes the input value to propagate to the corresponding leg. -Even if later cases match, only the first leg receives the value. +The first case to match causes the input value to propagate to the corresponding branch. +Even if later cases match, only the first branch receives the value. In either form, if no case matches, but a default is present, -then the value is routed to the default leg. Otherwise, the value is dropped. +then the value is routed to the default branch. Otherwise, the value is dropped. Only one default case is allowed and it may appear anywhere in the list of cases; where it appears does not influence the result. -The output of a switch consists of multiple legs that must be merged. -If the downstream operator expects a single input, then the output legs are +The output of a switch consists of multiple branches that must be merged. +If the downstream operator expects a single input, then the output branches are merged with an automatically inserted [combine operator](combine.md). ### Examples diff --git a/docs/language/operators/where.md b/docs/language/operators/where.md index 954ae439f8..6eb84b3449 100644 --- a/docs/language/operators/where.md +++ b/docs/language/operators/where.md @@ -13,7 +13,7 @@ to each input value and dropping each value for which the expression evaluates to `false` or to an error. The `where` keyword is optional since it is an -[implied operator](../dataflow-model.md#implied-operators). +[implied operator](../pipeline-model.md#implied-operators). The "where" keyword requires a regular Zed expression and does not support [search expressions](../search-expressions.md). Use the diff --git a/docs/language/operators/yield.md b/docs/language/operators/yield.md index a4674a9d92..23462dd588 100644 --- a/docs/language/operators/yield.md +++ b/docs/language/operators/yield.md @@ -15,7 +15,7 @@ in left-to-right order. Each `` may be any valid [Zed expression](../expressions.md). The `yield` keyword is optional since it is an -[implied operator](../dataflow-model.md#implied-operators). +[implied operator](../pipeline-model.md#implied-operators). ### Examples diff --git a/docs/language/overview.md b/docs/language/overview.md index 997b9274ed..c1100053f2 100644 --- a/docs/language/overview.md +++ b/docs/language/overview.md @@ -32,18 +32,18 @@ operator | join | ... ``` Here, Zed programs can include multiple data sources and splitting operations -where multiple paths run in parallel and paths can be combined (in an +where multiple pipeline branches run in parallel and branches can be combined (in an undefined order), merged (in a defined order) by one or more sort keys, or joined using relational-style join logic. Generally speaking, a [flow graph](https://en.wikipedia.org/wiki/Directed_acyclic_graph) defines a directed acyclic graph (DAG) composed of data sources and operator nodes. The Zed syntax leverages "fat arrows", -i.e., `=>`, to indicate the start of a parallel leg of the data flow. +i.e., `=>`, to indicate the start of a parallel branch of the pipeline. That said, the Zed language is [declarative](https://en.wikipedia.org/wiki/Declarative_programming) -and the Zed compiler optimizes the data flow computation +and the Zed compiler optimizes the pipeline computation — e.g., often implementing a Zed program differently than the flow implied by the pipeline yet reaching the same result — much as a modern SQL engine optimizes a declarative SQL query. @@ -114,7 +114,7 @@ search "example.com" AND "urgent" The following sections continue describing the Zed language. -* [The Dataflow Model](dataflow-model.md) +* [The Pipeline Model](pipeline-model.md) * [Data Types](data-types.md) * [Const, Func, Operator, and Type Statements](statements.md) * [Expressions](expressions.md) diff --git a/docs/language/dataflow-model.md b/docs/language/pipeline-model.md similarity index 95% rename from docs/language/dataflow-model.md rename to docs/language/pipeline-model.md index abb8d884bc..df33cabd77 100644 --- a/docs/language/dataflow-model.md +++ b/docs/language/pipeline-model.md @@ -1,16 +1,16 @@ --- sidebar_position: 2 -sidebar_label: Dataflow Model +sidebar_label: Pipeline Model --- -# The Dataflow Model +# The Pipeline Model In Zed, each operator takes its input from the output of its upstream operator beginning either with a data source or with an implied source. All available operators are listed on the [reference page](operators/README.md). -## Dataflow Sources +## Pipeline Sources In addition to the data sources specified as files on the `zq` command line, a source may also be specified with the [`from` operator](operators/from.md). @@ -41,7 +41,7 @@ in the [ZSON text format](../formats/zson.md) and the `zq` query text expressed as the first argument of the `zq` command is expressed in the syntax of the Zed language described here. -## Dataflow Operators +## Pipeline Operators Each operator is identified by name and performs a specific operation on a stream of records. @@ -70,15 +70,15 @@ providing a convenient means to derive arbitrary output values as a function of each input value, much like the map concept in the MapReduce framework. The [`fork` operator](operators/fork.md) copies its input to parallel -legs of a query. The output of these parallel paths can be combined +branches of a pipeline. The output of these parallel branches can be combined in a number of ways: * merged in sorted order using the [`merge` operator](operators/merge.md), * joined using the [`join` operator](operators/join.md), or * combined in an undefined order using the implied [`combine` operator](operators/combine.md). -A path can also be split to multiple query legs using the +A pipeline can also be split to multiple branches using the [`switch` operator](operators/switch.md), in which data is routed to only one -corresponding leg (or dropped) based on the switch clauses. +corresponding branch (or dropped) based on the switch clauses. Switch operators typically involve multiline Zed programs, which are easiest to edit in a file. For example, @@ -101,7 +101,7 @@ produces {val:3,message:"many"} {val:4,message:"many"} ``` -Note that the output order of the switch legs is undefined (indeed they run +Note that the output order of the switch branches is undefined (indeed they run in parallel on multiple threads). To establish a consistent sequence order, a [`merge` operator](operators/merge.md) may be applied at the output of the switch specifying a sort key upon which @@ -252,7 +252,7 @@ the implied record field named `foo`. Another common query pattern involves adding or mutating fields of records where the input is presumed to be a sequence of records. The [`put` operator](operators/put.md) provides this mechanism and the `put` -keyword is implied by the [field assignment](dataflow-model.md#field-assignments) syntax `:=`. +keyword is implied by the [field assignment](#field-assignments) syntax `:=`. For example, the operation ``` diff --git a/docs/tutorials/join.md b/docs/tutorials/join.md index a034994f4b..d16ef78e24 100644 --- a/docs/tutorials/join.md +++ b/docs/tutorials/join.md @@ -176,7 +176,7 @@ produces ## Alternate Syntax In addition to the syntax shown so far, `join` supports an alternate syntax in -which left and right inputs are specified by the two legs of a preceding +which left and right inputs are specified by the two branches of a preceding [`fork` operator](../language/operators/fork.md), [`from` operator](../language/operators/from.md), or [`switch` operator](../language/operators/switch.md). diff --git a/docs/tutorials/schools.md b/docs/tutorials/schools.md index 5ed41aad03..70da91d625 100644 --- a/docs/tutorials/schools.md +++ b/docs/tutorials/schools.md @@ -304,7 +304,7 @@ produces Because the right-hand-side value to which we were comparing was a string, it was necessary to wrap it in quotes. If this string were written as a keyword, it would have been interpreted as a field name as -Zed [field references](../language/dataflow-model.md#implied-field-references) +Zed [field references](../language/pipeline-model.md#implied-field-references) look like keywords in the context of an expression. For example, to see the records in which the school and district name are the @@ -890,8 +890,8 @@ performs zero or more aggregations with zero or more group-by expressions. Each aggregation is performed by an [aggregate function](../language/aggregates/README.md) that operates on batches of records to carry out a running computation over -the values they contain. The `summarize` keyword is optional as the operato -can be [inferred from context](../language/dataflow-model.md#implied-operators). +the values they contain. The `summarize` keyword is optional as the operator +can be [inferred from context](../language/pipeline-model.md#implied-operators). As with SQL, multiple aggregate functions may be invoked at the same time. For example, to simultaneously calculate the minimum, maximum, and average of diff --git a/docs/tutorials/zq.md b/docs/tutorials/zq.md index ff3538d522..3c2e216fe0 100644 --- a/docs/tutorials/zq.md +++ b/docs/tutorials/zq.md @@ -65,7 +65,7 @@ and you get ``` With `zq`, the mysterious `jq` value `.` is instead called the almost-as-mysterious value -[`this`](../language/dataflow-model.md#the-special-value-this) and you say: +[`this`](../language/pipeline-model.md#the-special-value-this) and you say: ```mdtest-command echo '1 2 3' | zq -z 'this+1' - ``` @@ -102,7 +102,7 @@ expression `2` is evaluated for each input value, and the value `2` is produced each time, so three copies of `2` are emitted. In `zq` however, `2` by itself is interpreted as a search and is -[shorthand for](../language/dataflow-model.md#implied-operators) `search 2` so the command +[shorthand for](../language/pipeline-model.md#implied-operators) `search 2` so the command ```mdtest-command echo '1 2 3' | zq -z 2 - ```