A SQL connection to the Common Data Service’s Tabular Data Stream (TDS) endpoint is now available allowing you to execute SQL queries against the entity tables.
Enabling the TDS endpoint
This feature is still in preview and is not available in all regions and should not be used in production as it still subject to breaking changes.
The CDS environment must be version 18.104.22.16837 or above.
Open the Power Platform admin center, select your environment and click Settings.
Click on Product and then click on Features.
Set Enable TDS endpoint to On and click Save.
Querying CDS with SQL
Open SQL Server Management Studio and click Connect. Enter your CDS environment URL followed by the port number 5558. Set the authentication to Azure Active Directory and enter your username and password. Click Connect.
You should be able to view and query the CDS tables.
The supported SQL operations include:
- Batch operations
- Aggregation functions (i.e., Count() and Max() functions)
- UNIONs and JOINs
INSERT and UPDATE operations will not work as the SQL connection is read-only.
The following CDS data types are not supported when using the SQL connection: