1 Reply Latest reply on Jun 17, 2016 9:38 PM by Dmitry Chirkov

    Movement of Text File Data Source - Mass Updating on Tableau Server?

    Neil Brosnahan

      Hi all,

      Not sure if this is possible or not, but I have a situation where the location of Text File (.CSV) Data Sources is changing from one location (File Server A) to another (File Server B).

       

      Does anybody know if is possible do do this sort of update in mass with a script or any other method (i.e. TABCMD)?

       

      The script would basically need to do the following:

       

      1. Look on the Tableau Server for any Text File  Data Source with a location of \\FILE_SERVER_A\FOLDER\DATA.CSV

      2. Replace the Path of the File Location with \\FILE_SERVER_B\FOLDER\DATA.CSV

       

      Thank you in advance for any ideas.

      Sincerely,

      Neil

        • 1. Re: Movement of Text File Data Source - Mass Updating on Tableau Server?
          Dmitry Chirkov

          There's nothing that Tableau provides out of the box but I'd do following.

           

          First, download affected datasources (or workbooks) with tabcmd. I don't know a good way to identify ones you need. Datasources view in 9.3 has "Connect to" column that list file name but I'd also look into querying Postgres backend.

          Next, use some scripting skills to process workbook and datasources and modify their XML directly via simple string replace. Downloaded files will most likely be tdsx and twbx file - you have to unpackage them first (it's just a zip file - 7-zip command line tools can tackle that).

          After you fixed up XML - publish them back with tabcmd.

           

          XML part you should target is this:

                <connection class='textscan' directory='\\SERVER\share' filename='file.csv' >

           

          And here's something that might give you extra ideas:

               Tableau Friction: Changing the Database Server Name in multiple Workbooks