cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Output from script snap (Python) is writing incorrect

aditya_sharma
New Contributor III

Hi,

I am using script snap (python) to split comma separated values within one of my source column and making a dynamic update statement from it. However, when I am doing a preview of script output, all the values looks correct but if I look the preview in mapper output which takes input from script snap shows different output i.e. sometimes all the update statements are same and sometime two are same and one is different.

Am I doing something wrong?testchild_2017_09_22.slp (9.2 KB)
iods_record_1.zip (1.1 KB)

8 REPLIES 8

Thank you so much Akidave

Hi Dmiller,

Please find below output from script snap and mapper output. Mapper output has two update statements same which is incorrect, it has to be same like script.

Script Snap:

โ€œqueryโ€: โ€œupdate iods_staging.stg_sf_account_dim_institution set record_inserted = true;โ€
โ€œqueryโ€: โ€œupdate iods_staging.stg_sf_accountdistict_dim_institution set record_inserted = true;โ€
โ€œqueryโ€: โ€œupdate iods_staging.stg_sf_recordtype_dim_institution set record_inserted = true;โ€

Mapper Output:

โ€œqueryโ€
โ€œupdate iods_staging.stg_sf_account_dim_institution set record_inserted = true;โ€
โ€œupdate iods_staging.stg_sf_recordtype_dim_institution set record_inserted = true;โ€
โ€œupdate iods_staging.stg_sf_recordtype_dim_institution set record_inserted = true;โ€

Thanks
Aditya

Is there a reason you need the Mapper after the Script Snap? Do you plan to modify other information?

If so and there are items like query that should not be modified, then select the Pass through option and donโ€™t specify them in the mapping table.


Diane Miller
Community Manager

Hi Dmiller,

In my real mapping I am not using mapper after script, mapper is used to show the output after validation complete.

Thanks
Aditya