🕐 2 min read
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.
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
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.
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": ""
}
}