Knowledge Hub Technologies SQL Server
Microsoft SQL Server

On-premises SQL Server 2016 and later, Amazon RDS for SQL Server, and Azure SQL Database / SQL Managed Instance. JDBC-based connectivity using the Microsoft JDBC Driver for SQL Server.

Connection Fields

FieldRequiredDefaultDescription
Display NameYesA human-readable label for this connection.
HostYesHostname or IP address of the SQL Server. For RDS or Azure SQL, use the provided endpoint.
PortYes1433SQL Server listener port. Default is 1433 for the default instance. Named instances may use a dynamic port — see Named Instances.
DatabaseYesThe default database to connect to.
UsernameYes*SQL Server login name. Not required when using Windows Authentication.
PasswordYes*SQL Server login password. Not required for Windows Authentication.
AuthenticationYesSQL_AUTHAuthentication method. See Authentication Methods.
Instance NameNoNamed instance (e.g., SQLEXPRESS). See Named Instances.
EncryptNotrueWhether to encrypt the JDBC connection. Defaults to true for the Microsoft JDBC driver version 10+.
Trust Server CertificateNofalseWhen true, skips server certificate validation. Use only for development environments with self-signed certificates.
Connection Timeout (s)No30Seconds before a connection attempt times out.
Additional JDBC ParametersNoOptional semicolon-separated key=value pairs appended to the JDBC URL.

Authentication Methods

MethodDescriptionWhen to Use
SQL_AUTH Standard SQL Server username and password login. Most common. Works for on-premises, RDS, and Azure SQL with SQL authentication enabled.
WINDOWS_AUTH Kerberos-based integrated Windows Authentication. No username/password in the connection form — identity comes from a Kerberos keytab configured on the Spark execution nodes. On-premises SQL Server in Active Directory environments. Requires Kerberos setup on all Spark executor nodes.
AAD_SERVICE_PRINCIPAL Azure Active Directory Service Principal. Requires Client ID, Client Secret, and Tenant ID fields. Azure SQL Database and SQL Managed Instance when using Azure AD authentication. Requires the mssql-jdbc driver version 10 or later.

Named Instances

SQL Server named instances (e.g., SERVER\SQLEXPRESS) do not use a fixed port. Instead, SQL Server Browser service dynamically assigns a port to each named instance.

To connect to a named instance in DataKnits:

  1. Ask your DBA for the static port number assigned to the named instance (found in SQL Server Configuration Manager).
  2. Enter the static port in the Port field.
  3. Enter the instance name (e.g., SQLEXPRESS) in the Instance Name field. DataKnits appends ;instanceName=SQLEXPRESS to the JDBC URL.
Dynamic port resolution via SQL Server Browser is not supported. Ensure the named instance has a static port assigned before creating the connection.

SSL / TLS

Microsoft JDBC Driver 10+ enables encryption by default. The relevant fields are Encrypt and Trust Server Certificate:

SSH Tunneling

When SQL Server is in a private subnet, DataKnits can route the JDBC connection through an SSH bastion host.

FieldRequiredDescription
SSH HostYesHostname or IP of the SSH bastion server.
SSH PortYesSSH port. Default: 22.
SSH UsernameYesLinux username on the bastion host.
SSH Private Key (PEM)Yes*PEM-encoded private key.
SSH PasswordYes*Bastion host password. Use only if a private key is not available.

Write Modes

ModeBehaviour
OverwriteTruncates the target table and inserts all incoming rows.
AppendInserts all incoming rows without modifying existing data.
Upsert (Merge)Generates a T-SQL MERGE INTO target USING source ON (key) WHEN MATCHED THEN UPDATE ... WHEN NOT MATCHED THEN INSERT ... statement.
Create if Not ExistsCreates the target table from the DataFrame schema if it does not exist, then appends data.

Known Limitations