What you need
A service principal is a separate identity made for tools like Markifact, so it keeps working when a person leaves the team. Creating one needs a workspace admin. A personal access token is quicker, but it acts as you and Databricks treats it as a legacy option.
Option A: Service principal (recommended)
1
Create the service principal
In Databricks, open Settings, then Identity and access, then Service principals, and click Add service principal. Choose Add new, give it a name such as
markifact, and keep Databricks SQL access and Workspace access turned on.2
Generate a secret
Open the service principal, go to the Secrets tab and click Generate secret. Set a lifetime (up to 730 days), then add the sql and unity-catalog scopes and pick a level for each from the table in Choose read-only or read and write.
3
Copy the Client ID and Secret
Databricks shows the secret only once. Copy both values.
Option B: Personal access token
1
Open your access tokens
In Databricks, open Settings, then Developer, and click Manage next to Access tokens.
2
Generate a token
Click Generate new token, give it a name and a lifetime, then add the sql and unity-catalog scopes and pick a level for each from the table in Choose read-only or read and write.
3
Copy the token
Databricks shows the token only once.
Allow it to use a SQL warehouse
Every query runs on one of your SQL warehouses.- In Databricks, open SQL Warehouses and select a warehouse.
- Click Permissions.
- Add the service principal (or yourself) with Can use.
Choose read-only or read and write
Databricks gives you two locks, and you can use either or both. 1. The scope level on the secret or token. You pick it when you generate the credential.
With Read + Restricted query, Databricks itself refuses every statement that changes data, whatever permissions the identity has.
2. Data permissions on your catalogs, schemas and tables. A workspace admin or the data owner grants them in Catalog or with SQL.
Example for a read-only connection on the schema
main.marketing. For a service principal, use its Client ID (application ID) in backticks. For a personal access token, use your own user name.
With a read-only connection, the write operations stay visible in Markifact, but Databricks refuses them and the run tells you what to change. Nothing is written.
Connect in Markifact
- Open Connections and click Connect next to Databricks.
- Paste your Workspace URL.
- Choose Service principal or Personal access token and paste the values.
- Click Save Connection. Markifact tests the credential before saving.
Good to know
- Queries never change data by accident. Execute Read-Only Statement only accepts statements that read (SELECT, WITH, SHOW, DESCRIBE, EXPLAIN). Changes go through Execute Statement or Insert Rows, which ask for approval when an AI agent runs them.
- Row limit. A query returns up to 1,000 rows by default. Raise Row Limit for more. The output tells you when a result was cut.
- Large results. Databricks stops a query whose result is larger than 25 MiB. Select fewer columns or rows.
- One statement per run. Send a single SQL statement each time.
- Credentials expire. A secret or token stops working at the end of its lifetime, and Databricks removes one that has not been used for 90 days. Generate a new one and reconnect.

