Skip to content

Microsoft SQL Server Data Source Connections

Here is a programmatic example of a Microsoft SQL Server connection.

CREATE DATACONNECTION sqlserver_connection CXNPROPERTIES
(
  'connection_type'='JDBC',
  'jdbc_driver'='sqlserver',
  'host'='<host>',
  'port'='<port, typically 1433>',
  'user_key'='awssm://my-username>',
  'password_key'='awssm://<my-password>',
  'jdbc.db.name'='<database to connect to>',
  'jdbc.schema.name'='<schema to connect to>'
);

Enable Query Pushdown

To enable transparent query pushdown, add sqlserver to the list of enabled engines in the OKERA_CTE_REWRITE_ENABLED_ENGINES configuration setting. Multiple engines can be enabled (in addition to the ones enabled by default) by providing them as comma-separated values in this configuration setting.

For example:

OKERA_CTE_REWRITE_ENABLED_ENGINES: dremio:direct,redshift,sqlserver