Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Mickael_Ro
Contributor II
Contributor II

Creating sql server tables using a file list

Hello,

I would like to retrieve the list of csv files in a local folder and create SQL Server tables automatically by name.

Mickael_Ro_0-1743688100259.png

I use a “tFileList” component that retrieves file names. I then use a “tFileInputDelimited” component to retrieve the files.

Mickael_Ro_1-1743688241311.png

But I get this error:

Mickael_Ro_2-1743688309376.png

I think the problem lies with the “Main” link, which should be ‘iterate’, but this is not possible for a “tDBOutput” component.

Do you have an idea for my request?

Thanks !

Labels (4)
2 Replies
marksouzacosta

Hi @Mickael_Ro,

First, you need your delimited file schema created in your Metadata based on your CSV file structure.
This will be the "recipe" to create your SQL Server Table.

marksouzacosta_1-1743776354283.png

Connect your tFileInputDelimited block to the tDbOutput block using the Row > Main.
Next, select the tDbOutput block, click on the Sync columns button to import the CSV schema to the tDbOutput Schema and on Table Action, select CREATE_IF_NOT_EXISTS. This will create the SQL Table during the process.

marksouzacosta_2-1743776672555.png

Regards,

Mark Costa

 

 

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

Mickael_Ro
Contributor II
Contributor II
Author

Hello,
The problem isn't creating an sql table with a csv file. The problem is to automate the creation of sql server tables via a list of local csv files.