DataSources object (TMSL)
Applies to: SQL Server 2016 and later Analysis Services Azure Analysis Services Power BI Premium
Defines a connection to a datasource used by the model either during import to add data to the model, or in pass through queries via DirectQuery mode. models in DirectQuery mode can only have one DataSource object.
How the DataSource object is defined in a model is determined by compatibility level:
- Tabular 1200 and lower models define a Provider object type.
- Tabular 1400 and higher models typically define a Structured object type, however, Provider object type is also supported.
Unless you are creating, replacing, or altering the datasource object itself, any datasource referenced in your script (such as in partition script) must be an existing DataSource object in your model.
A DataSource object is a property of a model, but can also be specified as a property of a Database object given the one-to-one mapping between model and Database. Partitions based on SQL queries also specify a DataSource, only with a reduced set of properties.
When creating, replacing, or altering a datasource object, specify all read-write properties of the object definition. Omission of a read-write property is considered a deletion.
Common properties for the DataSource Object are described in the [MS-SSAS-T]: SQL Server Analysis Services Tabular Protocol.
The JSON schema representation of a datasource object is defined in dataSource object in the [MS-SSAS-T]: SQL Server Analysis Services Tabular Protocol.