Skip to Content
author's profile photo Former Member
Former Member

load XML files while run the job 1 file load twice

Hello all,

I am loading the XML files. in attached screen shot i have provided the flow.

whilw i am loading the file the file which load at last load twice.



9.PNG (10.9 kB)
7.PNG (3.5 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 27, 2016 at 12:36 PM

    Hello Nagendra,

    According to my understanding , the last XML file which is their in shared location is loading the data into table twice?Is this what you meant to say.

    If not can you explain more about the scenario which you are trying to do.(what you written in script level, how many files you are trying to read from shared location)



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Sandhya,

      thanks for reply.I have created the script which delete the file after loading to target table.

      but when I copy two files at same time to the shared location the file load twice.



  • Posted on Jul 27, 2016 at 01:15 PM

    Hi Narendra,

    In this scenario, you do not necessarily need to delete any file.

    You can first load the files from the shared location and then move the file to the archive within the while loop that you have used.

    These could be the steps that you could follow:

    1. A pre-script to move all the files to the shared location.

    2. In a while condition loop, read a specific file and load it to target.

    3. Before coming out of the loop use the file copy from the shared location to the archive folder.

    4. Read the next file and follow the steps 1 to 3 until it is the last one.

    You may need to set a counter to know how many files to be read.

    If the scenario is any different or is not possible to be implemented with the above steps, please let me know the scenario in more detail as I don't see it should be any different than you have actually implemented; though I don't have any insight to the actual coding you have implemented.


    Anirban Saha

    Add a comment
    10|10000 characters needed characters exceeded

    • You can do some thing like the below

      1. Read the file names and write to a table.

      2. Pick up one file at a time from the table and assign it to a global variable

      3. Use the same file as your input for all the 3 DFs

      4. After finishing all 3, archive the file and increase the counter to pick up the next file

      5. repeat the same until all the files

      Check the below post.

      Hope this helps.

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.