1 Reply Latest reply on Sep 11, 2019 7:02 AM by Joshua Milligan

    Update and Append in Prep

    Patrick Young

      I am currently running a Tableau Prep Flow off of monthly excel extracts of data.  I have created a master file through todays date. Moving forward, how can i bring new data in, some of which might be data updates to previously captured data?

       

      Example:  I have Record 123 and at the time of initial data capture, that record had some data fields that had been populated, while others were blank.  Now, In my newest excel file, the data for Record 123 has been updated to have all data fields updated and there are also new records that came in with this file.

       

      I am looking to replace the existing data for record 123, and keep all of the data for new and unchanged data records.

       

      How can I best do this?

       

      Thanks!

      -Patrick

        • 1. Re: Update and Append in Prep
          Joshua Milligan

          Hi Patrick,

           

          There are 2 parts to a possible solution:

          1. Since Tableau won't let you use the same file for input and output in the same flow, you'll need to create a copy of the new master file each time you run the flow.  You can automate this via scrip that runs the flow, then copies the output to a different location to be used as the new Master input for the next time.  you can find help for command line scripting here: Save and Share Tableau Prep Work - Tableau
          2. Use a pattern in your flow that brings in the existing records (from the copy) and new/updated records from the source.  Then you'll match where possible, updated where needed and union together with anything new.  The pattern will look something like:

           

          Hope that helps!

          Joshua

          1 of 1 people found this helpful