02-07-2023 06:29 AM
Hi All,
I wanted to write query with value from inputstream but fetch the query from the configuration file/ json file which is stored in sldb instead of writing query directly in the snap
for example if consider this statement i am using inside the snap
it should evaluate to this query
SELECT * FROM app_0046_customervoice.rcur_bfo_ACCOUNT WHERE SEACCOUNTID__C IN (‘0001088191’,‘0021088450’));
do i have to escape any character as i am getting syntax error when i am am using it in expression/configuration file
input:
[
{
“SE_ACCOUNT_IDs”: “0001088191’,'0021088450”
}
]
Any help is appreciated!
02-07-2023 02:37 PM
Hi @rashmi,
Try to build to build snaplogic expression with double quotes. I think this will do the trick.
But if you want to have something like configuration file then please/check the following logic:
testQuery.expr (133 Bytes)
in .expr file there is already prebuild expression and is expecting one parameter.
I tested with mapper and this is the following output:
More information on the following link:
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438110/Expression+Libraries
Thanks,
Pero M.
02-10-2023 06:25 AM
@rashmi Yuo could simply read in the config file, parse it, and format the data with a mapper, then send that as your Query string
02-10-2023 06:39 AM
@pmancevski, @jcornelius Thanks a lot!