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
| Syntax |`trait({s: String})` <br> `s` - the name of the the trait to reference |
62
+
| Syntax |`trait({s: String})` <br> `s` - the name of the trait to reference|
63
63
| Return Type |`ScalarExtractor`|
64
64
| Description | Similar to the event operator, the trait operator is used to specify profile trait filter criteria. |
65
-
| Notes | You can reference other audiences by using the audience key as the trait name. |
65
+
| Notes | You can reference other audiences by using the audience key as the trait name. The `.` character indicates traversal through nested structures. If the trait name contains a literal period (`.`), it must be escaped using `\\\\`. |
| 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})`|
71
79
| Return Type |`ScalarExtractor`|
72
-
| Notes | Only valid within a `where` function or a Reducer. |
80
+
| Notes | Only valid within a `where` function or a Reducer. The `.` character indicates traversal through nested structures. If the trait name contains a literal period (`.`), it must be escaped using `\\\\`.|
73
81
| Example |`property('total')`|
74
82
75
83
|`context`||
@@ -79,11 +87,12 @@ The following tables list the query languages's available functions.
79
87
| Notes | Only valid within a `where` function or a Reducer. |
| Syntax |`literal({a: Any})` <br> `a` - the value to treat as a literal expression |
85
93
| 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. |
86
-
| Example |`literal(100)` <br> |
94
+
| Notes | Literals can be `int`, `float`, `string`, `date` or `timestamp`, where `date` uses the format `yyyy-mm-dd` and `timestamp` follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601){:target="_blank"} format. `string` is generally interchangeable with all other formats, except when used in a `property` chained to an `entity`. In this case, Segment recommends matching the data type of the entity property being targeted. |
95
+
| Example |`literal(100)`, `literal('value')`, or `literal(2022-10-17T00:00:00)`|
87
96
88
97
89
98
@@ -269,19 +278,28 @@ The following tables list the query languages's available functions.
269
278
| Syntax |`one_of({a: Array})`<br>`a` - array of possible values |
270
279
| Return Type |`Comparator`|
271
280
| Description | Matches when the value exactly matches one of the values from the parameter array. |
@@ -474,6 +492,30 @@ This example collects all accounts where any associated users performed the `Sho
474
492
ANY event('Shoes Bought').count() >=1
475
493
```
476
494
495
+
#### Associated with Orders that have an association to Order Products
496
+
497
+
This example collects all users who have at least 1 association to an `orders` entity where the `orders` entity has at least 1 association to an `order-products` entity:
0 commit comments