Skip to Content

Process Multiple Files Sequentially and load into staging table.

Hi All,

I have requirement we are extracting the Multiple files from on of the source folder( D:\Source). the folder contains files such as .CSV format

Ex:


Test-20160616-00000049.csv

Test-20160616-00000050.csv

Test-20160616-00000051.csv

Test-20160616-00000052.csv

I need to extract this files one by one ( Sequentially ) and load into staging table( DB2 database). My guess is I have to use while loop in this scenario to loop files one by one. can you please give the script to do this process.

Thanks

Murali

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jun 16, 2016 at 12:09 PM

    Hi Murali,

    No need to use while loop. in the source file format give file name as Test*.csv or *.csv and it will pick all the files that start with the name Test from that path and load files to target sequentially in single execution.

    if you give *.csv it will pick all the files that end with .csv.

    Thanks,

    Ravi Kiran.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.