8 Replies Latest reply on Jan 8, 2014 9:14 AM by Toby Erkson

    Schedule Push of Data Refresh to Tableau Server

    Ian Conlon

      I have a dashboard published to my organization's Tableau Server, and I'm having a difficult time setting up scheduled refreshes. The root of the problem appears to be with the different credentials I use to access the data source compared to the credentials I use to access Tableau Server. To further complicate matters, I believe the data source is behind a firewall that would restrict Tableau Server's access anyway, even if I were to provide the correct credentials.

       

      My thinking now is that I should schedule a refresh involving a PUSH of the data from my data source up to the Tableau Server, perhaps by using Windows Task Scheduler on my local machine.

       

      NOTE: The data sources I'm using in my dashboard are NOT published to Tableau Server, and I'd prefer to keep it that way. Instead, I want to be able to automate the process I've been doing manually for the past week within Tableau Desktop. The process involves opening the dashboard I have published on Tableau Server, clicking "Data" and then "Refresh All Extracts." Once the data sources are refreshed, I then click "Server," "Publish Workbook," and re-publish the newly refreshed dashboard back up to the server. Does anyone know how I could automate this whole process from my local machine, perhaps by using a command-line utility or batch process?

        • 1. Re: Schedule Push of Data Refresh to Tableau Server
          Aaron Clancy

          Due to the fact that your Tableau Server has no connectivity to your Data source you might have to write some custom code to get around this.

          One scenario that might work is if you write a program that creates a CSV of the data that needs to be added to your current extract.  Make sure your current extract is a Tableau Data Source.

          Use the Extract Command-line Utility to "Add File to Extract" on Tableau Server

          Tableau Data Extract Command-Line Utility

          Schedule the job in Windows Task Manager

          You'll also want to manually do a full refresh every now and then.


          FYI this is hacky.

           

          You should figure out why your local machine has access to your data source but your Tableau Server doesn't. 

          This is not a very common scenario.

          If you can get your Tableau Server access to your Data Source then you won't have to worry about custom coding and managing scripting schedules.

          • 2. Re: Schedule Push of Data Refresh to Tableau Server
            Derek Holland

            Hi Ian - sorry I do not have an answer for you - we are faced with a dmiilar situation and I was wondering if you found a solution yet? We would really appreciate any insight you might have - Thanks

            • 3. Re: Schedule Push of Data Refresh to Tableau Server
              Ian Conlon

              Sadly, no. I'm still looking into the issue, and if I managed to find a solution, I'll let you know.

              • 4. Re: Schedule Push of Data Refresh to Tableau Server
                Jason Scarlett

                You could look into AutoHotKey. I've used it to automate/simulate keystrokes for other purposes. One feature that I have used is the ability to trigger keystrokes based on the window title (works well for login/passwords that don't change). I think your biggest challenge will be the timing.

                • 5. Re: Schedule Push of Data Refresh to Tableau Server
                  Toby Erkson

                  Ian Conlon wrote:

                  ...

                  NOTE: The data sources I'm using in my dashboard are NOT published to Tableau Server, and I'd prefer to keep it that way. Instead, I want to be able to automate the process I've been doing manually for the past week within Tableau Desktop. The process involves opening the dashboard I have published on Tableau Server, clicking "Data" and then "Refresh All Extracts." Once the data sources are refreshed, I then click "Server," "Publish Workbook," and re-publish the newly refreshed dashboard back up to the server. Does anyone know how I could automate this whole process from my local machine, perhaps by using a command-line utility or batch process?

                  First, I agree with Aaron's suggestions.


                  Second, why not have the data source available on the Tableau Server?  You can lock it down with permissions.  Then you could Embed Credentials in the publish workbook, using your credentials of course.  Schedule it as an extract and done.

                   

                  Third, regarding the bold text above, is the workbook on your desktop or do you actually go to the Tableau Server, download the workbook, and then update your data?  Because that's how it reads to me and, if so, that's several steps you could remove as they're not necessary.

                   

                  Fourth, there is no SDK for Tableau Server/Desktop so coding what you want would be rather difficult in my opinion.

                  • 6. Re: Schedule Push of Data Refresh to Tableau Server
                    Ian Conlon

                    Thanks for all the feedback. I would follow Aaron's advice, but (a) the data extracts are not currently published on Tableau Server (and thus TDE is not an option) and (b) the credentials used to access the underlying SQL tables are different from those used to log in to Tableau Server (authentication mismatch). I use Windows authentication on my local machine to access the SQL tables, but Tableau Server uses an explicit and different user/pass combo. I'm not sure TDE could handle that mismatch, but correct me if I'm wrong.

                     

                    As for why I don't have the data on Tableau Server, it's because our IT department doesn't want the data to be stored as an extract there. That said, I realize that by having the dashboard published to Server, the data are, at least in some sense, already there. I think it's more just a matter of not having the actual files on the server, as opposed to the packaged workbook, though I'm not sure how those are all that different.

                     

                    Regarding the bold text, yes, the dashboard are published on the server already. I open Tableau, then open the published dashboard, enter my Tableau credentials, refresh the data source, and then re-publish. Are you saying that by storing the data extracts on Tableau Server, I could cut out several of these steps?

                     

                    Thanks again for the thoughtful ideas.

                    • 7. Re: Schedule Push of Data Refresh to Tableau Server
                      Toby Erkson

                      These are the only command-line switches that I'm aware of:  Tableau Command-Line Parameters.  Don't get your hopes up with this route.

                      • 8. Re: Re: Schedule Push of Data Refresh to Tableau Server
                        Toby Erkson

                        Uhg...IT!  IT, in the general sense with which I'm very familiar with, is highly uneducated when it comes to business intelligence, especially reporting.  Try to educate them that what you would be "storing" is a concentrated sub-set of the necessary data -- and nothing more! -- to produce the dashboard.  Tableau Server is not some glorified file store, it's a business intelligence reporting environment.  If the company uses Cognos, Business Objects, Tibco reporting products, etc. then what you're requesting is no different!

                         

                        Okay, off my soap box   IT treating BI as the red-headed stepchild is a huge pet-peeve o' mine

                         

                        Yes, if you save your report on the server and you allow it to have Embedded Credentials -- there will be that option for EACH data source your report uses -- it will perform the extracts for them regardless of your Tableau Server login credentials.