Get Data Source Information


Note: This is the developer preview release of the VizQL Data Service. This release is intended to offer developers early access to unreleased features.

🕐 2 min read

Find the data source name

To run a query, you must know the name of the data source you’re requesting information about. For example, the Tableau UI refers to the Superstore Datasource. But the official name accepted by VizQL Data Service is SuperstoreDatasource.

There are two options for finding the data source name.

Option 1: Get the name from the URL when editing the data source

Select the Edit Data Source button. A new tab displays with the Datasource name in the URL. For example:

https://10ax.online.tableau.com/t/<site_name>/editDatasource/<luid>/<DATASOURCE_NAME>#1

Option 2: Use the Tableau REST API

Use the Query Data Sources method to return a list of datasources on your site. This method returns the official data source name in the contentURL attribute.

Get the data structure in the data source

To write a VizQL Data Service query, you must choose a data source and know the name of fields in it. The ReadMetadata method returns all of the data for a given published data source. This method requires that you pass in the connection object, as shown in the following example.

{
 "connection": {
   "tableauServerName": "",
   "siteId": "",
   "datasource": ""
 }
}