Databricks

Databricks Single User Compute: Permission Boundaries and ML vs SQL Execution

2026-03-26
更新: 2026-03-27
NicheeLab Editorial Team

Databricks compute has several access modes, but Single User mode is the most flexible — it runs "dedicated to one user." It is the only mode that supports ML development, distributed training, and low-level Spark APIs (RDD / SparkContext) all at once, and under Unity Catalog data access is controlled using "the credentials of the attached user."

This article breaks down how Single User mode's execution identity works, the permission boundaries under UC, and the concrete differences between ML workload and SQL execution paths — plus the exam talking points and the design criteria you actually use in production.

What Is Single User Access Mode?

Single User is an access mode that dedicates a cluster to a single user. When you create the cluster, select "Single User" and pick a target user — no one else will be able to attach to the cluster. Concurrent notebook use is not possible, so it is not suited to team-wide sharing, but it has the following advantages no other mode can match:

  • ML Runtime (DBR ML) is available: full support for GPUs, distributed training, and ML libraries
  • You can use RDDs, SparkContext, and other low-level APIs
  • No restrictions on custom UDFs (Python / Scala)
  • No restrictions on init scripts or library installs
  • Credential pass-through-style behavior: data is accessed using the attached user's permissions

How Execution Identity Works

The most important characteristic of Single User mode is its "execution identity." In this mode, every piece of code that runs on the cluster (SQL / Python / Scala / R) runs with the credentials of the user attached to the cluster.

Concretely, here is how it behaves:

