Forum Discussion

kstandifer's avatar
kstandifer
New Contributor
3 years ago

Load file twice with one upload

Is it possible to load one file twice without creating two separate loads?

We want to load one file but with separate columns used in each load. 

Load 1: Amount- column G, Source - column B, other columns the same

Load 2: Amount- column H, Source - column C, other columns the same

 

Would I have to import this file twice with 2 of everything...WP, Data sources, etc. ?

  • AlexD's avatar
    AlexD
    New Contributor II

    It is possible to use rules on data sources to choose which columns to select dynamically. You could potentially utilise that functionality. Otherwise the easy solution is to have two import channels and two different data source definitions.

  • Krishna's avatar
    Krishna
    Valued Contributor

    Couple of Options

     

    Option 1

    - Using the 2 different DS and 2 WF Import with WF Channel you can use it. This is simple approach without require any additional code.

     

    Option 2 

    ----------------

    - Using Parser rule in DS. You need some kind of identification in the file Example 

     

    If SOurce = "1" then

    use the COlumn B 

    ELse Column C 

     

    End If

    So it will take it dynamically for the columns in the DS.

     

    Thanks

    Krishna

    • kstandifer's avatar
      kstandifer
      New Contributor

      If I did option 2, how would I get it to read a row twice to apply two situations to one row?

      • Krishna's avatar
        Krishna
        Valued Contributor

        You need some kind of triggering based on the some source value or text or it would be difficult.

  • msruthys's avatar
    msruthys
    New Contributor II

    hI both,

    i have a similar issue and was looking for a parser rule example to copy my row twice instead of loading it thru separate files.