Hi Ida,
Corentin's solution is one of the most used but in case you need to run the process only once because of other updates in metadata or data, then you can use a subprocess in the prolog tab which merges the files to one, which can be then uploaded.
ExecuteProcess('System - Merge Files');
If you know the number and names of the files then you can hardcode it. Alternatively, you could use the WildcardFileSearch() function to collect all files meeting the set criteria.
### Merge Files ###
cCommand = 'cmd /c copy /b ' | pFile1 | '+' | pFile2 | '+' | pFile3 | ' ' | pMergedFile;
ExecuteCommand(cCommand,1);
There are also some prerequisites which are important:
- the merge needs to be executed in a subprocess because the newly created file needs to be "closed" / "released" before import
- the to be merged source files need to have the same structure and encoding before the merge. You can also use Powershell instead of CMD and convert the files before merging.
Cheers,
------------------------------
Tomasz Brzoza
Linde AG
Munich
------------------------------
Original Message:
Sent: Wed January 15, 2020 04:13 AM
From: Corentin Gombert
Subject: Turbo Integrator - Read multiple file at once
Hi Ida,
How is the structure of the files ? Is it the same for each file ?
You can do 2 processes :
The first is the import of the file, the name could be parametric. You have to use "DatasourceNameForServer = sFilePath;" to define the file you import,
And another process which run 24 times the first one with "ExecuteProcess"' and the name of the file as parameter
Regards,
------------------------------
Corentin Gombert
Original Message:
Sent: Wed January 15, 2020 03:54 AM
From: ida lasim
Subject: Turbo Integrator - Read multiple file at once
Hi all,
Is it possible to read multiple files at once when using turbo integrator for cube update. I have 24 csv files differentiate by filename source_yyyymm.csv (source_201901.csv, source_201902.csv, etc..). Some solutions I found while browsing is create 24 TI process or using paw. However I prefer using TI for data manipulation. I was thinking whether TI can read multiple files using wildcard characters?
Thanks in advance :)
regards
------------------------------
ida lasim
------------------------------
#PlanningAnalyticswithWatson