Difference between Script when checked "Run Script" true and "Transform Scripts" in Transform Map

payal1
Kilo Explorer

Hi All,

I want to know what is the difference between Script when checked "Run Script" true and "Transform Scripts" in Transform Map.

We have a one "Type" field which is not available in file, because template of that file is fixed, and we are setting that target table "Type" field value using run script's script.

Now the requirement is, we want that field to make that Type field to coalense true.

find_real_file.png

 

1 ACCEPTED SOLUTION

Hi Payal,

You don't need a field in your import file. But in your transform map, under field maps Tab, you can click on New and in that form, select use source script (checkbox). 

Write the mapping code in there and save.

Then under field maps, you will see a new row for this field. For that row, select coalesce as True.

Mark the comment as a correct answer and helpful if this helps.

View solution in original post

14 REPLIES 14

Hi Abhishek,

Thank you your reply is helpful. I haven't used the transform script can you please give any example of script.

Sanket Khabiya
Kilo Sage

Hello,

Run scriptCheck box to define a script that transforms field values in the source table to the target table.
ScriptTransform map script that transforms field values in the source table to the target table. The system runs the transform map script in addition to any field maps.

Refer link : Create a Transform Map

Article link : Transformation script variables & Scripting in Transform Maps.

 

Regards,

Sanket

asifnoor
Kilo Patron

Hi,

You can make the field coaelsec true only on the fields which are available in the source fields.

If you want to make this field as coalesce true, then go to ield maps and create new and there select script instead of source variable in the dropdown and add your code.

Save and come to field maps and there select that field as coalesce true.

The run script is basically when checked will show the below script dialog box in your screenshot. Run BR are something which when checked wil execute the BRs (if any) on your table.

Mark the comment as a correct answer and helpful if this helps.

Hi Asifnoor,

So for that do I need to create "Type" field in Source table?

Hi Payal,

You don't need a field in your import file. But in your transform map, under field maps Tab, you can click on New and in that form, select use source script (checkbox). 

Write the mapping code in there and save.

Then under field maps, you will see a new row for this field. For that row, select coalesce as True.

Mark the comment as a correct answer and helpful if this helps.