Skip to main content
Markifact connects to one Databricks workspace at a time. You give it the workspace URL and one credential, and Databricks decides what that credential is allowed to read or change.

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.

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.
  1. In Databricks, open SQL Warehouses and select a warehouse.
  2. Click Permissions.
  3. Add the service principal (or yourself) with Can use.
A stopped warehouse starts on its own when Markifact runs a query. Databricks bills that usage to your account.

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.
To also allow writes:
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

  1. Open Connections and click Connect next to Databricks.
  2. Paste your Workspace URL.
  3. Choose Service principal or Personal access token and paste the values.
  4. Click Save Connection. Markifact tests the credential before saving.
Each connection covers one workspace. Add another connection for a second workspace.

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.

Troubleshooting