3 Replies Latest reply: Jan 19, 2016 3:15 PM by Damian Waldron RSS

    Load new file and replace the line from old file

    Claudiu Lacatusu

      Hello,

       

      I have some issues updating the new files from a table with data coming from CSVs. But I'll give an example with INLINE Loading.

       

      For example, I have 2 files which are loaded in order Temp1 first and after Temp2.

       

      Temp1:

      LOAD * INLINE [

          ID, NAME

          1, Claudiu

          2, Paul

          3, George

      ];

       

      Temp2:

      LOAD * INLINE [

          ID, NAME

          1, Claudiu

          2, Robert

      ];

       

      What I want to achieve is to update the row where ID = 2 with the value from Temp2 (the newest load) but keep the data from Temp1 (ID 3 from Temp1)

       

      My final table should look like:

      ID, NAME

      1, Claudiu

      2, Robert

      3, George

       

      Can you give me some ideas on this matter ?

       

      Thank you!