3 Replies Latest reply on Aug 1, 2017 11:34 AM by Ben Neville

    Do I have to create an extract if connecting via SQL custom code?

    Tony Fahd

      Hello, i am connected to a workbook via SQL server. i have three customs queries. i am connected via extract. sometimes i have to change or modify the custom queries that i have. i would like to publish the workbook on the server.  initially when i created my custom sql codes and connected via extract, Tableau asked me to create an extract TDE file.

       

      1-do i still have to extract the data as the picture is showing anyway even though Tableau already created the TDE extract?

      2- do i also have to extract the data as the picture below is showing every time i  open my workbook and modify my SQL codes?

      3- every time i modify my custom SQL codes, i have to republish the workbook, correct?

       

      Thanks for the help

       

        • 1. Re: Do I have to create an extract if connecting via SQL custom code?
          Ben Neville

          Hi Tony - perhaps in this case it helps to understand a bit about file and connection types. A live connection is just what it says - a live connection to the database. An extracted connection is a snapshot of your data at whatever point in time it was taken.

           

          If you have custom sql and want to publish either a workbook or data source to Tableau Server, you have the option for extract or live. You shouldn't be forced to choose one. An extract is always more performant, but if you have custom SQL that does something like check the current day and do some action based upon that, you will either want to extract daily (so that this part of the query computes correctly every day) or a live connection.

           

          If you change the custom sql and you're using a live connection - just republish the workbook and you should be good to go. If you do the same but you're using an extract, when you toggle back to one of the sheets, Tableau should automatically regenerate the extract (or it will flip the connection to live) as it knows the old extract is no longer valid since the connection has changed.

           

          Hope that helps.

          • 2. Re: Do I have to create an extract if connecting via SQL custom code?
            Tony Fahd

            Thanks Ben that helps a lot. one question, as you mentioned every time i change my custom SQL code and toggle back to one of the sheets, Tableau will automatically regenerate the extract. do i have to go to the data source and Extract the data as the picture below is showing? when i originally created the workbook and created the custom SQL code, i connected via Extract and not live and when I toggled to one of the sheet, Tableau asked me to create the extract so I did and saved it as TDE file. dis i still have to go to the data source and extract the data as the picture is showing?

             

            • 3. Re: Do I have to create an extract if connecting via SQL custom code?
              Ben Neville

              If it regenerates the extract you do not need to go this route. In the above screenshot it doesn't seem like it has regenerated the extract, however, or Use Extract would not be greyed out. My suggestion would be to adjust your SQL and stay on the Data Source page. Just adjust the radio button at the top to be extract instead of live, and you should be good to go. As soon as you toggle back to a worksheet it will generate this on its own.