For the complete documentation index, see llms.txt. This page is also available as Markdown.

Databricks use cases

Example P0 requests for common Databricks tasks, each with a way to check in Databricks that the access works.

The Databricks integration is in beta. Functionality and configuration may change.

Each use case below has the P0 CLI request for one common task, and a way to check in Databricks that the access works. To install the CLI, see Installing p0 CLI. The examples use a catalog named main, a schema named sales, and a workspace named analytics-prod. Replace them with your own. For every argument a request takes, see Requesting Databricks access.

The checks use the Databricks CLI, signed in as you, and SQL that you run in the workspace's SQL editor. Run a check before you request to see Databricks refuse it, and again once P0 grants the request. When your access expires or is revoked, Databricks refuses it again.

Read one table

Use this for a one-off report. P0 also grants the USE_CATALOG and USE_SCHEMA you need to reach the table, and removes them when your access ends.

p0 request databricks privilege main SELECT --schema sales --table orders --reason "Q3 revenue review"

To check, list your privileges on the table, then query it:

databricks grants get table main.sales.orders --principal <your-email>
SELECT count(*) FROM main.sales.orders;

Read and write a table

Use this to correct bad records.

p0 request databricks privilege main SELECT MODIFY --schema sales --table customers --reason "Fix duplicate customer records"

To check without changing anything, run a DELETE that matches no rows. Databricks checks MODIFY before it runs the statement:

DELETE FROM main.sales.customers WHERE 1 = 0;

Read and write files in a volume

Use this to load a data drop into a Unity Catalog volume. You can upload files and read them back.

To check, upload a file and list the volume:

Run a function

Use this to try a SQL function, such as a masking function before an export.

To check, call the function:

Read every table in a schema

The access covers tables created while you hold it. P0 adds USE_CATALOG to a request on a schema, but not USE_SCHEMA, so name it yourself.

To check, list the schema's tables, then query one you have no privileges on by itself:

P0 fails a request for a privilege you already hold on the same object. If an earlier request of yours gave you USE_SCHEMA on this schema, wait for it to end or revoke it first.

Become a workspace admin

Use this for a workspace-wide change, such as updating cluster policies. Your organization must have turned on workspace-admin requests for the workspace.

To check, list your groups in the workspace. They include admins:

Become an account admin

Use this for an account-wide change, such as adding a workspace. Your organization must have turned on account-admin requests for the account.

To check, list the account's users with the Databricks CLI signed in to the account. Only account admins can:

Last updated