Microsoft SQL Server
Adding and configuring Microsoft SQL Server connection within Qualytics empowers the platform to build a symbolic link with your database to perform operations like data discovery, visualization, reporting, syncing, profiling, scanning, anomaly surveillance, and more.
This documentation provides a step-by-step guide on adding Microsoft SQL Server as both a source and enrichment datastore in Qualytics. It covers the entire process, from initial connection setup to testing and finalizing the configuration.
By following these instructions, enterprises can ensure their Microsoft SQL Server environment is properly connected with Qualytics, unlocking the platform's potential to help you proactively manage your full data quality lifecycle.

Let’s get started 🚀
Microsoft SQL Server Setup Guide
Qualytics connects to Microsoft SQL Server through the Microsoft JDBC Driver for SQL Server. It queries sys.schemas joined with sys.database_principals to list the schemas the login can see, rather than the driver's generic metadata call, which can omit dbo depending on the driver version and the permissions in place. Tables, columns, and primary keys come from the standard JDBC metadata APIs.
Minimum SQL Server Permissions (Source Datastore)
| Permission | Purpose |
|---|---|
CONNECT |
Allow the user to connect to the database |
SELECT ON SCHEMA::<schema_name> |
Read data from all tables and views for profiling and scanning |
VIEW DEFINITION ON SCHEMA::<schema_name> |
Read object definitions for metadata discovery |
Schemas owned by a user or role you created
Schema discovery reads the schema list together with each schema's owner, and the permissions
above are enough for the common case: a login always sees the schemas owned by dbo, by another
built-in user, or by a built-in database role. A schema owned by a user or a role that you
created yourself is listed only when the connecting login can also see that owner.
So if a schema is missing from the Schema list, check who owns it. What opens it up depends on the kind of owner.
When a user you created owns it, one permission on that user is enough. Prefer this over
ALTER ANY USER, which also works but lets the login change any user in the database.
When a role you created owns it, a permission on the role is not enough: SQL Server shows
such a role only to its members and to logins holding ALTER ANY ROLE. Add the login to the
role instead.
Membership carries whatever the role itself grants, so check that first. If it hands over more
access than you want, transfer the schema to dbo instead, keeping in mind that transferring a
schema drops the permissions on any object inside it that has no explicit owner.
Additional Permissions for Enrichment Datastore
When using SQL Server as an enrichment datastore, the following additional permissions are required for Qualytics to write metadata tables (e.g., _qualytics_*):
| Permission | Purpose |
|---|---|
CREATE TABLE |
Create enrichment tables (_qualytics_*) |
INSERT ON SCHEMA::<schema_name> |
Write anomaly records, scan results, and check metrics |
UPDATE ON SCHEMA::<schema_name> |
Update enrichment records during rescans |
DELETE ON SCHEMA::<schema_name> |
Remove stale enrichment records |
ALTER ON SCHEMA::<schema_name> |
Modify enrichment table schemas during version migrations |
DROP TABLE |
Remove enrichment tables during cleanup or when the datastore is unlinked |
Example: Source Datastore User (Read-Only)
Replace <database_name>, <schema_name>, and <password> with your actual values.
-- Create a login at the server level
CREATE LOGIN qualytics_read WITH PASSWORD = '<password>';
-- Switch to the target database
USE <database_name>;
-- Create a user mapped to the login
CREATE USER qualytics_read FOR LOGIN qualytics_read;
-- Grant connection and read-only access
GRANT CONNECT TO qualytics_read;
GRANT SELECT ON SCHEMA::<schema_name> TO qualytics_read;
GRANT VIEW DEFINITION ON SCHEMA::<schema_name> TO qualytics_read;
Example: Enrichment Datastore User (Read-Write)
-- Create a login at the server level
CREATE LOGIN qualytics_readwrite WITH PASSWORD = '<password>';
-- Switch to the target database
USE <database_name>;
-- Create a user mapped to the login
CREATE USER qualytics_readwrite FOR LOGIN qualytics_readwrite;
-- Grant connection, read-write, and table management access
GRANT CONNECT TO qualytics_readwrite;
GRANT SELECT, INSERT, UPDATE, DELETE ON SCHEMA::<schema_name> TO qualytics_readwrite;
GRANT CREATE TABLE TO qualytics_readwrite;
GRANT ALTER ON SCHEMA::<schema_name> TO qualytics_readwrite;
GRANT VIEW DEFINITION ON SCHEMA::<schema_name> TO qualytics_readwrite;
Note
If using Service Principal authentication, ensure the Service Principal has been added as an external user in the database with the same permissions listed above. Use the Client ID, Client Secret, and Tenant ID from your Microsoft Entra ID app registration.
Note
Schema discovery leaves out INFORMATION_SCHEMA, sys, and any schema whose name starts with db_, so you do not need to restrict access to those by hand. The master, model, msdb, and tempdb system databases are left out too, so they never appear in the Database list.
Troubleshooting Common Errors
| Error | Likely Cause | Fix |
|---|---|---|
Login failed for user |
Incorrect username or password, or the login does not exist | Verify the login exists at the server level with SELECT name FROM sys.sql_logins |
Cannot open database requested by the login |
The user does not have access to the specified database | Ensure a user is mapped to the login in the target database with CREATE USER ... FOR LOGIN |
The SELECT permission was denied on object |
The user lacks SELECT on one or more tables in the schema |
Run GRANT SELECT ON SCHEMA::<schema_name> TO <user> |
CREATE TABLE permission denied in database |
The enrichment user lacks CREATE TABLE permission |
Run GRANT CREATE TABLE TO <user> |
Cannot find the object because it does not exist or you do not have permissions |
The user lacks VIEW DEFINITION on the schema |
Run GRANT VIEW DEFINITION ON SCHEMA::<schema_name> TO <user> |
Detailed Troubleshooting Notes
Authentication Errors
The error Login failed for user indicates that the credentials are incorrect or the login does not exist at the server level.
Common causes:
- Incorrect password: the password does not match the one set for the login.
- Login does not exist: the login was never created at the server level with
CREATE LOGIN. - User not mapped: the login exists but no user is mapped to it in the target database.
- Service Principal misconfiguration: when using Entra ID authentication, the Client ID, Client Secret, or Tenant ID is incorrect.
Note
SQL Server distinguishes between logins (server-level) and users (database-level). A login must exist at the server level, and a corresponding user must be created in each target database.
Permission Errors
The error The SELECT permission was denied on object means the user authenticated successfully but lacks the necessary grants on the target schema.
Common causes:
- Missing
SELECT ON SCHEMA: the user does not haveSELECTon the target schema. - Wrong schema: the user has permissions on
dbobut the target tables are in a different schema. - Missing
VIEW DEFINITION: the user cannot see the definitions of the tables and views inside the schema.
Connection Errors
The error Cannot open database requested by the login means the user does not have access to the specified database.
Common causes:
- No user in database: the login exists but
CREATE USER ... FOR LOGINwas not run in the target database. - Database does not exist: the database name in the connection form is incorrect.
- Database is offline: the target database is in a recovery or offline state.
Tip
Start by confirming credentials are valid (authentication errors), then verify schema/table permissions (permission errors), and finally check database access (connection errors).
Scanning Actively Updated Tables
If a SQL Server database is updated by another process while Qualytics scans it (for example, an operational or reporting database with scheduled data loads, such as an Epic Clarity environment), a scan can occasionally fail partway through with a message that the connection was interrupted. This happens when the source ends the read session, often during a maintenance or data-load window, rather than because of a data-quality or connection problem. Re-running the scan usually succeeds.
To reduce these interruptions:
- Schedule scans to run outside the source's maintenance or data-load window.
- Use an incremental scan on large, frequently updated tables so each run reads only new or changed records.
- If the source is heavily loaded during your scan window, point the datastore at a read replica or reporting copy.
Qualytics reads SQL Server without blocking writes, so scanning does not lock the tables being read. For the full walkthrough, see Scan Troubleshooting.
Add a Source Datastore
A source datastore is a storage location Qualytics connects to so it can profile, scan, and monitor data. Adding Microsoft SQL Server as a source lets Qualytics query it through the Microsoft JDBC Driver for SQL Server and run quality operations on the tables it discovers.
Before you start, review the Minimum SQL Server Permissions the connecting login needs.
Field reference
The Add Datastore page shows the sections below when Microsoft SQL Server is selected. When reusing an existing connection, the Connection Properties and Secrets Management sections come already filled in and read-only: Qualytics has already validated those credentials, so you fill in only the Datastores Extraction and the Datastore Properties. To change a saved connection's credentials, edit the connection through the Manage Connections page; edits there apply to every datastore that reuses the connection.
Connection Properties
These fields define the SQL Server instance Qualytics connects to. They belong to the connection: when reusing an existing connection, they come already filled in and read-only.
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Connection Name | Text | A label for the saved connection (e.g., acme_sqlserver_reporting), so other datastores can reuse it later. |
|
| Host | Text | The hostname or address of the SQL Server instance. | |
| Port | Number | The port the server listens on. Left empty, the connection uses the default 1433. |
Authentication
Choose how Qualytics authenticates to SQL Server. Setting Type changes the credential fields shown below it, so pick the tab that matches your choice. These fields also belong to the connection: already filled in and read-only when reusing one.
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Type | Option | Set to Username & Password, which is the default (BASIC in the API). |
|
| User | Text | The SQL Server login Qualytics connects as. | |
| Password | Text | The password for that login. |
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Type | Option | Set to Service Principal to authenticate through Microsoft Entra ID (SERVICE_PRINCIPAL in the API). |
|
| Client ID | Text | The application (client) ID of the Microsoft Entra ID app registration. Sent as the connection's username in the API. |
|
| Client Secret | Text | The client secret generated for that app registration. Sent as the connection's password in the API. |
|
| Tenant ID | Text | The Microsoft Entra ID tenant ID the app registration belongs to. |
Service Principal prerequisites
The service principal needs to exist as a user in the target database, with the same permissions a login would need.
Secrets Management
This group is optional: use it only if you want Qualytics to pull credentials from a secrets manager instead of typing them into the form. Turn on HashiCorp Vault to show the fields below. Despite the label, any secrets manager that exposes a compatible REST API works, not only HashiCorp Vault; see Secrets Management. It also belongs to the connection: read-only when reusing an existing connection.
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Login URL | Text | The Vault endpoint Qualytics uses to authenticate (e.g., https://vault.example.com/v1/auth/approle/login). |
|
| Credentials Payload | Text | A JSON body containing the credentials Vault expects (e.g., {"role_id":"...","secret_id":"..."}). |
|
| Token JSONPath | Text | The JSONPath that extracts the client token from Vault's response. Defaults to $.auth.client_token. |
|
| Secret URL | Text | The Vault path where the secret is stored (e.g., https://vault.example.com/v1/secret/data/sqlserver). |
|
| Token Header Name | Text | The HTTP header name used to send the token. Defaults to X-Vault-Token. |
|
| Data JSONPath | Text | The JSONPath that extracts the secret payload from Vault's response. Defaults to $.data. |
Datastores Extraction
Pick the database and the schema or schemas Qualytics should read from, and name the instance if your server uses one. You fill these in on both flows.
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Database | Option | The database to read from. Click the refresh icon to load the databases the login can see. | |
| Schema | Option | One or more schemas inside the selected database. Each schema you pick becomes its own Qualytics datastore. | |
| Instance | Text | The named instance to connect to. A port is always sent with the connection, using 1433 when you leave Port empty, and SQL Server connects on that port and then checks the instance name against it. Fill this in only when the named instance listens on the port you provide. |
One datastore per schema
Selecting more than one schema creates one source datastore per schema, named from the Name Template. See Multi-Schema Source Datastore Creation for details.
System databases
The master, model, msdb, and tempdb databases are left out of discovery, so they do not appear in the list.
Datastore Properties
Common fields for every source datastore, shown below the Datastores Extraction section. You fill these in on both flows.
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Name Template | Text | Defines the naming pattern for each source datastore being created. Use {{schema}} as a placeholder that gets replaced with the actual schema name (e.g., mssql_{{schema}} becomes mssql_sales). Left empty, the datastore is named from the connection name and the schema. |
|
| Group | Option | Organizes your datastores under a shared group in the navigation tree. Select an existing group or create a new one with the Add New Group toggle. | |
| Teams | Option | Select one or more teams to associate with this source datastore. | |
| Initiate Sync | Checkbox | Automatically sync the datastore to detect containers and fields after creation. |
Steps
There are two ways to set up the connection: reuse a connection you already saved (Existing Connection) or create a new one from scratch (New Connection). The tabs below walk through each option; pick the one you want to follow. Each field is described in the Field reference above.
Step 1: Navigate to the Source Datastores page.
Step 2: Click the Add Source Datastore button at the top-right corner.
Step 3: The Add Datastore page opens.
Step 4: Select New Connection next to the Search field.
Step 5: Select Microsoft SQL Server from the connector grid. Use the search field to filter connectors by name.
Step 6: Fill in the Connection Properties: the Connection Name, Host, and Port, then the Authentication fields for the Type you choose.
Step 7: Optionally, expand Secrets Management to retrieve credentials from a secrets manager.
Step 8: Fill in the Datastores Extraction fields (Database, Schema, and Instance if your server uses a named instance) and the Datastore Properties.
Step 9: Click Test connection. A success message confirms that the connection has been verified.
Info
The Finish and Next buttons stay disabled until the connection test passes on the current values. If the test fails, see Troubleshooting Common Errors.
Step 10: Click Finish to create the datastore.
Tip
To link an enrichment datastore so Qualytics can store anomalies and metadata from the first operation, click Next instead of Finish. See Add Enrichment Datastore below.
Step 11: A success dialog confirms that your datastore has been added. Click Go to your datastore to open its page.
Step 1: Navigate to the Source Datastores page.
Step 2: Click the Add Source Datastore button at the top-right corner.
Step 3: The Add Datastore page opens.
Step 4: Select Existing Connection next to the Search field.
Step 5: Select the saved Microsoft SQL Server connection from the grid. Use the search field to filter connections by name. The Connection Properties and Secrets Management sections come already filled in and read-only.
Start a new connection from this one
To use the selected connection as a starting point for a brand-new connection instead, click the Duplicate as a new connection button on the selected connection. The form switches to New Connection mode with the connection's settings already filled in for you to adjust.
Step 6: Fill in the Datastores Extraction fields (Database, Schema, and Instance if your server uses a named instance) and the Datastore Properties. These are the only fields left to fill in.
Step 7: Click Test connection. A success message confirms that the connection has been verified.
Info
The Finish and Next buttons stay disabled until the connection test passes on the current values. If the test fails, see Troubleshooting Common Errors.
Step 8: Click Finish to create the datastore.
Tip
To link an enrichment datastore so Qualytics can store anomalies and metadata from the first operation, click Next instead of Finish. See Add Enrichment Datastore below.
Step 9: A success dialog confirms that your datastore has been added. Click Go to your datastore to open its page.
Add Enrichment Datastore
An enrichment datastore is where Qualytics writes what it finds: anomalies, remediation tables, and record enrichment. Microsoft SQL Server is supported for this role, so the same instance can hold both the data you monitor and the results.
Field reference
The Enrichment Datastore step shows the sections below when Microsoft SQL Server is selected. When reusing an existing connection, the Connection Properties and Secrets Management sections come already filled in and read-only.
Connection Properties
These fields define the SQL Server instance Qualytics connects to. They are the same fields as on the source datastore flow, repeated here so this section stands on its own.
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Connection Name | Text | A label for the saved connection (e.g., acme_sqlserver_enrichment), so other datastores can reuse it later. |
|
| Host | Text | The hostname or address of the SQL Server instance. | |
| Port | Number | The port the server listens on. Left empty, the connection uses the default 1433. |
Authentication
Choose how Qualytics authenticates to SQL Server. Setting Type changes the credential fields shown below it, so pick the tab that matches your choice. These fields also belong to the connection: already filled in and read-only when reusing one. They are the same fields as on the source datastore flow, repeated here so this section stands on its own.
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Type | Option | Set to Username & Password, which is the default (BASIC in the API). |
|
| User | Text | The SQL Server login Qualytics connects as. | |
| Password | Text | The password for that login. |
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Type | Option | Set to Service Principal to authenticate through Microsoft Entra ID (SERVICE_PRINCIPAL in the API). |
|
| Client ID | Text | The application (client) ID of the Microsoft Entra ID app registration. Sent as the connection's username in the API. |
|
| Client Secret | Text | The client secret generated for that app registration. Sent as the connection's password in the API. |
|
| Tenant ID | Text | The Microsoft Entra ID tenant ID the app registration belongs to. |
Service Principal prerequisites
The service principal needs to exist as a user in the target database, with the same permissions a login would need.
Secrets Management
This group is optional: use it only if you want Qualytics to pull credentials from a secrets manager instead of typing them into the form. Turn on HashiCorp Vault to show the fields below. Despite the label, any secrets manager that exposes a compatible REST API works, not only HashiCorp Vault; see Secrets Management. It also belongs to the connection: read-only when reusing an existing connection.
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Login URL | Text | The Vault endpoint Qualytics uses to authenticate (e.g., https://vault.example.com/v1/auth/approle/login). |
|
| Credentials Payload | Text | A JSON body containing the credentials Vault expects (e.g., {"role_id":"...","secret_id":"..."}). |
|
| Token JSONPath | Text | The JSONPath that extracts the client token from Vault's response. Defaults to $.auth.client_token. |
|
| Secret URL | Text | The Vault path where the secret is stored (e.g., https://vault.example.com/v1/secret/data/sqlserver). |
|
| Token Header Name | Text | The HTTP header name used to send the token. Defaults to X-Vault-Token. |
|
| Data JSONPath | Text | The JSONPath that extracts the secret payload from Vault's response. Defaults to $.data. |
Enrichment Extraction
Where Qualytics writes the enrichment tables.
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Database | Option | The database Qualytics writes the enrichment tables into. Pick exactly one. | |
| Schema | Option | The schema inside that database where the enrichment tables are created. Make sure the login has write access to it. | |
| Instance | Text | The named instance to connect to. A port is always sent with the connection, using 1433 when you leave Port empty, and SQL Server connects on that port and then checks the instance name against it. Fill this in only when the named instance listens on the port you provide. |
Warning
The account used for an enrichment datastore needs read and write access, while a source datastore needs only read access.
Enrichment Properties
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Name | Text | The name of the new enrichment datastore. | |
| Teams | Option | Select one or more teams to associate with the enrichment datastore. |
Table prefix
Qualytics generates a Prefix from the source datastore's name and adds it to every table it writes, so several source datastores can share one enrichment target without colliding. An information banner at the bottom of the step previews the resulting table names.
Advanced Options
Collapsed by default. Expand it to change how anomalous source records are replicated.
| FIELD | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Remediation Strategy | Choice | Controls whether and how anomalous source tables are replicated to the enrichment datastore. None does not replicate them and is the default, Append adds the anomalous records after each scan, and Overwrite keeps only the records from the latest scan. |
Steps
A Microsoft SQL Server enrichment datastore can be created from two places: as the second step of creating a source datastore, or on its own from the Enrichment Datastores page. Either way you choose between creating a connection from scratch (New Connection) or reusing a saved one (Existing Connection). The tabs below cover both entry points for each option; each field is described in the Field reference above.
Linking one that already exists
Both entry points also let you pick an enrichment datastore you created earlier instead of creating one. Nothing there is specific to Microsoft SQL Server, since you only select it from a list, so see Link Enrichment on Datastore Creation or Link Enrichment Datastore for those flows.
Step 1: Open the Enrichment Datastore form, from either entry point:
- While creating a source datastore: click Next at the bottom of the Add Datastore page once the source connection test has passed. The Enrichment Datastore step opens.
- On its own: navigate to the Enrichment Datastores page and click the Add Enrichment Datastore button at the top-right corner. The Enrichment Datastore page opens.
Step 2: Select New Connection next to the Search field.
Step 3: Select Microsoft SQL Server from the connector grid. Only connectors that can host an enrichment datastore are listed.
Same connector as the source
When you arrive from a Microsoft SQL Server source datastore, Microsoft SQL Server comes already selected, with the connection fields already filled in from the source connection. Click the selected card to change it.
Step 4: Fill in the Connection Properties: the Connection Name, Host, and Port, then the Authentication fields for the Type you choose.
Step 5: Optionally, expand Secrets Management to retrieve credentials from a secrets manager.
Step 6: Fill in the Enrichment Extraction fields (Database and Schema) and the Enrichment Properties (Name and Teams).
Step 7: When you arrived from a source datastore, review the Prefix preview at the bottom of the step and, if needed, change the Remediation Strategy under Advanced Options. Both relate to the source datastore being linked, so they do not apply when creating the enrichment datastore on its own.
Step 8: Click Test connection. A success message confirms that the connection has been verified.
Info
The button that completes the step stays disabled until the required fields are filled in and the connection test passes on the current values. If the test fails, see Troubleshooting Common Errors.
Step 9: Complete the step: click Finish when you arrived from a source datastore, which creates both datastores and links them, or Create when creating the enrichment datastore on its own.
Step 10: A success dialog confirms the result. Click Go to your datastore to open the source datastore, or Go to your enrichment datastore when you created it on its own.
This option appears only when at least one saved connection can host an enrichment datastore.
Step 1: Open the Enrichment Datastore form, from either entry point:
- While creating a source datastore: click Next at the bottom of the Add Datastore page once the source connection test has passed. The Enrichment Datastore step opens.
- On its own: navigate to the Enrichment Datastores page and click the Add Enrichment Datastore button at the top-right corner. The Enrichment Datastore page opens.
Step 2: Select Existing Connection next to the Search field.
Step 3: Select the saved Microsoft SQL Server connection from the grid. The Connection Properties and Secrets Management sections come already filled in and read-only.
Start a new connection from this one
To use the selected connection as a starting point for a brand-new connection instead, click the Duplicate as a new connection button on the selected connection.
Step 4: Fill in the Enrichment Extraction fields (Database and Schema) and the Enrichment Properties (Name and Teams).
Step 5: When you arrived from a source datastore, review the Prefix preview at the bottom of the step and, if needed, change the Remediation Strategy under Advanced Options. Both relate to the source datastore being linked, so they do not apply when creating the enrichment datastore on its own.
Step 6: Click Test connection. A success message confirms that the connection has been verified.
Info
The button that completes the step stays disabled until the required fields are filled in and the connection test passes on the current values. If the test fails, see Troubleshooting Common Errors.
Step 7: Complete the step: click Finish when you arrived from a source datastore, which creates both datastores and links them, or Create when creating the enrichment datastore on its own.
Step 8: A success dialog confirms the result. Click Go to your datastore to open the source datastore, or Go to your enrichment datastore when you created it on its own.
API Payload Examples
This section provides detailed examples of API payloads to guide you through the process of creating and managing datastores using Qualytics API.
Each example includes endpoint details, sample payloads, and instructions on how to replace placeholder values with actual data relevant to your setup.
Creating a Source Datastore
This section provides sample payloads for creating a Microsoft SQL Server datastore. Replace the placeholder values with actual data relevant to your setup.
Endpoint: /api/datastores (post)
{
"name": "your_datastore_name",
"teams": ["Public"],
"database": "sqlserver_database",
"schema": "sqlserver_schema",
"enrichment_only": false,
"trigger_sync": true,
"connection": {
"name": "your_connection_name",
"type": "sqlserver",
"host": "sqlserver_host",
"port": 1433,
"username": "sqlserver_username",
"password": "sqlserver_password"
}
}
{
"name": "your_datastore_name",
"teams": ["Public"],
"database": "sqlserver_database",
"schema": "sqlserver_schema",
"enrichment_only": false,
"trigger_sync": true,
"connection": {
"name": "your_connection_name",
"type": "sqlserver",
"host": "sqlserver_host",
"port": 1433,
"username": "application_client_id",
"password": "client_secret",
"parameters": {
"authentication_type": "SERVICE_PRINCIPAL",
"tenant_id": "azure_ad_tenant_id"
}
}
}
# Step 1: Create a Connection
qualytics connections create \
--type sqlserver \
--name "your_connection_name" \
--host ${SQLSERVER_HOST} \
--port 1433 \
--username ${SQLSERVER_USER} \
--password ${SQLSERVER_PASSWORD}
# Step 2: Create a Source Datastore
qualytics datastores create \
--name "your_datastore_name" \
--connection-name "your_connection_name" \
--database your_database \
--schema dbo
Service Principal credentials
With Service Principal authentication, the Client ID is sent as username and the Client Secret as password. The authentication type and the Tenant ID go under connection.parameters.
Port
port takes a number, and it is optional. Leave it out to use 1433.
Creating an Enrichment Datastore
This section provides sample payloads for creating an enrichment datastore. Replace the placeholder values with actual data relevant to your setup.
Endpoint: /api/datastores (post)
{
"name": "your_datastore_name",
"teams": ["Public"],
"database": "sqlserver_database",
"schema": "sqlserver_enrichment_schema",
"enrichment_only": true,
"connection": {
"name": "your_connection_name",
"type": "sqlserver",
"host": "sqlserver_host",
"port": 1433,
"username": "sqlserver_username",
"password": "sqlserver_password"
}
}
# Step 1: Create a Connection
qualytics connections create \
--type sqlserver \
--name "your_connection_name" \
--host ${SQLSERVER_HOST} \
--port 1433 \
--username ${SQLSERVER_USER} \
--password ${SQLSERVER_PASSWORD}
# Step 2: Create an Enrichment Datastore
qualytics datastores create \
--name "your_datastore_name" \
--connection-name "your_connection_name" \
--database your_database \
--schema your_enrichment_schema \
--enrichment-only
Link an Enrichment Datastore to a Source Datastore
Use the provided endpoint to link an enrichment datastore to a source datastore:
Endpoint Details: /api/datastores/{datastore-id}/enrichment/{enrichment-id} (patch)