Skip to main content

Versioned table source

DeltaTableSource

DeltaTableSource replays the transaction log to determine the active Parquet files, then uses the common source and scan contracts for metadata, filtering, projection, limits, and streaming Arrow results.

The snapshot path

Resolve the version first, then query its files.

The source keeps transaction-log replay separate from physical Parquet reads. That makes version selection explicit while preserving the same table query semantics as an ordinary dataset.

Resolve

Replay add/remove actions through a selected version

Plan

Build the active Parquet file set

Query

Projection, predicates, limits, and cancellation

Return

Streaming Arrow batches in source order

Scan supported

DeltaTableSource is a read-only Delta Lake snapshot adapter. It replays newline-delimited transaction-log actions, resolves the active Parquet files, and delegates physical reads to ParquetDatasetSource.

Detailed guide

Delta source details

The sections below document construction, snapshot planning, scan support, and the boundaries of the read-only adapter.

import {DeltaTableSource} from '@loaders.gl/tables/delta';

const source = new DeltaTableSource(
'https://data.example.com/events/_delta_log/00000000000000000042.json'
);

const metadata = await source.getQueryMetadata();

for await (const batch of source.read({
columns: ['timestamp', 'event_type'],
predicate: {op: '=', args: [{property: 'event_type'}, 'click']},
limit: 1000
})) {
consume(batch);
}
PropertyValue
Data sourceDeltaTableSource

Scan support​

CapabilitySupportNotes
Entry point✅ read(); scan() aliasStreaming Arrow batches from active Parquet files
Query metadata✅ SupportedSchema, capabilities, row count, and byte length when available
Version selection✅ SupportedReplays JSON commits from version 0 through the selected version
Add/remove actions✅ SupportedProduces the active file set
Projection, predicate, limit, cancellation✅ SupportedDelegated to the Parquet dataset executor
Explain/plan✅ SupportedActive fragments plus delegated Parquet plans
Checkpoint files❌ Not decodedSupply a JSON commit log URL
Deletion vectors❌ RejectedThe source fails explicitly rather than returning deleted rows
Reader protocol above version 1 or reader features❌ RejectedUnsupported protocol requirements fail explicitly
Writes, CDC, and catalog discovery❌ Not providedRead-only source

URL and version behavior​

When the input URL names a zero-padded Delta commit, the version is inferred from the filename. Set delta.version or the per-read version option to select another non-negative version. Relative Parquet paths are resolved from the table root; delta.baseUrl can override that root.

The current implementation fetches and replays each JSON commit needed for the selected version. It does not use _last_checkpoint or Parquet checkpoint files, so very long transaction histories are not an efficient input yet.

Safety boundaries​

Delta features that can change row visibility are never ignored silently. Active files containing deletion vectors are rejected, as are protocol declarations the adapter cannot interpret. This ensures a successful scan represents the selected snapshot rather than an approximate view.