Starburst Synapse connector#
The Synapse connector allows querying an external Azure Synapse SQL database in Starburst Enterprise platform (SEP).
Requirements#
To connect to Azure Synapse SQL, you need:
Network access from the coordinator and workers to Synapse. Port 1433 is the default port.
A valid Starburst Enterprise license.
Configuration#
The connector can query a single database on a single instance of Synapse.
Create a catalog properties file that specifies the Synapse connector by setting
the connector.name
to synapse
.
For example, to access a database as mysynapsedb
, create the file
etc/catalog/mysynapsedb.properties
. Replace the connection properties as
appropriate for your setup:
connector.name=synapse
connection-url=jdbc:sqlserver://<host>:<port>;database=<database>
connection-user=root
connection-password=secret
This basic configuration can be used for both dedicated and serverless pools. The connection URL parameter uses the SQL Server JDBC driver connection string syntax.
Type mapping#
Because SEP and Synapse each support types that the other does not, this connector modifies some types when reading or writing data.
Synapse to SEP read type mapping#
The following read type mapping applies when data is read from existing tables in Synapse, or inserted into existing tables in Synapse from SEP.
Synapse type |
SEP type |
Notes |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
No other types are supported.
SEP to Synapse write type mapping#
The following write type mapping applies when tables are created in Synapse from SEP.
SEP type |
Synapse type |
Notes |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
General configuration properties#
The following properties can be used to configure how data types from the connected data source are mapped to Trino data types and how the metadata is cached in Trino.
Property name |
Description |
Default value |
---|---|---|
|
Configure how unsupported column data types are handled:
The respective catalog session property is |
|
|
Allow forced mapping of comma separated lists of data types to convert to
unbounded |
|
|
Support case insensitive database and collection names |
False |
|
1 minute |
|
|
Duration for which metadata, including table and column statistics, is cached |
0 (disabled caching) |
|
Cache the fact that metadata, including table and column statistics, is not available |
False |
SQL support#
The connector provides read and write access to data and metadata in the Synapse database. In addition to the globally available and read operation statements, the connector supports the following features:
CREATE TABLE, see also Creating tables
CREATE TABLE AS, see also Creating tables
SQL DELETE#
If a WHERE
clause is specified, the DELETE
operation only works if the
predicate in the clause can be fully pushed down to the data source.
Creating tables#
Synapse-native table structure and table distribution options
for CREATE TABLE
are not supported.
Performance#
The connector includes a number of performance-enhancing features, detailed in the following sections.
Table statistics#
The Synapse SQL connector supports table and column statistics to improve query processing performance based on the actual data in the data source.
Table statistics are enabled by default in Synapse SQL.
The connector can retrieve and use information stored in single-column statistics. Synapse can automatically create column statistics for certain columns. If column statistics were not created automatically for a certain column, you can create them by executing the following statement in Synapse SQL:
CREATE STATISTICS my_statistics_name ON table_schema.table_name (column_name);
Synapse SQL routinely updates the statistics as long as the
AUTO_CREATE_STATISTICS
option is set to ON
in Synapse SQL. In some
cases, you may want to force statistics update (e.g. after defining new column
statistics or after changing data in the table). You can do that by executing
the following statement in Synapse SQL:
UPDATE STATISTICS table_schema.table_name(stat_name);
Dynamic filtering#
Dynamic filtering is enabled by default. It causes the connector to wait for dynamic filtering to complete before starting a JDBC query.
You can disable dynamic filtering by setting the property
dynamic-filtering.enabled
in your catalog properties file to false
.
Pushdown#
The connector supports pushdown for a number of operations:
Aggregate pushdown for the following functions:
avg(bigint)()
avg(float)()
avg(decimal)()
count(column)()
variance()
andvar_samp()
Starburst Cached Views#
The connectors supports table scan redirection to improve performance and reduce load on the data source.
Security#
The connector includes a number of security-related features, detailed in the following sections.
Active Directory password authentication#
The connector supports Active Directory password authentication. To enable it, edit the catalog properties file to include the authentication type and specify user and password added to AD service associated with Synapse instance:
connection-user=active-directory-user
connection-password=active-directory-user-password
synapse.authentication.type=ACTIVE_DIRECTORY_PASSWORD
User impersonation#
The Synapse SQL connector supports user impersonation.
User impersonation can be enabled in the catalog file:
synapse.impersonation.enabled=true
User impersonation in the Synapse connector is based on EXECUTE AS USER
.
Password credential pass-through#
The connector supports password credential pass-through. To enable it, edit the catalog properties file to include the authentication type:
synapse.authentication.type=PASSWORD_PASS_THROUGH
Use the ACTIVE_DIRECTORY_PASSWORD_PASS_THROUGH
authentication type to enable
password pass-through for Active Directory password authentication:
synapse.authentication.type=ACTIVE_DIRECTORY_PASSWORD_PASS_THROUGH
For more information about configurations and limitations, see Password credential pass-through.
Limitations#
Transact-SQL and associated features are not supported.