Model or dataset
datachain-ai/datachain avatar
datachain-ai/datachain

DataChain: typed, versioned datasets over object storage

The Context Layer for unstructured data: typed, versioned datasets over S3, GCS, Azure

2,819 stars157 forksPythonApache-2.0

At a glance

What is it?
DataChain is a Python library that indexes files in S3, GCS, Azure or a local filesystem into versioned datasets with Pydantic schemas, keeping bytes in place. It fits teams whose pipelines recompute the same embeddings and metadata on every run, and it is the wrong tool when you need a real distributed query engine.
Who is it for?
Adopt DataChain if you run repeated Python passes over object storage and want the intermediate results to be named, typed and versioned instead of recomputed. Do not adopt it if you need a distributed query engine or SQL as the primary interface; the README positions the Dataset DB as a local SQLite file at .datachain/db, and the larger figures are tied to Studio, a separate product.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The recomputation problem DataChain targets

Most teams working with unstructured data in object storage end up in the same loop. A script lists a prefix, downloads each object, runs a model or a parser, and writes a result somewhere. The next script needs those results and cannot see them, so it recomputes them. Nothing records which schema was produced, which input files were consumed, or when the code changed. DataChain's answer is to make each step of that loop a named artifact. The README describes a dataset as "the unit of work - a named, versioned result of a pipeline step like pets_embeddings@1.0.0", and states that every .save() registers one. The intended audience is Python engineers building multimodal or ML pipelines, plus the newer case of coding agents that need to read and write the same data. The README's quickstart is explicitly agent-driven: a prompt asks Claude Code to find dogs in s3://dc-readme/oxford-pets-micro/ similar to a reference image, filtered by breed, mask availability and width. That framing tells you who the project is being built for right now.

How a save becomes a queryable dataset

The mechanism has three parts. First, dc.read_storage() lists and reads files from a URL pattern such as "s3://dc-readme/oxford-pets-micro/images/**/*.jpg", with anon=True for public buckets. Second, transformation is expressed through chain operations the README names explicitly: read_storage, map, save. Third, the Dataset DB persists schemas, versions, lineage and processing state. The README states that this store is kept locally in a SQLite file at .datachain/db, and that pipelines reference datasets by name rather than by path. The type layer comes from Pydantic. In the example, a function annotated as returning ImageInfo produces columns named info.width and info.height, which show() renders as dotted column headers next to file.path and file.size. That is the part worth noticing: the return type of the function is the schema, so the schema is not declared separately and cannot drift from the code that produced it. Vector search is described as operating over the same rows rather than a separate store, which avoids a second index to keep in sync.

Incremental runs and the settings that control them

The install is one command, pip install datachain. The example pipeline passes four arguments to read_storage: the path glob, anon=True, update=True and delta=True. The inline comment states that delta=True makes re-runs skip unchanged files, and the README says re-runs only process new or changed files. update=True is what allows the listing to pick up new objects. A separate call, .settings(prefetch=64), controls how much is fetched ahead of the mapping function, which matters when each file requires a network round trip before any Python runs. The README also lists checkpoint recovery and incremental updates as compute engine features, and says that when the code or input data changes, the next run bumps the dataset version. That version bump is the mechanism behind the claim that a dataset is a management unit. The agent skill is installed with datachain skill install --target claude, and the README lists cursor, codex, copilot and pi as other targets. A copy helper exists for pulling a single object down: datachain cp --anon s3://dc-readme/fiona.jpg .

Where the local Dataset DB stops being enough

The README makes a scale distinction that is easy to skim past. Filter, join and group_by are described as sub-second over millions of typed records locally, and hundreds of millions on Studio. Studio is a separate product, not something pip install datachain gives you. So the ceiling for the library alone is a SQLite file on one machine, and the README does not state a supported record count for that configuration. Two further gaps are worth naming. The README says bytes never leave your storage and that DataChain indexes storage without copying data, which means every map step that opens a file still pays the download cost; the library removes recomputation, not I/O. And the quickstart's result table, which ranks shiba_inu_52.jpg at distance 0.244, is produced through an agent that decomposed the task into embeddings, metadata, a mask join and a quality filter. The README does not specify which embedding model was used, so that distance value is not reproducible from the material alone. If your workload is a single pass over a bucket with no reuse, DataChain adds a schema and a database file for no benefit.

DataChain against DVC and lakeFS

The closest comparison is DVC, which also versions data alongside code. DVC versions files and directories as artifacts and stores hashes in Git, and its unit is the artifact. DataChain's unit is the output of a compute step: a typed table with a schema, a version and lineage recorded in the Dataset DB. With DVC you version the inputs and outputs of a stage but the schema of what a script produced is your problem; with DataChain the Pydantic return type is the schema. lakeFS takes a third route, presenting object storage as a Git-like repository with branches and commits, so versioning happens at the storage layer and applies to anything that writes through it. DataChain sits above storage and knows nothing about your bucket's history. The practical difference: lakeFS can branch a bucket for an experiment, DataChain can tell you which files fed pets_images@1.0.0 and what columns came out.

The Knowledge Base and agent harness are optional and less settled

The README marks the Knowledge Base and Agent Harness as "Optional, for agent workflows". The Knowledge Base is described as markdown summaries derived from the Dataset DB and enriched by an LLM, readable by humans and LLMs. The dc-knowledge tree in the README shows a buckets/s3/dc_readme.md file, three dataset markdown files and an index.md, with wikilinks and Obsidian support. Because the summaries are LLM-generated, their accuracy is a separate question from the accuracy of the Dataset DB, and the README does not describe how they are regenerated or validated. The Agent Harness is described as a skill that plugs the three components into Claude Code, Cursor, Codex, GitHub Copilot and Pi, and on Studio agents reach the same datasets over MCP. The README's own framing is that code harnesses give agents repo context, tools and memory, and DataChain adds the same for data. If you do not use a coding agent, this entire layer is dead weight in the dependency tree. If you do, the value depends on the agent calling read_storage, map and save correctly, which is a prompt-and-skill problem rather than a library guarantee.

Release cadence, licence and what to check first

The repository is Apache-2.0, which permits commercial use and modification, but this is not legal advice and the licence text governs. Releases are frequent: 0.59.6, 0.59.7 and 0.59.8 landed between 17 August and 10 September 2026, roughly weekly. A 0.x version number with that cadence means the API can move, so pin the version in your requirements file and read the release notes before upgrading. The Dataset DB lives at .datachain/db, which means it is local state that must be treated as such: back it up, or accept that rebuilding it means re-listing and re-hashing your storage. The README does not describe a migration path between dataset versions of the library itself, so a schema change in a new release is something to verify against a copy of your own database before you upgrade a production pipeline. Start with the create_dataset.py example pointed at one of your buckets, confirm that the second run skips unchanged files, and check what the dotted columns look like in .datachain/db.

Editorial conclusion

Adopt DataChain if you run repeated Python passes over object storage and want the intermediate results to be named, typed and versioned instead of recomputed. Do not adopt it if you need a distributed query engine or SQL as the primary interface; the README positions the Dataset DB as a local SQLite file at .datachain/db, and the larger figures are tied to Studio, a separate product. Before committing, run the create_dataset.py example against one of your own buckets with delta=True and update=True, confirm that a second execution skips unchanged files, then inspect .datachain/db to see exactly which columns and versions were written.

Official sources

  1. datachain-ai/datachain on GitHub
  2. License: Apache-2.0
  3. Project website
  4. README
  5. Releases
Community notes

Community notes