01-29-2021 10:45 PM
Hi,
when I am trying to access Col Desc field in child pipe line getting the below error
sample JSON
{
“Style”:“Pen”,
“Col Desc”: “Black”
}
“failure”: “Validation errors:\nproperty_map.settings.transformations.value.mappingTable.value[4].expression.value: Expression parsing failed near – _content). >> [ << 'Çol Desc (Reason: Mismatched input ‘[’ at line 1:21. Expecting one of: {, ‘||’, ‘&&’, ‘^’, ‘==’, ‘!=’, ‘>’, ‘<’, ‘>=’, ‘<=’, ‘+’, ‘-’, ‘*’, ‘/’, ‘%’, ‘?’, ‘instanceof’, ‘in’, ‘matches’}; Resolution: Please check expression syntax)\n”,
Solved! Go to Solution.
02-01-2021 10:33 AM
Hi, attaching the pipelines for your reference that work both with eval and JSON.parsetest child properties_2021_02_01.slp (5.1 KB) mapper_2021_02_01.slp (3.8 KB)
let me know if you have any questions.
01-30-2021 05:15 PM
If you are trying to get the value of something passed to the pipeline in a pipeline parameter, you will have to parse the JSON fiorst, then you can access the field, use an expression like:
JSON.parse(_content)[‘Col Desc’]
01-31-2021 06:05 PM
Thanks For the reply …
when I am using the JSON.parse(_content)[‘Col Desc’] getting the below error.When I use the suggestion which snaplogic provided(Error Resolution) then the values are coming as null.
02-01-2021 10:33 AM
Hi, attaching the pipelines for your reference that work both with eval and JSON.parsetest child properties_2021_02_01.slp (5.1 KB) mapper_2021_02_01.slp (3.8 KB)
let me know if you have any questions.
02-02-2021 07:06 AM
Thanks it worked…