Table Creation in SQL server with specific data type using data from excel file

Hi all,

Thanks in advance for read and any help here.

I have a pipeline where I had a excel file, with columns name and table name, so first I read this excel file and them make a parse, this is a sample of the excel file:

image

So I want (if not exist) create a table AAA with the columns 0XX5, 0XX6, 0XX7, 0XX8, 0XX9 each one with the respective Datatype, how can I o that?

Hi @Marley_Bacelar,

If you want all the columns included in each table, then you can use a copy snap (File Reader → Excel Parser → Mapper → Copy). Intentionally kept a mapper before copy so that you can add/remove any additional columns for your table.

You can refer to this page for changing data types, screenshot below for your reference:

Please ensure that you have multiple outputs enabled in your copy snap (can be achieved by clicking the snap itself and then going into the views). Screenshot below for reference:

After the copy snap, you can have another mapper snap for each output if you need to do any transformation and then have your target system snaps attached to each copy/mapper snap (if you used mapper snap after copy snap). Screenshot below for your convenience.

Thanks!

Hi Darsh,

Thank you very much! Will try this solution!

1 Like