1 2 Previous Next 15 Replies Latest reply on Aug 17, 2018 3:52 AM by naresh.suglani.0

    Data sources linking to temporary files EVERY TIME

    Tj Claridge

      Hi,

       

      I'm having an extremely annoying issue that keeps coming up and burning significant time to fix. I have one data source, excel file, which has been duplicated in the data sources tray. Each of these data sources have an extract that have specific filters applied to them.

       

      The issue : Every time I open my Tableau worksheet, these data source connections are to the temporary file. So when I have updated data it is not reflected in my dashboard. Editing the connection to use the correct file (not the temp file) removes all filters from the extract and rebuilds the extract without the filters. I then need to delete each extract, rebuild the extracts with the filters applied, save the workbook, and upload to the server. Tomorrow.... I will do this again.

       

      What am I doing wrong that makes the workbook always revert to the temp file as the connection and forcing me to do all this work?

       

      Thanks in advance,

      TJ

        • 1. Re: Data sources linking to temporary files EVERY TIME
          Andy Harris

          Hi TJ,

           

          Make sure that the source data connections contain the full path details of the file location and not the windows mapped details. e.g. instead of something like G:\reports\headcount\may2012.xls use \\yourservername\\reports\headcount\may2012.xls

           

          That should then be retained as the file location the next time you open it up.

           

          Andy

          • 2. Re: Data sources linking to temporary files EVERY TIME
            Tj Claridge

            Thanks for the reply Andy.

             

            I'm bouncing this off support to see what I'm doing wrong. I'll update this post once I've been properly educated.

            • 3. Re: Data sources linking to temporary files EVERY TIME
              Jonathan Drummey

              Hi TJ,

               

              Did you ever get a response from support?

               

              Jonathan

              • 4. Re: Data sources linking to temporary files EVERY TIME
                Tj Claridge

                Hey Jonathan,

                 

                Thanks for the reminder. Just got over a reporting hump... Yep I did reach out to CS. After a few email contacts, we were able to nail this down.

                 

                The short version is that the excel file is open when Tableau is closed and workbook is saved. Since Tableau uses a ghost copy of the file to avoid the file lock from excel (http://kb.tableausoftware.com/articles/knowledgebase/resolving-update-problem-excel-data) the action of closing Tableau with the connection source open caused the workbook to be saved with the temporary file connection, not the original file connection.

                 

                This doesn't happen in every case but saving and closing the excel worksheet before closing Tableau has seemed to fix the issue. Just make sure that any connected data source is not currently opened/accessed while you are closing and saving the workbook within Tableau.

                • 5. Re: Data sources linking to temporary files EVERY TIME
                  Steven Drenker

                  I have the exact same problem. Here's my use case:

                  1. I extract data from Oracle via Discoverer and save as a xls file

                  2. I launch Excel and run a VBA program to process the data and append it to the master file to which Tableau connects. The program appends the new data and deletes the old data in the master file. The master file is saved and Excel is closed.

                  3. Every time I open Tableau, the connection is to the "ghost copy" located at C:\Users\[username]\AppData\Local\Temp\[alphanumeric ID string]\Data.

                   

                  With Excel NOT running:

                  4. Fix the connection in Tableau to point to the real data file.

                  5. Save the Tableau file.

                  6. Close the Tableau file. Quit Tableau.

                  7. Relaunch Tableau and open the Tableau workbook.

                  8. It ALWAYS is pointing to the \AppData\Local\Temp\ location.

                   

                  This is extremely frustrating. Help!


                  Steve

                  • 6. Re: Data sources linking to temporary files EVERY TIME
                    Steven Drenker

                    TJ, the tip "Temporary (Temp, Tmp) Directory issues and solution" seems to have solved the problem for me. See http://community.tableau.com/message/164411#164411

                    2 of 2 people found this helpful
                    • 7. Re: Data sources linking to temporary files EVERY TIME
                      Tj Claridge

                      Hey Steven... Thanks for the link.

                       

                      I also ran across this post as I was digging around for my own solution. My issue wasn't with saving or opening... so it differed slightly from your link.

                       

                      But to note, I'm also not using Win7 yet but will be moving over soon. This issue may just rear its ugly head once more.

                      • 8. Re: Data sources linking to temporary files EVERY TIME
                        Tj Claridge

                        Ok. I found another issue that is along this thread -- http://community.tableau.com/thread/119111

                         

                        I started having issues again after upgrading to a new PC with the sources being linked to temporary locations and forcing me to go through this headache again.

                         

                        If you are having the issue where your connection to the data source keeps appearing to be in a Temp folder, check how you are saving your workbook. Make sure you are saving as a Tableau Workbook (*.twb) and not a packaged workbook (*.twbx). Making this change seems to have fixed my problem.

                        3 of 3 people found this helpful
                        • 9. Re: Data sources linking to temporary files EVERY TIME
                          John Broberg

                          I just suffered a similar issue.  The fix was fairly simple. In Windows Explorer, I deleted my old extract (which was a .xlsx file).  Then, I reran the query and export to generate a new extract (instead of letting the export overwrite the old extract).  This somehow told Tableau that the file is no longer open, and can be connected to freely.

                           

                          This seems to be a frequently frustrating and annoying bug that has yet to be fixed.

                          • 10. Re: Data sources linking to temporary files EVERY TIME
                            David Hwaszcz

                            Your connecting to the temp file so... You need to edit your data source connection.  To resolve the issue while using Tableau Desktop and a .twbx file:

                             

                            1. Click on "Data Source"

                            2. Right-click the connection

                            3. Choose "Edit connection..."

                            4. Navigate from the temp file, to the actual file you want to utilize

                            • 11. Re: Data sources linking to temporary files EVERY TIME
                              Bagiyaraj Natarajan

                              Thank you all for the suggestions.

                               

                              This is frustrating. I have the same problem.

                               

                              I tried all the suggestion provided in this thread. My local copy of work book (.twb) still points to the location where my raw data is located. But Once I publish, the data connection changes  to \AppData\Local\Temp\TableauTemp\4277811602\Data\Data Sources. I had to reconnect to the excel sheet and re-publish the workbook everyone I update the new data. Any other suggestions?. This is annoying.

                              • 12. Re: Data sources linking to temporary files EVERY TIME
                                Peter Fakan

                                Hi TJ,

                                 

                                My go-to reference for extracts is O Extract, Where Art Thou? | Drawing with Numbers but that's a really interesting point about having excel open or closed affecting the data connection.

                                 

                                Wondering if Jonathan Drummey might want to update the post ;P

                                 

                                Peter

                                • 13. Re: Data sources linking to temporary files EVERY TIME
                                  Jonathan Drummey

                                  Hi Peter,

                                   

                                  Thanks for the compliment! I'd like to point out that this is a 6 year old thread...if someone documents that the behavior is happening today then I'd be glad to update my post, but without that I'm not going to assume that the behavior still exists given the number of releases of Tableau since then.

                                   

                                  Jonathan

                                  • 14. Re: Data sources linking to temporary files EVERY TIME
                                    Jonathan Drummey

                                    Hi Bagiyaraj,

                                     

                                    I'm 99% sure you're actually describing a different situation, the key variable here is that you're publishing the workbook and that creates a different version of the workbook - there's your local workbook and the one published to Server.

                                     

                                    When a Tableau workbook is published using a connection to an Excel file then Tableau Server/Online has to be able to access that file. Tableau's default behavior is "Include External Files" which means that the Excel file will be included in what is published to Tableau Server/Online. So there are now two copies of the Excel file, the original local one and the one copied to Tableau Server/Online. Then when you download the workbook to edit it Tableau downloads a .twbx that includes the workbook *and* the Excel file, and that Excel file is placed in the \AppData\Local... folder structure. That's the situation that I'm pretty sure is happening to you.

                                     

                                    There are a few solutions to this:

                                     

                                    1) Instead of publishing the workbook with Include External Files checked, publish it with Include External Files unchecked. There are two challenges here. a) Tableau Server has to be able to reach that file location, depending on how your organization has configured Tableau Server that might be difficult. b) Unlike settings like the workbook name and project Tableau does not "remember" the Include External Files setting so you'll need to re-uncheck it every time you publish the workbook. Tableau Online is a little different, you'd need to use Tableau Bridge there. Expand Data Freshness Options by Using Tableau Bridge

                                     

                                    2) Separate the workbook from the data by using a Published Data Source. You can publish the Excel file as a data source and then connect to the data source in the workbook (newer versions of Tableau will let you do this when you publish the workbook). Then whenever you download the workbook from Tableau you'll get a .twb file that includes the workbook that points to the published data source. You can configure the published data source to be static (by using the default Include External Files setting) and in that case updating the published data source is a matter of republishing the Excel file. You can also make it a live connection by turning off the Include External Files setting, and in that case you'd need to make sure that Tableau Server can access the file as I mentioned in #1 above.

                                     

                                    3) If your Excel file is stored on Box, Dropbox, or OneDrive you can also consider using those connectors instead of a connection to a local file. In that case you'd avoid most issues with Tableau Server/Online being unable to access the files, however for at least some of those connectors you'd be using an Extract connection and would need to set up an extract refresh schedule to keep the data up to date.

                                     

                                    Regards,

                                     

                                    Jonathan

                                    1 2 Previous Next