Forum Discussion
Try this:
$data.mapValues((v,k)=>v.map(x=>x.mapValues((v1,k1)=>k1.endsWith("_DATE") && v1 == null ? "0000-00-00" : v1 )))
This too is getting error:
failure:
“Map type does not have a method named: map, found in: …-00-00” : v1 )). Perhaps you meant: mapKeys, mapValues"
- smahla3 years agoNew Contributor II
Thanks @AleksandarAngelevski , @jcornelius , @bojanvelevski
Not sure on how to use document parameters. Tried with pipeline parameters and assigned default values for pipeline parameter to get rid of validation error in child pipeline. During execution, child pipeline parameter default values got over written by values passed by parent pipeline.Thank you.
- bojanvelevski3 years agoValued Contributor
Hi @smahla,
ForEach snap has been deprecated, you should use the Pipeline Execute snap. Passing dynamic values as parameters is possible with the Pipe Execute snap.
Let us know if you face any further issues,
Regards,
Bojan - smahla3 years agoNew Contributor II
Thanks Bojan.
Ok. Will try with pipeline execute and let you know.
Assuming steps would be same to pass and read parameters with ForEach and Pipeline execute snaps. - jcornelius3 years agoNew Contributor III
Why not have the output on Master pipeline be a document list where each document is a command. Then the child pipe runs 1 command, they will all get called and the output will results in ach documents which can be processed separately or merged into 1 doc
- smahla3 years agoNew Contributor II
Thanks for your input @jcornelius.
Do you have any sample pipeline with it? I am new to Snaplogic so appreciate if you could share any reference.@bojanvelevski
Tried passing dynanic values from parent to child pipeline and it is working fine. But the child pipeline during validation shows error but runs fine when dynamic values are passed from master pipeline
Is this expected?
Please see the reference screenshots.Child pipeline after validation-
Child pipeline- Snowflake-execute snap error details-
Parameter defined in child pipeline-
Though parent and child pipeline getting completed successfully and getting the desired results but wanted to confirm if child pipeline validation errors are expected or missing something?
Thank you.
- Aleksandar_A3 years agoContributor III
Hi @smahla,
You are getting that error while validating from the child pipeline because the Parameter _name is empty.
You can specify Default Values for the Parameters so you can validate, and these values will be overwritten when you invoke the Pipeline from the parent.
So, if you want to test it by validating directly the child pipeline consider setting the Default Value for the wanted Parameter under the Pipeline Properties.
Let me know if this helps. 🙂
BR,
Aleksandar. - jcornelius3 years agoNew Contributor III
You need to set _name if you are going to use “Pipeline Parameter”
You can use “Document Parameters” and they are referenced with $. Lokk at the output of Snowflake - Execute by clicking the Red doc icon, this will show into the next snap.
ie is output is “tableName”: “table1” then change select to "select * from " $tableName