Skip to content

Proposal: DataFusion Cookbook #24569

Open

Description

@edmondop

A cookbook is a collection of short, self-contained, task-framed recipes ("I want to do X → here's how, here's why, here's the gotchas") — as opposed to reference docs (API surface) or a linear tutorial (one path through the basics). It's a proven format once a technology has enough surface area that no single tutorial covers it well.

Why it'd help DataFusion

DataFusion is powerful enough that the hard part for new adopters isn't "does this feature exist" but "how do I wire it together for my use case" — custom TableProvider, which UDF/UDAF/UDWF/UDTF variant to use, pushdown, catalog integration, remote object stores. A cookbook is the standard way projects close that gap.

Examples of cookbooks elsewhere

Published books:

Same-ecosystem, in-project precedents:

Relationship with examples

datafusion-examples (https://github.com/apache/datafusion/blob/main/datafusion-examples/README.md) already has ~50 runnable, tested examples across 11 groups: UDF/UDAF/UDWF/UDTF, custom TableProvider, custom file formats, Parquet encryption (incl. KMS), custom optimizer/analyzer rules, Flight SQL, querying S3, remote catalogs, and more.

These examples can be turned into recipe for a cookbook by rewriting each as a short step-by-step recipe — problem statement, code, explanation, pitfalls.

Probably 50 recipes are excessive, a good number would be in the 15-20, at least to start.

Organization options

Existing cookbooks adopt both the colocated and the separate repo approach, so we would need to decide between these two options:

  • As a new section of the existing docs site, next to datafusion-examples, versioned with the code (closest precedent: ADBC's cookbook, which lives directly in the Sphinx docs).
  • A separate repo, lower barrier for outside contributors, easier to restructure freely, but risks drifting from releases (precedent: Rust Cookbook, Spice.ai's cookbook repo).

Activity

  1. edmondop commented on Aug 21, 2026

    @edmondop
    ContributorAuthor

    Cc @alamb for visibility

  2. Jefffrey commented on Aug 22, 2026

    @Jefffrey
    Contributor

    slightly related but i found this website which has a good proposed way for organizing documentation: https://diataxis.fr/

    in this case, cookbooks are equivalent to the how-to guides i believe 👍

  3. 2010YOUY01 commented on Aug 23, 2026

    @2010YOUY01
    Contributor

    Great proposal, +1 for this idea.

    One thing I've been thinking about is how we should write tutorials differently in the age of LLMs. AI can explain things and often give shockingly good explanations, so perhaps tutorials should become more concise and focus more on intuition and the key ideas, rather than trying to be complete. 🤔

    Another related issue:

  4. alamb commented on Aug 24, 2026

    @alamb
    Contributor

    A separate repo, lower barrier for outside contributors, easier to restructure freely, but risks drifting from releases (precedent: Rust Cookbook, Spice.ai's cookbook repo).

    This is my vote

  5. alamb commented on Aug 24, 2026

    @alamb
    Contributor

    One thing I've been thinking about is how we should write tutorials differently in the age of LLMs. AI can explain things and often give shockingly good explanations, so perhaps tutorials should become more concise and focus more on intuition and the key ideas, rather than trying to be complete. 🤔

    Yes -- I have been dreaming about this too and I have a bunch of ideas that I want to try and help out with. I think this datafusion-cookbook should be primarily targeted at people building software with LLMs / coding tools

    For example, I am imagining a user providing a prompt like this

    "make a duckdb style CLI with variant support for semi-structured types and auto complete SQL optimized for reading from object store"

    I tried something like this at a seminar I was at recently. While claude was able to implement it, I found it took a while and took a bunch of iteration and instruction. I am feeling if it was complicated for me to do it, the barrier is still way too high

    So what I imagine is "testing" this repo regularly with some pre-cooked prompts and then figuring out what is missing to make the process faster and more efficient.

    For example, one thing that is complicated, is figuring out versions and how to integrate them. One thing I could see is a table / listing of all the various datafusion "plugins" that exist (e.g. datafusion distributed, flight, etc) as well as pointers to version compatibility and installation instructions / examples

  6. alamb commented on Aug 24, 2026

    @alamb
    Contributor

    If there are no objections, how about I create datafusion-contrib/datafusion-cookbook and we can start working on a draft there?

  7. alamb commented on Aug 25, 2026

    @alamb
    Contributor

    It turns out that @timvw had actually started this 4 years ago

    However, it has had no activity for a while, so I also added @edmondop as an admin too.

    Maybe we can brush it up, and we can get something started to start with

  8. alamb commented on Aug 27, 2026

    @alamb
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions