# Before You Point PyTorch at a Unity Catalog Table, Read UCDataset's Fine Print

> A new Beta data loader lets training jobs skip the Parquet export, but it can't read a table with a row filter or column mask yet.

- Canonical: https://lakenaut.dev/blog/before-you-point-pytorch-at-a-unity-catalog-table-read-ucdataset-s-fin-7sn3/
- Author: Fernando De Nitto
- Published: 2026-11-16
- Kind: deep-dive
- Tags: Databricks, Data Engineering, Machine Learning, Unity Catalog, MLOps
- Concepts: [AI Runtime and serverless GPU compute](https://lakenaut.dev/concepts/ai-runtime.md)
- Licence: CC BY-NC-SA 4.0

Every ML team on Databricks eventually builds the same side job: before a GPU training run starts, a script exports the feature table to Parquet in a volume, because the training loop can't read a governed Delta table directly without either pulling it into memory on one node or going through a SQL warehouse that chokes when eight or sixteen GPUs all ask for data at once. The export job becomes part of the pipeline nobody wants to own: it drifts out of sync with the source table the moment new rows land, it sits outside Unity Catalog lineage, and the GPUs you're paying for by the second sit idle while it runs.

UCDataset, released in Beta on [AI Runtime](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/), is Databricks' answer to that side job. It's a PyTorch data loader that reads a Unity Catalog Delta table's files straight from cloud storage and hands each GPU and data-loader worker its own slice of the rows, with no export step and no custom sharding code. The pitch is specific enough to take seriously: Databricks reports roughly a 10x improvement in training time against reading from an exported Parquet copy, measured by streaming a 300 GB feature table across eight NVIDIA H100 GPUs to train a recommendation model. That's one benchmark on one simulated workload, not a guarantee for your table shape or your model, but it tells you what kind of bottleneck this is aimed at.

## What it actually does at read time

UCDataset sits between a Unity Catalog table and a standard PyTorch training loop. You point it at a table, the columns the model needs, and a row filter; it streams matching rows directly from the table's underlying files rather than going through Spark or a SQL warehouse, and it splits those rows evenly across every GPU and loader worker in the job, so nobody has to write a `DistributedSampler`-style partitioning scheme by hand. The filter and the table's deletion vectors are both applied as the files are read, and because it's reading the live table, a run picks up rows that were appended since the last one without you doing anything. It already yields full, ready-to-train batches, so the usual pattern is to wrap it in an ordinary PyTorch `DataLoader` with `batch_size=None` rather than letting the DataLoader re-batch what UCDataset already assembled.

Governance doesn't disappear because the loader bypasses Spark. A training job on AI Runtime reads as the identity that runs it, and standard Unity Catalog privileges on the table apply exactly as they would to any other reader. That's the same model the rest of the platform uses, and it's why there's no second, less-governed copy of the data to secure separately once you stop exporting to Parquet.

![Export-then-train vs. the live table](https://lakenaut.dev/social/0af10ca30747900cf01a1e2e174e1.png)
## Where the Beta still draws a hard line

The feature is explicit about what it skips today, and the two limits matter for different reasons. First, it reads Delta tables registered in Unity Catalog, including tables with deletion vectors, and nothing else — no views, no external formats, no non-UC paths. Second, and more consequential for a production pipeline, the Beta build cannot read a table that has a row filter or a column mask attached. It doesn't ignore the filter and leak rows; the read simply doesn't work on that table yet. That's the safer failure mode, but it still means a table your security team protects with a row filter today could be perfectly readable by every other tool your team uses and still be off-limits to UCDataset, with no workaround besides waiting for GA or removing the filter.

The other place this bites is reproducibility. Reading the live table is the whole point when you want the next scheduled run to train on yesterday's new impressions automatically, but it's a liability when you need two runs to see exactly the same rows — a model card, an ablation, a regression test against a known dataset. [Delta time travel](https://lakenaut.dev/concepts/delta-time-travel/) exists for exactly this problem elsewhere on the platform; nothing in UCDataset's Beta description suggests it pins a version for you, so if determinism matters, that's a decision you have to make explicitly rather than get by default.

Distributed training itself keeps its existing shape constraints. The notebook path's [`@distributed` decorator](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/distributed-training) only runs across the GPUs on a single node, and real multi-GPU data parallelism needs the eight-GPU `GPU_8xH100` or `GPU_8xB300` shape — UCDataset doesn't change either of those limits, it just changes how the batches arrive once the job is running. If a training workload genuinely needs multiple nodes, that still means moving to the AI Runtime CLI's workload YAML rather than a notebook cell, same as before UCDataset existed.

![Where this trips people up in the Beta](https://lakenaut.dev/social/0af10ca30747900cf11a1e2e174e1.png)
## What to check before you adopt it

The decision isn't really "should we use UCDataset," it's "does our current table and job already satisfy what the Beta needs." Three questions cover most of it: does the training table carry a row filter or column mask today, or might one get added later by whoever owns governance on that schema; is the table plain Delta, or does it sit behind a view, a federation connection, or an external format; and does the training job need bit-for-bit reproducibility across runs, or is "whatever's in the table right now" actually the desired behavior. A nightly recommendation model retrain that's supposed to see yesterday's clicks wants the live-table behavior. A fixed benchmark suite being used to compare two architectures does not, and should probably stay on an exported, versioned snapshot until UCDataset — or a documented way to pin it to a table version — reaches GA.

Cost follows the same logic as the benchmark: the saving isn't in storage, since you were already paying to store the table once; it's in GPU idle time and in the export job itself. If your current export step is cheap and your GPUs aren't the scarce resource, the 10x number is interesting but not urgent. If eight or sixteen H100s are waiting on a Parquet export before every run, that's the exact shape of workload the benchmark describes.

## Running and monitoring it

A UCDataset-backed job is still an AI Runtime job underneath, so the operational picture is the same one AI Runtime already gives you. Each training call creates an MLflow run, or a nested child run if one is already active, and that run is where loss curves and other logged metrics land — that's the first place to look if training looks slower or noisier than expected, not the loader itself. The compute exposes a web terminal, so `nvidia-smi` is available if you want to confirm GPUs are actually staying busy rather than waiting, which is the whole premise UCDataset is built to fix; a job that still shows idle GPU time with UCDataset in place points at something else in the pipeline, not at the loader. Because the loader reads the live table, it's also worth keeping an eye on who else is writing to that table during a long training run and whether a governance change — a newly added row filter or column mask — could silently turn a working job into one that fails to start.

## What to do Monday

Pull up the Unity Catalog grants and any row filters or column masks on the tables your current training jobs read from, before you plan around UCDataset — that's the one thing that determines whether it's usable at all today. If it's clear, enable the preview, `pip install databricks-uc-dataset` in a notebook attached to AI Runtime, and point it at a small table first rather than the full production feature set. And decide, in writing, whether your training jobs need a frozen snapshot of the data or the live table — that's a call worth making deliberately rather than inheriting by default once a loader this convenient is sitting one import away.

## Sources

- https://docs.databricks.com/aws/en/machine-learning/ai-runtime/
- https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/distributed-training
- https://www.databricks.com/blog/accelerate-gpu-training-unity-catalog-tables-ucdataset
- https://docs.databricks.com/aws/en/release-notes/product/2026/november#load-unity-catalog-tables-into-pytorch-on-ai-runtime-beta
