13 Replies Latest reply on Jun 14, 2017 10:58 AM by Ranadheer Kovvuri Branched to a new discussion.

    Automatic Data Refresh

    Jai Gopinathan

      I have a question in regards to automatic data refresh. I want the tableau server URL to refresh every 15 seconds without any one hitting F5. I have a live connection to an operational database that updates every second.  Can this be done tableau server? I researched on the knowledge forums but could not get a conclusive answer. Is there any workarounds or command line function to automatically refresh the server URL? If this can be achieved using tableau desktop, I am open to that option as well. Please let me know. Thanks, Jai

        • 1. Re: Automatic Data Refresh
          Jai Gopinathan

          Found a workaround to use IE plugin to do auto refresh every 15 seconds. But would appreciate this feature in tableau server.

          • 2. Re: Automatic Data Refresh

            Can you post inofrmation on the plugin? I have similar auto refresh requirements.

            • 3. Re: Automatic Data Refresh
              Jai Gopinathan

              IE plugin is Autorefresher for IE - just google it.

               

              But the problem is the auto refresher will not refresh the data for you, because the data is snapshoted in the server and and your server time out is the within tableau server and determines rate at which the data gets refreshed. So you may have to reset server timeout in tableau server. Lets assume you set the server to timeout 10 sec , again that will pose a problem if you have a lot of users and for every 10 sec they click on something the data gets refreshed unnecessarily and not so diserable.

               

               

              But these are the steps that will get you there without the plugin..

               

               

              1 - Create a web page with an embedded view using the provided embedded view URL. You may also choose to add a '.png' to the end of the embedded URL to embed a PNG image of the view if no interactivity is required (may speed up refresh load times)

               

              2 - Then include a 'meta refresh' tag to the web page to refresh on schedule (http://en.wikipedia.org/wiki/Meta_refresh)

               

              3 - Set the session timeout of Tableau Server (vizqlserver.session.expiry.

              timeout) to be less than the meta refresh so that the data gets renewed each time the view is requested. Refer to Page 99 of the Tableau Server Administrator Guide (http://downloads.tableausoftware.com/quickstart/server-guides/server_admin6.1.pdf)

               

              The one caveat is that setting the session timeout will affect all users who connect to the Tableau Server, which could become problematic. Tableau Server must also be configured to use Microsoft SSPI (automatic login based on Active Directory authentication) so that the view can be automatically authenticated upon refresh since each refresh will be a new session.

               

              --

              However i followed a different approach of using javascript to refresh every 10 seconds and used iframes to embed the png version of the view and everytime it loaded the iframe the data would have refreshed as it initiated a new session every 10 seconds. I did not change any server timeout but still was able to achieve the functionality.

              • 4. Re: Automatic Data Refresh
                Bob Nims

                Jai can you please share your iframe javascript solution.  The code would be very helpful to me on a project I am currently working on.  If you would prefer you can email me at bob.nims@faa.gov

                • 5. Re: Automatic Data Refresh
                  Jai Gopinathan

                  For benefit of all.. here is the sample

                  ---

                  • 6. Re: Automatic Data Refresh
                    Bob Nims

                    Thanks Jai.  Much appreciated!

                    • 7. Re: Automatic Data Refresh
                      Ross Bunker

                      Hi Jai,

                      A quick note here.  There is also a setting in tableau server to control how often it refreshes its cached data.  You can set this in tabconfig (instructions are on page 14 of the 7.0 admin guide, though this also applies to earlier installations of tableau server).

                      If you set this to Refresh More Often, then every time you refresh your browser (via F5 or the nifty IE plugin), you'll see the latest data (note that there is a bug in 7.0 that this isn't working properly.  Fixed in the upcoming service release).

                      The benefit of this compared to session expiry is that you don't lose your session and all its changes.  you'll just see newer data.

                      This also does affect all users, but not as significantly as setting session expiration.  someday we'll also perhaps have more control over this and be able to set caching behavior for particular workbooks.  and i also hear you on the call for an auto-refresh ability in the web page itself.  That would be a very useful feature.

                       

                      regards,

                      : )ross

                       

                      Ross Bunker

                      Senior Software Engineer

                      Tableau Software

                      • 8. Re: Automatic Data Refresh
                        Jai Gopinathan

                        Thanks for the reply Ross.

                         

                        The only issue i have with that approach as you have outlined already, there are workbooks that are static for a month and there are dashboards that require latest data every few seconds. In our case we require the dashboard to be refreshed every 5 seconds, we are trying to simulate real time dahboard. Also the user base for our server is in hundereds and i dont want the data set being refreshed for those users who are viewing static monthly reports. But your suggestion of having dashboard specific refresh rates would be awesome!

                        • 9. Re: Automatic Data Refresh
                          Ross Bunker

                          Hi Jai,

                          Totally understand that position.  Hopefully we'll be able to provide the better solution of workbook specific (probably not dashboard specific) refresh intervals in a future release.

                          I wanted to point out the cache settings as an alternative to the session expiration solution you gave above.  I think having higher refresh intervals is a lower impact to other users than doing shorter session expiration.

                          That said, the best current solution is have users push the 'refresh data' button directly in the tableau toolbar.  This will refresh data only for them.  But it is a manual step.  Another option that might fit in here is something like greasemonkey or another plugin that will let you automate browser events like 'push the refresh data button'.

                          Again, these are stopgap solutions until we provide something better.

                           

                          regards,

                          : )ross

                          • 10. Re: Automatic Data Refresh
                            John Munoz

                            My knowledge of JavaScript is about zero. My knowledge of Tableau is a little more than that. I do know that Tableau and Javascript can dance together now.

                             

                            As a workaround, how about this:

                             

                            javascript - How to reload page every 5 second? - Stack Overflow

                            • 11. Re: Automatic Data Refresh
                              Robby Cunningham

                              Hi, everyone - this thread is a few years old, so I am hoping the issue has been resolved somehow in Tableau by now. I am on version 10.1 and have a workbook online that needs to be refreshed whenever people hit it. Have not tried any of the java suggestions yet, but thought I'd try and see if there's a better alternative.

                               

                              Thanks!

                              RobbyC

                              • 12. Re: Automatic Data Refresh
                                Robby Cunningham

                                Hi, Ross -

                                 

                                I also posed this to the group, but saw this thread, which is now a few years old, so I am hoping the issue has been resolved somehow in Tableau by now. I am on version 10.1 and have a workbook online that needs to be refreshed whenever people hit it. Have not tried any of the java suggestions yet, but thought I'd try and see if there's a better alternative.

                                 

                                Please let me know.

                                 

                                Thanks!

                                RobbyC