Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieving embedded datasource's custom SQL with Tableau API

Tags:

tableau-api

I'm trying to use Tableau's APIs (Metadata GraphQL and REST) to get information about workbook's embedded datasources.

A workbook has embedded datasources, and there's no issue retrieving that info, the problem occurs when an embedded datasource has extracts which are performed using a custom SQL.

Has anyone been able to retrieve the link between the embedded datasource and the custom SQL that creates it? Either GraphQL or REST API is fine.

Thanks!

like image 466
Itay Bleier Avatar asked Jun 18 '26 13:06

Itay Bleier


1 Answers

Below query might be useful. It's worth adding a filter to the data source level. I have the experience that MetaData Api doesn't able to capture the content of all Custom Queries. I'm not sure why.

query EmbeddedDS{
  embeddedDatasources{
      DSname: name
      fields{
        fieldName: name
         ...on ColumnField{
          columns{
            table{
              ...on CustomSQLTable{
                CustomSQL: name
                query
              }
            }
          }
        }
      }
    }
  }
like image 149
sari paisley Avatar answered Jun 23 '26 14:06

sari paisley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!