OperationIdentity UsedImpact
SELECT on a UC table from a notebookThe attached userA GRANT to that user is required
Reading cloud storage directly from a notebookThe attached user (via an External Location)READ_FILES permission is required
Running as a jobThe job owner (may differ from the cluster's designated user)A GRANT to the job owner is required
DLT pipelinesThe pipeline ownerDLT internally launches a Single-User-equivalent cluster

Understanding exactly "whose permissions are used for access" is critical both on the exam and in real work. In particular, for job runs the job owner's permissions are used — not the user attached to the cluster — which often leads to the classic problem of "the table I could read in the notebook can't be read once it runs as a job."

Permission Boundaries Under Unity Catalog

In a Unity Catalog (UC) environment, Single User mode functions as the minimum unit of data governance. In workspaces where UC is enabled, data access always flows through UC's permission model (GRANT / DENY).

Here are the key points for understanding the permission boundaries:

  • 3-tier permissions: catalog → schema → table: Without USE CATALOG and USE SCHEMA at the higher levels, even a SELECT grant on the table itself effectively gives you no access.
  • Cluster access mode and UC permissions are independent: Single User mode doesn't mean you can see all the data — you are still limited to the GRANTs explicitly given to that user.
  • External Location permissions: To read or write cloud storage directly, you need READ_FILES / WRITE_FILES on the UC External Location.
  • Relationship with storage credentials: In Single User mode the storage credential is used transparently, but the user must hold ACCESS permission on the credential.

ML Workload vs SQL Execution Paths

Running an ML workload on a Single User cluster takes a very different internal path from running SQL. The comparison table below lays out the differences:

AspectML workload (Python / DBR ML)SQL execution (notebook SQL / Spark SQL API)
Execution enginePython process on the Spark driver + Spark workersSpark SQL engine (Catalyst → Photon)
Photon accelerationNot supported (Pandas UDFs etc. run in the Python process)Supported (on Photon-enabled clusters)
UC permission checkChecked at table read/write timeChecked at query parsing time
Distributed processingHorovod / TorchDistributor / Spark ML PipelineStandard Spark parallelism
Library restrictionsNone (pip install is unrestricted)None (you can also define UDFs)
GPU usageSupported (when you choose a GPU cluster)Not supported (GPUs are not leveraged)
MLflow integrationAutomatic logging supported (autolog)You have to log manually

SQL Execution Paths: Notebook SQL vs SQL Warehouse

When you "run SQL" on Databricks, there are two options: running SQL on a Single User cluster, or using a Databricks SQL Warehouse (Serverless / Pro / Classic). Here is how they compare.

ComparisonSQL on a Single User clusterSQL Warehouse
Compute resourceUser-dedicated clusterShared, SQL-optimized engine
PhotonOnly on Photon-enabled clustersBuilt in by default
Mixing Python / ScalaPossibleNot possible (SQL only)
Cost characteristicsAlways billed while the cluster is runningWith Serverless, auto-stop and prorated billing
Execution identityThe attached userThe user running the query
BI connectivity (JDBC/ODBC)Not recommendedRecommended

On the exam this often shows up as: "Which compute should you use if you want to mix Python and SQL in your ETL pipeline?" The answer is a Single User cluster (or a Job Cluster) — SQL Warehouse cannot run Python.

DLT Pipelines and Job Clusters

Delta Live Tables (DLT) pipelines automatically spin up a Single-User-equivalent cluster internally. You don't have to configure the cluster explicitly — the DLT runtime picks suitable settings. In that case the execution identity is the pipeline owner.

Job Clusters are usually created in Single User mode as well. When you define the job you specify "Single User," and data is accessed using the job owner's permissions. Unlike an All-Purpose Cluster, the cluster is automatically torn down once the job finishes, making it more cost-efficient.

Design Guidance for Production Use

Here are the best practices for using Single User mode in production:

  • Always use Single User + DBR ML for ML development: Shared mode does not let you pick the ML Runtime, so all ML development should be done on Single User.
  • Enforce auto-termination via Cluster Policy: Single User clusters are dedicated to one person, so idle time tends to be long. Cap autotermination_minutes at 10-30 minutes through a policy.
  • Separate development and production-job clusters: Use an All-Purpose Cluster (Single User) for development and a Job Cluster (Single User) for production. This makes cost attribution and permission management cleaner.
  • Combine with Instance Pools: Single User clusters start and stop frequently, so reserving instances in advance with an Instance Pool brings start-up time down to roughly 30 seconds to a minute.

Key Exam Points

Single User mode shows up frequently on Data Engineer Associate / ML Associate / ML Professional. The main question patterns are:

  • "Which access mode do you need for distributed ML model training?" → Single User
  • "What's the difference between Shared and Single User mode?" → RDD support, ML support, no concurrent use, etc.
  • "What is the execution identity for a job run?" → The job owner (not the user attached to the cluster)
  • "What compute mode do DLT pipelines use?" → A Single-User-equivalent cluster is configured automatically under the hood
  • "Why can't I access a UC table?" → Missing USE CATALOG / USE SCHEMA permissions

Check Yourself with a Sample Question

ML Associate / ML Professional

問題 1

A data scientist wants to run distributed training with PyTorch in a Databricks notebook. In a Unity-Catalog-enabled environment, which cluster configuration is most appropriate?

  1. Attach to a Shared-mode cluster and pip install PyTorch
  2. Create a Single-User-mode cluster (DBR ML Runtime) and use TorchDistributor
  3. Connect to a SQL Warehouse and register a PyTorch UDF
  4. Use a No-Isolation-Shared-mode cluster and add GPU nodes

正解: B

Distributed PyTorch training requires the DBR ML Runtime and TorchDistributor, which are supported only in Single User mode. Shared mode does not let you pick the ML Runtime, SQL Warehouse is SQL-only, and No Isolation Shared mode cannot be used in a UC-enabled environment.

Frequently Asked Questions

How are Unity Catalog permission checks performed in Single User mode?

The credentials of the user attached to the cluster are used for all data access. When you run a SELECT on a UC table from a notebook, Databricks checks whether that user has the necessary GRANT, and returns AccessDenied if not. For job runs, the job owner's credentials are used instead, so developers and job owners may see different data — something to watch out for.

Can I use ML libraries (scikit-learn, TensorFlow, etc.) on a Single User cluster?

Yes. Single User is the only access mode that fully supports the ML Runtime (DBR ML). In addition to libraries such as scikit-learn, TensorFlow, PyTorch, and Hugging Face, distributed training (Horovod / TorchDistributor) is also available only on Single User. Shared mode does not allow you to pick the ML Runtime at all, so Single User is mandatory for ML workloads.

Should I choose Single User mode or Shared mode?

There are two key criteria: (1) do you need ML / distributed training / custom UDFs, and (2) do you want to prioritize cost efficiency? If you need ML development or low-level APIs (RDD, SparkContext), Single User is the only choice. If multiple users share the same cluster for SQL-based analytics or ETL to keep costs down, Shared mode is the better fit. Exams frequently test this trade-off.

Check what you learned with practice questions

Practice with certification-focused question sets

無料で問題を解いてみる
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Databricks

Databricks Certifications: All 7 Exams, Difficulty & Study Plan (2026)

Complete guide to all 7 Databricks certifications — Data Eng...

Databricks

Databricks Exam Difficulty Ranking: All 7 Certs Compared (2026)

Every Databricks certification ranked by difficulty, with st...

Databricks

Databricks Study Guide: Fastest Pass Route & Time Estimates (2026)

How to pass Databricks certifications efficiently. Official ...

Databricks

Databricks Data Engineer Associate: Complete Guide (2026)

Domain-by-domain breakdown of the Databricks Certified Data ...

Databricks

Databricks Data Engineer Professional: Complete Guide (2026)

Tactics for the Databricks Certified Data Engineer Professio...

Browse all Databricks articles (110)
© 2026 NicheeLab All rights reserved.