Dynamic transformation

Can easyMorph do transformations dynamically? I would like to store the source column names with destination data type in database and use it dynamically on table. In other words for each tables I would like to do datatype transformations dynamically based on database values.

Not sure I understand the question. Can you provide an example?

I have many csv files. I would like to do fields conversions automatically based on the Datatypes table.

If the source dataset is not very large you can unpivot, apply a rule, then pivot back the entire dataset at once. See the example below:

dynamic-type-conversion.morph (5.5 KB)
Book1.xlsx (8.9 KB)

In the example I deliberately included some values that fail data type conversion. You can later apply a filter or the “Halt on condition” action to do a data quality check. I’ve also added a dynamic renaming step (not sure if it was required or not).

If the dataset is large, then you will have to split it in chunks (e.g. by 10000 rows) and then iterate.

thanks for solution. Can you put version of morph file please. Out sets would have over 70 fields min 30 conversion and 5000-7000 records.

I don’t have version 3.9.5 installed but suppose you can easily follow the logic just by looking at the actions’ icons in the screenshot above. The only non-obvious thing is the Rule action which properties I’m showing below.