2 Replies Latest reply on Nov 28, 2018 1:03 PM by Eric Hindes

    Best way to write back to my data source in Prep?

    Eric Hindes

      I get emailed Labor reports in XLSX files and I designed a flow to parse the report's data and output the data I need to a hyper file.  I want the output to ADD the new XLSX report data to the hyper file, NOT overwrite it, so I can have weeks and weeks of labor reports to import into Tableau.


      The file output step in Prep only has "overwrite existing file" as an option.  I assume I have to load the master hyper file, union it with my new report and then output the updated file to the original master hyper file.  Is that my best option, or is there a better way to add data to a file instead of overwrite it?

        • 1. Re: Best way to write back to my data source in Prep?
          Joshua Milligan



          Currently, there is not a way to append to a file.  Here is an idea to vote for to encourage the developers: https://community.tableau.com/ideas/8823


          Also, Tableau Prep does not allow you to use a file for input and output in the same flow.  I'm guessing there are specific reasons for this, but it does create a limitation in how you can address the issue you mentioned.


          There are several possibilities that come to mind.



          • I have seen someone mention using an Excel file to automatically import the contents of an output file and using that Excel file as an input.  I couldn't find the thread or blog post right off and don't remember the specifics, but that might be one approach.


          • Another possibility is to copy the output file for use as an input as you described in your question.  You might even find a utility that automatically makes a copy of the file to a known location.


          • One other possibility would be to place each new XLSX file in the same directory and then union them together to recreate the final output each time.



          Each of those options have potential positives and drawbacks, but hopefully gives you some idea about how you might want to approach a solution.


          Best Regards,


          • 2. Re: Best way to write back to my data source in Prep?
            Eric Hindes

            Thanks Joshua!  I would love to see this fixed!


            In the meantime, I'll have to use Windows Explorer to move the output file to replace the input file.  That's easier than VBA macros or 3rd party automation software,