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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
med1
Creator
Creator

Create Database table using Csv inputs

Hello Community,

 

I want to develop job which allows to create Database table using 2 Csv Files as Input.

One file contains the columns and description of the table and the second one contains the data to be inserted.

also the data file don't have the same schema which means that i should handle the file without specifying the schema.

 

Any idea how to do it ?!

Labels (1)
1 Solution

Accepted Solutions
med1
Creator
Creator
Author

Hello,

 

First Thank you for your answers.

For the creation it is OK i handled the file using tJavarow.

To insert data in Oracle DB i followed the process that you suggest, i did the some config, i checked that the Dynamic is authorized for My Oracle DB but i had errors.

 

Please find attached the error of the execution.

 

Thanks,

BR,

Med


Erreur.PNG
Erreur_1.PNG
Erreur_2.PNG

View solution in original post

5 Replies
TRF
Champion II
Champion II

Hi,
Can you share your files description?
med1
Creator
Creator
Author

Hello,

 

Please find attached an example of file.

 

Thanks,

BR,

Med


Create table T_Resultat_Test.csv
Anonymous
Not applicable

My suggestion would be to use the schema file(the one with the table info) to generate a create statement query depending on the database. The design can look something like this,

0683p000009LrxQ.png

 

Once the tables are created, you need to define your input file component with a single column and mention the column datatype as dynamic. (this option works only on enterprise edition if I am correct and also requires your first row to be a header to work properly).

Input Component,

0683p000009LrXR.png

Output Component,

0683p000009Lrx2.png

 

This way you can read the input files dynamically without defining the schema and loading it to the table of your choice.

 

Please note that the dynamic datatype is not supported for all source and target components. You may want to look for an alternate approach if your job involves complex transformations while loading the data.

med1
Creator
Creator
Author

Hello,

 

First Thank you for your answers.

For the creation it is OK i handled the file using tJavarow.

To insert data in Oracle DB i followed the process that you suggest, i did the some config, i checked that the Dynamic is authorized for My Oracle DB but i had errors.

 

Please find attached the error of the execution.

 

Thanks,

BR,

Med


Erreur.PNG
Erreur_1.PNG
Erreur_2.PNG
med1
Creator
Creator
Author

 

 

I found the error thank you.