Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
FrankGrimm
Partner - Creator
Partner - Creator

load of a variable numbers of databases

Hello together,

i have a variable numbers of CSV tables with different names but the same table structure.

The names of the existing CSV tables are listet in a special table. 

This content of this list is changing. 

Special list Example 1

FrankGrimm_0-1662364638289.png

 

Special list Example 2  (maybe 2 hour later)

FrankGrimm_1-1662364731217.png

With every load order, i have to load all the CSV tables which are existing in this moment and listed in the special CSV table.

How i´m able to build a variable load script?

 

Thanks a lot!

Frank

 

 

 

 

Labels (3)
2 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

 

//load csv file with tables names

Load

  tableName

From tables.csv

;

 

//iterate on table name and load each table

for each vtable in fieldvaluelist('tableName')

  

SQL select * from $(vtable);

 

next vtable

Help users find answers! Don't forget to mark a solution that worked for you!
FrankGrimm
Partner - Creator
Partner - Creator
Author

Hello,

 

thanks a lot.

Perfekt It works!

It's simple if you know how 😉

Frank