Skip to content

Commit 9837234

Browse files
authored
Add reference to extract() and extract_all() in parse docs, small fixes (#180)
1 parent 0579369 commit 9837234

18 files changed

+57
-55
lines changed

apl/scalar-functions/string-functions.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ The value of the first argument whose value isn’t null (or not-empty for strin
201201

202202
## extract()
203203

204-
Convert the extracted substring to the indicated type.
204+
Retrieve the first substring matching a regular expression from a source string.
205205

206206
### Arguments
207207

@@ -238,7 +238,7 @@ extract("x=([0-9.]+)", 1, "axiom x=65.6|po") == "65.6"
238238

239239
## extract_all()
240240

241-
retrieve a subset of matching groups.
241+
Retrieve all substrings matching a regular expression from a source string. Optionally, retrieve only a subset of the matching groups.
242242

243243
### Arguments
244244

apl/tabular-operators/count-operator.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ This query returns the number of HTTP requests that resulted in an error (HTTP s
135135

136136
## List of related operators
137137

138-
- [**summarize**](/apl/tabular-operators/summarize-operator): The `summarize` operator is used to aggregate data based on one or more fields, allowing you to calculate sums, averages, and other statistics, including counts. Use `summarize` when you need to group data before counting.
139-
- [**extend**](/apl/tabular-operators/extend-operator): The `extend` operator adds calculated fields to a dataset. You can use `extend` alongside `count` if you want to add additional calculated data to your query results.
140-
- [**project**](/apl/tabular-operators/project-operator): The `project` operator selects specific fields from a dataset. While `count` returns the total number of records, `project` can limit or change which fields you see.
141-
- [**where**](/apl/tabular-operators/where-operator): The `where` operator filters rows based on a condition. Use `where` with `count` to only count records that meet certain criteria.
142-
- [**take**](/apl/tabular-operators/take-operator): The `take` operator returns a specified number of records. You can use `take` to limit results before applying `count` if you're interested in counting a sample of records.
138+
- [summarize](/apl/tabular-operators/summarize-operator): The `summarize` operator is used to aggregate data based on one or more fields, allowing you to calculate sums, averages, and other statistics, including counts. Use `summarize` when you need to group data before counting.
139+
- [extend](/apl/tabular-operators/extend-operator): The `extend` operator adds calculated fields to a dataset. You can use `extend` alongside `count` if you want to add additional calculated data to your query results.
140+
- [project](/apl/tabular-operators/project-operator): The `project` operator selects specific fields from a dataset. While `count` returns the total number of records, `project` can limit or change which fields you see.
141+
- [where](/apl/tabular-operators/where-operator): The `where` operator filters rows based on a condition. Use `where` with `count` to only count records that meet certain criteria.
142+
- [take](/apl/tabular-operators/take-operator): The `take` operator returns a specified number of records. You can use `take` to limit results before applying `count` if you're interested in counting a sample of records.

apl/tabular-operators/distinct-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,6 @@ This query provides a distinct list of HTTP status codes that occurred in the lo
140140

141141
## List of related operators
142142

143-
- [**count**](/apl/tabular-operators/count-operator): Returns the total number of rows. Use it to count occurrences of data rather than filtering for distinct values.
144-
- [**summarize**](/apl/tabular-operators/summarize-operator): Allows you to aggregate data and perform calculations like sums or averages while grouping by distinct values.
145-
- [**project**](/apl/tabular-operators/project-operator): Selects specific fields from the dataset. Use it when you want to control which fields are returned before applying `distinct`.
143+
- [count](/apl/tabular-operators/count-operator): Returns the total number of rows. Use it to count occurrences of data rather than filtering for distinct values.
144+
- [summarize](/apl/tabular-operators/summarize-operator): Allows you to aggregate data and perform calculations like sums or averages while grouping by distinct values.
145+
- [project](/apl/tabular-operators/project-operator): Selects specific fields from the dataset. Use it when you want to control which fields are returned before applying `distinct`.

apl/tabular-operators/extend-operator.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@ This query creates a new field `status_category` that labels each HTTP request a
137137

138138
## List of related operators
139139

140-
- [**project**](/apl/tabular-operators/project-operator): Use `project` to select specific fields or rename them. Unlike `extend`, it does not add new fields.
141-
- [**summarize**](/apl/tabular-operators/summarize-operator): Use `summarize` to aggregate data, which differs from `extend` that only adds new calculated fields without aggregation.
140+
- [project](/apl/tabular-operators/project-operator): Use `project` to select specific fields or rename them. Unlike `extend`, it does not add new fields.
141+
- [summarize](/apl/tabular-operators/summarize-operator): Use `summarize` to aggregate data, which differs from `extend` that only adds new calculated fields without aggregation.

apl/tabular-operators/extend-valid-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,6 @@ In this query, the `extract` function retrieves the first letter of the city nam
150150

151151
## List of related operators
152152

153-
- [**extend**](/apl/tabular-operators/extend-operator): Use `extend` to add calculated fields unconditionally, without validating data.
154-
- [**project**](/apl/tabular-operators/project-operator): Use `project` to select and rename fields, without performing conditional extensions.
155-
- [**summarize**](/apl/tabular-operators/summarize-operator): Use `summarize` for aggregation, often used before extending fields with further calculations.
153+
- [extend](/apl/tabular-operators/extend-operator): Use `extend` to add calculated fields unconditionally, without validating data.
154+
- [project](/apl/tabular-operators/project-operator): Use `project` to select and rename fields, without performing conditional extensions.
155+
- [summarize](/apl/tabular-operators/summarize-operator): Use `summarize` for aggregation, often used before extending fields with further calculations.

apl/tabular-operators/limit-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@ This query limits the output to 5 unauthorized access attempts (`401` status cod
139139

140140
## List of related operators
141141

142-
- [**take**](/apl/tabular-operators/take-operator): Similar to `limit`, but explicitly focuses on row sampling.
143-
- [**top**](/apl/tabular-operators/top-operator): Retrieves the top **N** rows sorted by a specific field.
144-
- [**sample**](/apl/tabular-operators/sample-operator): Randomly samples **N** rows from the dataset.
142+
- [take](/apl/tabular-operators/take-operator): Similar to `limit`, but explicitly focuses on row sampling.
143+
- [top](/apl/tabular-operators/top-operator): Retrieves the top **N** rows sorted by a specific field.
144+
- [sample](/apl/tabular-operators/sample-operator): Randomly samples **N** rows from the dataset.

apl/tabular-operators/order-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,6 @@ This query sorts the security logs by time to display the most recent log entrie
141141

142142
## List of related operators
143143

144-
- [**top**](/apl/tabular-operators/top-operator): The `top` operator returns the top N records based on a specific sorting criteria, which is similar to `order` but only retrieves a fixed number of results.
145-
- [**summarize**](/apl/tabular-operators/summarize-operator): The `summarize` operator groups data and often works in combination with `order` to rank summarized values.
146-
- [**extend**](/apl/tabular-operators/extend-operator): The `extend` operator can be used to create calculated fields, which can then be used as sorting criteria in the `order` operator.
144+
- [top](/apl/tabular-operators/top-operator): The `top` operator returns the top N records based on a specific sorting criteria, which is similar to `order` but only retrieves a fixed number of results.
145+
- [summarize](/apl/tabular-operators/summarize-operator): The `summarize` operator groups data and often works in combination with `order` to rank summarized values.
146+
- [extend](/apl/tabular-operators/extend-operator): The `extend` operator can be used to create calculated fields, which can then be used as sorting criteria in the `order` operator.

apl/tabular-operators/parse-operator.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,5 +372,7 @@ By following these best practices and understanding the capabilities of the pars
372372

373373
## List of related operators
374374

375-
- [**extend**](/apl/tabular-operators/extend-operator): Use the `extend` operator when you want to add calculated fields without parsing text.
376-
- [**project**](/apl/tabular-operators/project-operator): Use `project` to select and rename fields after parsing text.
375+
- [extend](/apl/tabular-operators/extend-operator): Use the `extend` operator when you want to add calculated fields without parsing text.
376+
- [project](/apl/tabular-operators/project-operator): Use `project` to select and rename fields after parsing text.
377+
- [extract](/apl/scalar-functions/string-functions#extract): Use `extract` to retrieve the first substring matching a regular expression from a source string.
378+
- [extract_all](/apl/scalar-functions/string-functions#extract-all): Use `extract_all` to retrieve all substrings matching a regular expression from a source string.

apl/tabular-operators/project-away-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,6 @@ Here’s how you can use wildcards in `project-away`:
161161

162162
## List of related operators
163163

164-
- [**project**](/apl/tabular-operators/project-operator): The `project` operator lets you select specific fields to include, rather than excluding them.
165-
- [**extend**](/apl/tabular-operators/extend-operator): The `extend` operator is used to add new fields, whereas `project-away` is for removing fields.
166-
- [**summarize**](/apl/tabular-operators/summarize-operator): While `project-away` removes fields, `summarize` is useful for aggregating data across multiple fields.
164+
- [project](/apl/tabular-operators/project-operator): The `project` operator lets you select specific fields to include, rather than excluding them.
165+
- [extend](/apl/tabular-operators/extend-operator): The `extend` operator is used to add new fields, whereas `project-away` is for removing fields.
166+
- [summarize](/apl/tabular-operators/summarize-operator): While `project-away` removes fields, `summarize` is useful for aggregating data across multiple fields.

apl/tabular-operators/project-keep-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ This query narrows down the data to track HTTP status codes by users, helping id
139139

140140
## List of related operators
141141

142-
- [**project**](/apl/tabular-operators/project-operator): Use `project` to explicitly specify the fields you want in your result, while also allowing transformations or calculations on those fields.
143-
- [**extend**](/apl/tabular-operators/extend-operator): Use `extend` to add new fields or modify existing ones without dropping any fields.
144-
- [**summarize**](/apl/tabular-operators/summarize-operator): Use `summarize` when you need to perform aggregation operations on your dataset, grouping data as necessary.
142+
- [project](/apl/tabular-operators/project-operator): Use `project` to explicitly specify the fields you want in your result, while also allowing transformations or calculations on those fields.
143+
- [extend](/apl/tabular-operators/extend-operator): Use `extend` to add new fields or modify existing ones without dropping any fields.
144+
- [summarize](/apl/tabular-operators/summarize-operator): Use `summarize` when you need to perform aggregation operations on your dataset, grouping data as necessary.
145145

146146
## Wildcard
147147

apl/tabular-operators/project-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,6 @@ The query extracts only the timestamp, user ID, and HTTP status for analysis of
153153

154154
## List of related operators
155155

156-
- [**extend**](/apl/tabular-operators/extend-operator): Use `extend` to add new fields or calculate values without removing any existing fields.
157-
- [**summarize**](/apl/tabular-operators/summarize-operator): Use `summarize` to aggregate data across groups of rows, which is useful when you’re calculating totals or averages.
158-
- [**where**](/apl/tabular-operators/where-operator): Use `where` to filter rows based on conditions, often paired with `project` to refine your dataset further.
156+
- [extend](/apl/tabular-operators/extend-operator): Use `extend` to add new fields or calculate values without removing any existing fields.
157+
- [summarize](/apl/tabular-operators/summarize-operator): Use `summarize` to aggregate data across groups of rows, which is useful when you’re calculating totals or averages.
158+
- [where](/apl/tabular-operators/where-operator): Use `where` to filter rows based on conditions, often paired with `project` to refine your dataset further.

apl/tabular-operators/project-reorder-operator.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Reorder specific fields and keep others in original order:
182182

183183
## List of related operators
184184

185-
- [**project**](/apl/tabular-operators/project-operator): Use the `project` operator to select and rename fields without changing their order.
186-
- [**extend**](/apl/tabular-operators/extend-operator): `extend` adds new calculated fields while keeping the original ones in place.
187-
- [**summarize**](/apl/tabular-operators/summarize-operator): Use `summarize` to perform aggregations on fields, which can then be reordered using `project-reorder`.
188-
- [**sort**](/apl/tabular-operators/sort-operator): Sorts rows based on field values, and the results can then be reordered with `project-reorder`.
185+
- [project](/apl/tabular-operators/project-operator): Use the `project` operator to select and rename fields without changing their order.
186+
- [extend](/apl/tabular-operators/extend-operator): `extend` adds new calculated fields while keeping the original ones in place.
187+
- [summarize](/apl/tabular-operators/summarize-operator): Use `summarize` to perform aggregations on fields, which can then be reordered using `project-reorder`.
188+
- [sort](/apl/tabular-operators/sort-operator): Sorts rows based on field values, and the results can then be reordered with `project-reorder`.

apl/tabular-operators/sample-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,6 @@ This query helps you quickly spot failed requests (HTTP 500 responses) and inves
141141

142142
## List of related operators
143143

144-
- [**take**](/apl/tabular-operators/take-operator): Use `take` when you want to return the first N rows in the dataset rather than a random subset.
145-
- [**where**](/apl/tabular-operators/where-operator): Use `where` to filter rows based on conditions rather than sampling randomly.
146-
- [**top**](/apl/tabular-operators/top-operator): Use `top` to return the highest N rows based on a sorting criterion.
144+
- [take](/apl/tabular-operators/take-operator): Use `take` when you want to return the first N rows in the dataset rather than a random subset.
145+
- [where](/apl/tabular-operators/where-operator): Use `where` to filter rows based on conditions rather than sampling randomly.
146+
- [top](/apl/tabular-operators/top-operator): Use `top` to return the highest N rows based on a sorting criterion.

apl/tabular-operators/sort-operator.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ This query sorts security logs by status code first (in ascending order) and the
150150

151151
## List of related operators
152152

153-
- [**top**](/apl/tabular-operators/top-operator): Use `top` to return a specified number of rows with the highest or lowest values, but unlike `sort`, `top` limits the result set.
154-
- [**project**](/apl/tabular-operators/project-operator): Use `project` to select and reorder fields without changing the order of rows.
155-
- [**extend**](/apl/tabular-operators/extend-operator): Use `extend` to create calculated fields that can then be used in conjunction with `sort` to refine your results.
156-
- [**summarize**](/apl/tabular-operators/summarize-operator): Use `summarize` to group and aggregate data before applying `sort` for detailed analysis.
153+
- [top](/apl/tabular-operators/top-operator): Use `top` to return a specified number of rows with the highest or lowest values, but unlike `sort`, `top` limits the result set.
154+
- [project](/apl/tabular-operators/project-operator): Use `project` to select and reorder fields without changing the order of rows.
155+
- [extend](/apl/tabular-operators/extend-operator): Use `extend` to create calculated fields that can then be used in conjunction with `sort` to refine your results.
156+
- [summarize](/apl/tabular-operators/summarize-operator): Use `summarize` to group and aggregate data before applying `sort` for detailed analysis.

apl/tabular-operators/summarize-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,6 @@ Returns a table that shows the heatmap in each interval [0, 30], [30, 20, 10], a
180180

181181
## List of related operators
182182

183-
- [**count**](/apl/tabular-operators/count-operator): Use when you only need to count rows without grouping by specific fields.
184-
- [**extend**](/apl/tabular-operators/extend-operator): Use to add new calculated fields to a dataset.
185-
- [**project**](/apl/tabular-operators/project-operator): Use to select specific fields or create new calculated fields, often in combination with `summarize`.
183+
- [count](/apl/tabular-operators/count-operator): Use when you only need to count rows without grouping by specific fields.
184+
- [extend](/apl/tabular-operators/extend-operator): Use to add new calculated fields to a dataset.
185+
- [project](/apl/tabular-operators/project-operator): Use to select specific fields or create new calculated fields, often in combination with `summarize`.

apl/tabular-operators/take-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,6 @@ This query retrieves the first 10 security log entries, useful for quick investi
140140

141141
## List of related operators
142142

143-
- [**limit**](/apl/tabular-operators/limit-operator): Similar to `take`, but explicitly limits the result set and often used for pagination or performance optimization.
144-
- [**sort**](/apl/tabular-operators/sort-operator): Used in combination with `take` when you want to fetch a subset of sorted data.
145-
- [**where**](/apl/tabular-operators/where-operator): Filters rows based on a condition before using `take` for sampling specific subsets.
143+
- [limit](/apl/tabular-operators/limit-operator): Similar to `take`, but explicitly limits the result set and often used for pagination or performance optimization.
144+
- [sort](/apl/tabular-operators/sort-operator): Used in combination with `take` when you want to fetch a subset of sorted data.
145+
- [where](/apl/tabular-operators/where-operator): Filters rows based on a condition before using `take` for sampling specific subsets.

apl/tabular-operators/top-operator.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,6 @@ This query shows the top 3 most common HTTP status codes in security logs.
142142

143143
## List of related operators
144144

145-
- [**order**](/apl/tabular-operators/order-operator): Use when you need full control over row ordering without limiting the number of results.
146-
- [**summarize**](/apl/tabular-operators/summarize-operator): Useful when aggregating data over fields and obtaining summarized results.
147-
- [**take**](/apl/tabular-operators/take-operator): Returns the first N rows without sorting. Use when ordering is not necessary.
145+
- [order](/apl/tabular-operators/order-operator): Use when you need full control over row ordering without limiting the number of results.
146+
- [summarize](/apl/tabular-operators/summarize-operator): Useful when aggregating data over fields and obtaining summarized results.
147+
- [take](/apl/tabular-operators/take-operator): Returns the first N rows without sorting. Use when ordering is not necessary.

0 commit comments

Comments
 (0)