From 1253859699823ca2c946c7b951bcbaf835f5b96b Mon Sep 17 00:00:00 2001 From: John Pipkin Date: Mon, 28 Oct 2024 12:25:34 -0500 Subject: [PATCH 1/2] Add note --- .../schema/parsing-language-reference-guide.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/cse/schema/parsing-language-reference-guide.md b/docs/cse/schema/parsing-language-reference-guide.md index 51c5082105..49eddc306a 100644 --- a/docs/cse/schema/parsing-language-reference-guide.md +++ b/docs/cse/schema/parsing-language-reference-guide.md @@ -941,6 +941,23 @@ If the specified field exists (has been created with [SET](#set), or parsed from `TRANSFORM_IF_PRESENT: = ` +:::note +The `TRANSFORM_IF_PRESENT` operator only works on fields that contain a value, or a subfield within a JSON structure. + +Suppose you had the following JSON array: + +``` +{ +"foo": +{ +"bar": +{ +"field":"value" +``` + +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. +::: + ### TRIM Trims any characters specified in `` from either end of the contents of the field (or fields if `r|` is used) specified. The characters `[` and `]` should be escaped; treat `` like a `[]` group in a regex.  From 7eede07b0d4c6748afd6aae283d83a702e766cf8 Mon Sep 17 00:00:00 2001 From: John Pipkin Date: Mon, 28 Oct 2024 15:14:50 -0500 Subject: [PATCH 2/2] Add tip --- .../parsing-language-reference-guide.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/cse/schema/parsing-language-reference-guide.md b/docs/cse/schema/parsing-language-reference-guide.md index 49eddc306a..69489b1004 100644 --- a/docs/cse/schema/parsing-language-reference-guide.md +++ b/docs/cse/schema/parsing-language-reference-guide.md @@ -837,6 +837,23 @@ If `` isn’t specified, the field dictionary is passed through inst `r|` syntax can be used here. +:::tip +`TRANSFORM*` operators only work on fields that contain a value, or a subfield within a JSON structure. + +Suppose you had the following JSON array: + +``` +{ +"foo": +{ +"bar": +{ +"field":"value" +``` + +The `TRANSFORM*` operator 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. +::: + ### TRANSFORM_ALL Applies `` stanza to all fields (that have already been parsed or created by SET) that match the regular expression. @@ -941,23 +958,6 @@ If the specified field exists (has been created with [SET](#set), or parsed from `TRANSFORM_IF_PRESENT: = ` -:::note -The `TRANSFORM_IF_PRESENT` operator only works on fields that contain a value, or a subfield within a JSON structure. - -Suppose you had the following JSON array: - -``` -{ -"foo": -{ -"bar": -{ -"field":"value" -``` - -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. -::: - ### TRIM Trims any characters specified in `` from either end of the contents of the field (or fields if `r|` is used) specified. The characters `[` and `]` should be escaped; treat `` like a `[]` group in a regex.