Skip to content

Commit 1253859

Browse files
committed
Add note
1 parent 84be5aa commit 1253859

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/cse/schema/parsing-language-reference-guide.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,23 @@ If the specified field exists (has been created with [SET](#set), or parsed from
941941

942942
`TRANSFORM_IF_PRESENT:<field_name> = <transform_stanza_name>`
943943

944+
:::note
945+
The `TRANSFORM_IF_PRESENT` operator only works on fields that contain a value, or a subfield within a JSON structure.
946+
947+
Suppose you had the following JSON array:
948+
949+
```
950+
{
951+
"foo":
952+
{
953+
"bar":
954+
{
955+
"field":"value"
956+
```
957+
958+
The `TRANSFORM_IF_PRESENT` must be placed on a subfield that contains a valid string or integer, in this case, `"field"`. Placing it on the top-level field, in this case `"foo"` or `"bar"`, will be ignored by the system.
959+
:::
960+
944961
### TRIM
945962

946963
Trims any characters specified in `<characters to trim>` from either end of the contents of the field (or fields if `r|<some regex>` is used) specified. The characters `[` and `]` should be escaped; treat `<characters to trim>` like a `[]` group in a regex. 

0 commit comments

Comments
 (0)