You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/engage/audiences/segment-query-language.md
+30-30Lines changed: 30 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ title: Segment Query Language Reference
3
3
plan: engage-foundations
4
4
---
5
5
6
-
Segment's Query Language lets you define audience segments and computed traits. With clear syntax and practical functionality, the language simplifies the process of defining conditions and computations, helping you extract valuable insights from customer data.
6
+
Segment's query language lets you define audience segments and computed traits. With clear syntax and practical functionality, the language simplifies the process of defining conditions and computations, helping you extract valuable insights from customer data.
7
7
8
-
This reference provides a comprehensive overview of the Segment Query Language.
8
+
This reference provides a comprehensive overview of the Segment query language.
9
9
10
10
## Overview
11
11
@@ -25,7 +25,7 @@ Follow these syntax rules when you create definitions:
25
25
- Expressions are composed of chained functions, starting with an extractor and ending with a result.
26
26
-`.` serves as the delimiter when chaining functions.
27
27
- Audience definitions must return a boolean result (for example, a comparator), while computed trait definitions must return a scalar.
28
-
- Functions have well-defined return types that determine the permissible functions in the call-chain.
28
+
- Functions have well-defined return types that determine the permissible functions in the callchain.
29
29
- When you use junctions, `AND` holds precedence over `OR`, but parentheses offer control over expression combination.
30
30
- Each definition allows a maximum of 50 primary expressions.
31
31
@@ -34,7 +34,7 @@ Follow these syntax rules when you create definitions:
34
34
The language supports the following syntactic sugar adjustments:
35
35
36
36
- The language automatically wraps a 'literal' extractor function around string or number inputs wherever a scalar expression expects them.
37
-
- You can invoke boolean comparator functions `eq`, `neq`, `gt`, `gte`, `lt`, and `lte` by omitting the period and parenthesis and replacing the function name with the equivalent symbols `=`, `!=`, `>`, `>=`, `<`, and `<=`. Regardless of the syntactic sugar, the comparison still dictates the operations allowed in the call-chain.
37
+
- You can invoke the boolean comparator functions `eq`, `neq`, `gt`, `gte`, `lt`, and `lte` by omitting the period and parenthesis and replacing the function name with the equivalent symbols `=`, `!=`, `>`, `>=`, `<`, and `<=`. Regardless of the syntactic sugar, the comparison still dictates the operations allowed in the call-chain.
38
38
39
39
### Definition type
40
40
@@ -48,38 +48,38 @@ The following tables list the query languages's available functions.
| Syntax |`property({s: String})` <br> s - name of property to build an extractor for <br> In the context of funnel audiences, a parent prefix can be added to reference the parent event. <br> `property(parent: {s: String})`|
67
-
| Return Type |`ScalarExtractor`|
68
-
| Notes | Only valid within a `where` function or a Reducer |
| Syntax |`literal({a: Any})` <br> a - the value to treat as a literal expression |
81
-
| Operations allowed in call-chain | None allowed - typically used within another function, like a comparison (with syntactic sugar, this would appear on the right side of the comparison). The outer function or comparison dictates the operations allowed in the call-chain. |
| Syntax |`property({s: String})` <br> s - the name of the property to build an extractor for <br> In the context of funnel audiences, you can add a parent prefix to reference the parent event. <br> `property(parent: {s: String})`|
67
+
| Return Type |`ScalarExtractor`|
68
+
| Notes | Only valid within a `where` function or a Reducer. |
| Syntax |`literal({a: Any})` <br> a - the value to treat as a literal expression |
81
+
| Operations allowed in call-chain | None allowed; typically used within another function, like a comparison (with syntactic sugar, this would appear on the right side of the comparison). The outer function or comparison dictates the operations allowed in the call-chain. |
0 commit comments