5 Replies Latest reply on Dec 21, 2015 2:23 PM by Trung Nguyen

    Tde from tds

    Artem Liman

      Hi,

       

      Is there a way to generate data extract file (tde) from the given data source file (tds) w/o manually parsing its structure?

      Basically I want  to do the same things pragmatically that you can do manually from Tableau Desktop:  Data -> Extract data - specify row count and create tde

      If there is no such possibility, then what would I basically need to include into tde file in order it can be used in tds file that contains several joint tables. Should I just add output from every table used in data source and add it using Extrat.AddTable?

      What makes me wander is that when I manually create tde file from Tableau Desktop menu, the query that is fired against the database is the one that includes all columns from all tables in data source configuration using joins . So that it doesn't seem Tableau adds every table separately, but rather as one big resultset, Or, this big resultset is later being split into the pieces for every table?

       

      Thoughts?

       

      Thanks

      Artem

        • 1. Re: Tde from tds
          Jonathan Drummey

          When you generate a TDE, Tableau generates the big query against the data source, returns all the data to Tableau, and then that data is compressed and indexed in a columnar data store - essentially one big table. My understanding is that this process is the same whether you are using Tableau Desktop, Tableau Server, or the extract API: Tableau Data Extract API

           

          I'm not sure what you mean by "using Extrat.AddTable", we can incrementally add rows to an extract, but not columns. If we add columns to an extract, Tableau has to regenerate the entire extract. I know that when the Extract API first came out, it did not support incrementally adding rows, I'm not sure if that's possible now.

           

          The TDS file doesn't contain any data, it's a Tableau-defined XML file specifying the connection information for the data source and metadata such as renamed fields, etc. I haven't heard of any Tableau-provided code for parsing a TDS, so you'd have to parse that yourself or just build the query in your code before running the Extract API to generate the TDE. Given that the TDS format is undocumented (as far as I know), I'd expect you'd be better off writing your own code.

           

          Jonathan

          • 2. Re: Tde from tds
            Artem Liman

            Hi,

             

            Sorry to not make it clear. I am using Tableau Extract API and also want to use c# wrapper written by scott.steesy in order to generate tde file programmatically. Eventually such file should be used as locally cached datasource for the report while designing it and then switch to a live data after publishing.

            We also have tds file that we programmatically generate against database schema and that contains, as you correctly mentioned, data source information (tables, relations, columns, captions etc) , also it contains connection information for live data as well as name of the data extract file that can be used for a locally cached data.

            So, what we want to do is along with tds file also generate tde file based on tds. So, I just curious is there mechanism to do that programmatically w/o writing our custom tool that does that

            If that is not possible, next question would be to understand how to properly generate such tde file using Data Extractor API so that it can be used in tds - so that data is available for report.

            So, given we have following tables: A, A_B and B with their columns and configured in tds file, should it be enough to add those three tables using Data Extract API with columns and rows (this is supported for sure) , so that such file can be associated with tds file and, when opening it, local data will be available.

            As it was also mentioned, when creating data extract file manually using Tableau Desktop query that is being generated contains all columns and all tables that are configured in data source. So it is a single query returns all possible data. So, what Tableau does internally that can be reproduced programmatically in order to get the same resulting tde file? My assumption is that the big result is then split into a specific tables with their columns and each table is added using Extract.AddTable (from extract api), ot maybe it is stored as one massive result table and stored in tde

             

            Thanks

            Artem

            • 3. Re: Tde from tds
              Cristian Vasile

              Artem,

               

              Please check out  Ryan Robitaille's website

              Build Tableau Data Extracts out of CSV Files? More Python TDE API madness! | Ryan Robitaille

               

              Regards,

              Cristian.

              • 4. Re: Tde from tds
                Tableau kumar

                Just i am adding few words here.

                Data Extract Files (.tde)– Tableau data extract files have the .tde file extension and are marked with the extract icon. Extract files are a local copy of a subset or entire data source that you can use to share data, work offline, and improve database performance.

                 


                Data Connection Files(.tds) –Tableau data connection files have the .tds file extension and are marked with the data connection icon. Data connection files are shortcuts for quickly connecting to data sources that you use often.

                 

                 

                Tableau Viz: File Extension Types in TABLEAU

                1 of 1 people found this helpful
                • 5. Re: Tde from tds
                  Trung Nguyen

                  Hello Artem,

                   

                  I am facing the issue that I think you already solved.  I need to programatically generate tds file from a database schema.  I tried to find XML schema for tds file but I was not able to finding any.  If it is possible, could you share your code?

                   

                  Thanks,

                  Trung