Selecting Datasets
The following sections show how to execute SELECT statements to your Tableau CRM datasets or lenses. See Data Model for information on how the cmdlet models datasets as tables and lenses as views.
Selecting Datasets
Reference the table name of a dataset by adding "Dataset_" as a prefix to the dataset name, as in the following query:
SELECT Id, Name, Item, Quantity, Amount FROM DataSet_Test WHERE Amount = 50The following query assumes that the dataset has the column names Id, Name, Quantity, and Amount. The dataset may have more columns than what were selected and they can be in any order.
Selecting Lenses
*Note: The Lenses that generate a Compact-Form query, are not supported at this time due to some API restrictions and will not be included in table listing. In order to make them work, currently we have this workaround as solution.
- From your dashboard choose LENSES
- Open the LENS which is not working and go to "SAQL Mode"
- Make a minor update (i.e: a white space in the end of the query)
- Save the LENS and wait some seconds for the changes to by applied
- After that you should be able to query that LENS
Reference the table name of a lens by adding "Lens_" as a prefix to the lens name, as in the following query.
SELECT Id, Name, Item, Quantity, Amount FROM Lens_Test WHERE Amount = 50The query above assumes that the lens has the column names Id, Name, Quantity, and Amount. The lens may have more columns than what were selected and they can be in any order.