DataCoolie examples¶
This library is organized by the folder that owns each example. If you are new to DataCoolie, start with Getting started, then return here for a focused project recipe; otherwise jump directly to the feature you need. Recipes link to the maintained project runner and explain the extracted-project working directory, dependencies, expected output and adaptation point.
- Projects: complete runnable project sources and their build layout.
- Configuration: Driver/provider construction and run options.
- Dataflows: focused metadata, SQL and transformation patterns.
- Runners: host-specific entrypoints that call the Driver.
- Operations: replay, recovery and maintenance wrappers.
- Plugins: extension source and packaging examples.
The table actions use one vocabulary. The action describes what the link does; it does not describe the file's business meaning:
| Action | Meaning | Scope |
|---|---|---|
| source | Opens a generated, readable source projection in the docs. Notebook outputs are omitted. | One file |
| raw | Opens the exact canonical file content/bytes. It may render inline; it is not a project archive. | One file |
| download | Downloads the complete project archive, currently a .zip. |
One project |
| project-files | Jumps to the complete project section in this catalog. It does not download anything. | One project |
| guide | Opens usage, adaptation and verification instructions. | Feature or project |
Use raw when a tool needs the original bytes and source when a person or agent needs the readable projection. A browser saving a raw response is a transport detail, not a separate project download. Standalone files do not have a download action; complete projects use download once at the project root.
Project runners are executable recipes. Focused configuration and metadata
files are snippets or authoring templates unless their page labels a runnable
local contract fixture, such as provider_fixtures.py. Managed-host runners
are host contracts. The WWI medallion walkthrough
is a case study; it is not a local project fixture.
The Markdown in this page is the authored inventory. During a docs build, folder trees and the first column of each marked table are rendered with visible depth prefixes. The links remain ordinary Markdown links so agents and offline readers can follow them without JavaScript. Section anchors are stable navigation targets; file identity comes from the canonical path, not from a displayed tree prefix.
Projects¶
Complete projects preserve their authored internal layout. Projects contain metadata and any input or function/query companions needed by the sample. Most include an environment runner; Platform smoke instead uses the separate canonical host runners linked below. Runtime output folders are intentionally not part of the public inventory.
projects/
โโโ artifact/
โ โโโ data/
โ โ โโโ input/
โ โ โโโ orders.csv
โ โโโ metadata/
โ โ โโโ dataflows/
โ โ โ โโโ orders_query.json
โ โ โโโ connections.json
โ โ โโโ schema_hints.json
โ โโโ queries/
โ โ โโโ orders.sql
โ โโโ runners/
โ โ โโโ dev/
โ โ โโโ run.py
โ โโโ datacoolie.yml
โโโ function/
โ โโโ data/
โ โ โโโ input/
โ โโโ functions/
โ โ โโโ __init__.py
โ โ โโโ range_source.py
โ โ โโโ sources.py
โ โโโ metadata/
โ โ โโโ dataflows/
โ โ โ โโโ orders_function.json
โ โ โโโ connections.json
โ โ โโโ schema_hints.json
โ โโโ runners/
โ โ โโโ dev/
โ โ โโโ run.py
โ โโโ datacoolie.yml
โโโ getting-started/
โ โโโ data/
โ โ โโโ input/
โ โ โโโ customers/
โ โ โ โโโ customers.csv
โ โ โโโ orders/
โ โ โโโ orders.csv
โ โโโ metadata/
โ โ โโโ connections.json
โ โ โโโ dataflows.json
โ โ โโโ schema_hints.json
โ โโโ runners/
โ โ โโโ local/
โ โ โโโ checks.py
โ โ โโโ run_polars.py
โ โ โโโ run_spark.py
โ โโโ datacoolie.yml
โโโ incremental/
โ โโโ data/
โ โ โโโ input/
โ โ โโโ orders/
โ โ โโโ orders.csv
โ โโโ metadata/
โ โ โโโ dataflows/
โ โ โ โโโ orders_incremental.json
โ โ โโโ connections.json
โ โ โโโ schema_hints.json
โ โโโ runners/
โ โ โโโ dev/
โ โ โโโ run.py
โ โโโ datacoolie.yml
โโโ platform-smoke/
โ โโโ data/
โ โ โโโ input/
โ โ โโโ orders/
โ โ โโโ orders.csv
โ โโโ metadata/
โ โ โโโ dataflows/
โ โ โ โโโ orders_platform_smoke.json
โ โ โโโ environments/
โ โ โ โโโ aws-iceberg.json
โ โ โ โโโ aws.json
โ โ โ โโโ databricks.json
โ โ โ โโโ fabric.json
โ โ โ โโโ local.json
โ โ โโโ connections.json
โ โ โโโ schema_hints.json
โ โโโ datacoolie.yml
โโโ transform/
โโโ metadata/
โ โโโ dataflows/
โ โ โโโ orders_clean.json
โ โโโ connections.json
โ โโโ schema_hints.json
โโโ runners/
โ โโโ dev/
โ โโโ run.py
โโโ datacoolie.yml
| File/Folder | Description | Links |
|---|---|---|
artifact/ |
Artifact-relative SQL project with a Polars runner. | guide ยท project-files ยท download |
function/ |
Python function source project with automatic package handling. | guide ยท project-files ยท download |
getting-started/ |
Typed orders onboarding project with Polars/Spark runners, customer refresh and Bronze-to-Silver continuation. | guide ยท project-files ยท download |
incremental/ |
File-source project that persists an integer watermark. | guide ยท project-files ยท download |
platform-smoke/ |
Three-row CSV-to-Delta fixture with local/cloud overlays and separate canonical runners. | guide ยท project-files ยท download |
transform/ |
Small focused transformer project with a Parquet destination. | guide ยท project-files ยท download |
Getting-started project¶
This project is the canonical source for the getting-started guides. It contains a typed orders input, a separate customers full-refresh branch and an orders Bronze-to-Silver partitioned-detail branch. Download Getting-started project (download) for a complete checkout.
Use runners/local/run_polars.py for the shortest local path or
runners/local/run_spark.py for a local Delta-enabled Spark session. The
project-owned guards check input preconditions, intended flow selection,
terminal status, persisted state and Delta output. Runtime .runtime/ and
data/output/ directories are excluded from the public inventory.
projects/getting-started/
โโโ data/
โ โโโ input/
โ โโโ customers/
โ โ โโโ customers.csv
โ โโโ orders/
โ โโโ orders.csv
โโโ metadata/
โ โโโ connections.json
โ โโโ dataflows.json
โ โโโ schema_hints.json
โโโ runners/
โ โโโ local/
โ โโโ checks.py
โ โโโ run_polars.py
โ โโโ run_spark.py
โโโ datacoolie.yml
| File/Folder | Description | Links |
|---|---|---|
datacoolie.yml |
Local environment and metadata build contract. | source ยท raw |
data/ |
Input area; generated runtime output is excluded. | โ |
โโ input/ |
Source fixtures used by the three lessons. | โ |
โโโโ customers/ |
Customer full-refresh source folder. | โ |
โโโโโโ customers.csv |
Two-row customer full-refresh fixture. | source ยท raw |
โโโโ orders/ |
Orders incremental source folder. | โ |
โโโโโโ orders.csv |
Four-row orders fixture with one duplicate order ID. | source ยท raw |
metadata/ |
FileProvider metadata root. | โ |
โโ connections.json |
Input, Bronze, Silver and customer destination roots. | source ยท raw |
โโ dataflows.json |
Orders, customers and dependent Silver flow definitions. | source ยท raw |
โโ schema_hints.json |
Signed IDs, Decimal amount, timestamp and customer type hints. | source ยท raw |
runners/ |
Project-owned execution entrypoints. | โ |
โโ local/ |
Local Polars and Spark runner environment. | โ |
โโโโ checks.py |
Tutorial-owned input, status, state and output guards. | source ยท raw |
โโโโ run_polars.py |
Polars runner for all three lessons. | source ยท raw |
โโโโ run_spark.py |
Spark runner with local Delta session lifecycle. | source ยท raw |
Artifact project¶
This project demonstrates a FileProvider artifact root, artifact-relative SQL and qualified Polars relations. Open Artifact SQL project (download) when a complete checkout is needed. The tree below is generated from the canonical source.
The project runner is runners/dev/run.py (source ยท raw); it registers the Polars relations before executing the artifact-relative query.
projects/artifact/
โโโ data/
โ โโโ input/
โ โโโ orders.csv
โโโ metadata/
โ โโโ dataflows/
โ โ โโโ orders_query.json
โ โโโ connections.json
โ โโโ schema_hints.json
โโโ queries/
โ โโโ orders.sql
โโโ runners/
โ โโโ dev/
โ โโโ run.py
โโโ datacoolie.yml
| File/Folder | Description | Links |
|---|---|---|
datacoolie.yml |
Project and environment build contract. | source ยท raw |
data/ |
Reference fixture area kept outside generated runtime output. | โ |
โโ input/ |
Reference CSV retained with the project; the runner registers its relations in memory. | โ |
โโโโ orders.csv |
Reference CSV kept with the project; the runner registers its two SQL relations in memory. | source ยท raw |
metadata/ |
FileProvider metadata root. | โ |
โโ connections.json |
Connection definitions for the fixture. | source ยท raw |
โโ dataflows/ |
Section-wrapped dataflow metadata. | โ |
โโโโ orders_query.json |
Dataflow using an artifact-relative SQL reference. | source ยท raw |
โโ schema_hints.json |
Explicit input schema hints. | source ยท raw |
queries/ |
Project SQL root referenced by metadata. | โ |
โโ orders.sql |
Qualified SQL query joined after runner table registration. | source ยท raw |
runners/ |
Project-owned execution entrypoints. | โ |
โโ dev/ |
Development environment runner. | โ |
โโโโ run.py |
Local artifact runner invocation. | source ยท raw |
Function project¶
This project demonstrates a Python function source. Its function root contains
__init__.py, so the CLI automatic packaging rule creates a ZIP while the
runner keeps the import prefix explicit. Open Function project
(download) when a complete checkout is needed.
The package entrypoint is functions/init.py (source ยท raw).
projects/function/
โโโ data/
โ โโโ input/
โโโ functions/
โ โโโ __init__.py
โ โโโ range_source.py
โ โโโ sources.py
โโโ metadata/
โ โโโ dataflows/
โ โ โโโ orders_function.json
โ โโโ connections.json
โ โโโ schema_hints.json
โโโ runners/
โ โโโ dev/
โ โโโ run.py
โโโ datacoolie.yml
| File/Folder | Description | Links |
|---|---|---|
datacoolie.yml |
Project and environment build contract. | source ยท raw |
data/ |
Optional input area for the function example. | โ |
โโ input/ |
Empty input area created for project layout consistency. | โ |
functions/ |
Project-owned Python function package root. | โ |
โโ __init__.py |
Makes the configured function root importable. | source ยท raw |
โโ sources.py |
Python source callable referenced by metadata. | source ยท raw |
โโ range_source.py |
Separate custom-reader extension fixture; bundled with this package, but not selected by its dataflow. | guide ยท source ยท raw |
metadata/ |
FileProvider metadata root. | โ |
โโ connections.json |
Connection definitions for the fixture. | source ยท raw |
โโ dataflows/ |
Dataflow metadata selecting the Python function. | โ |
โโโโ orders_function.json |
Dataflow using a packaged Python source. | source ยท raw |
โโ schema_hints.json |
Explicit input schema hints. | source ยท raw |
runners/ |
Project-owned execution entrypoints. | โ |
โโ dev/ |
Development environment runner. | โ |
โโโโ run.py |
Local function project runner. | source ยท raw |
Incremental project¶
This project demonstrates a CSV source, append destination and integer
updated_sequence watermark. Run runners/dev/run.py
(source ยท
raw) once for two rows, run it
again without changing the input to observe a no-change run, append a row with
updated_sequence=3, then run it again with the same runtime root. The last
run appends one row and advances the watermark. Open Incremental project
(download) for a complete checkout.
projects/incremental/
โโโ data/
โ โโโ input/
โ โโโ orders/
โ โโโ orders.csv
โโโ metadata/
โ โโโ dataflows/
โ โ โโโ orders_incremental.json
โ โโโ connections.json
โ โโโ schema_hints.json
โโโ runners/
โ โโโ dev/
โ โโโ run.py
โโโ datacoolie.yml
| File/Folder | Description | Links |
|---|---|---|
datacoolie.yml |
Project and environment build contract. | source ยท raw |
data/ |
Input and output fixture area. Generated output is excluded. | โ |
โโ input/ |
Input partition containing ordered source data. | โ |
โโโโ orders/ |
Orders source folder used by the file reader. | โ |
โโโโโโ orders.csv |
Source rows with advancing sequence values. | source ยท raw |
metadata/ |
FileProvider metadata root. | โ |
โโ connections.json |
Connection definitions for the fixture. | source ยท raw |
โโ dataflows/ |
Dataflow metadata with incremental watermark rules. | โ |
โโโโ orders_incremental.json |
Incremental dataflow and watermark configuration. | source ยท raw |
โโ schema_hints.json |
Explicit input schema hints. | source ยท raw |
runners/ |
Project-owned execution entrypoints. | โ |
โโ dev/ |
Development environment runner. | โ |
โโโโ run.py |
Runner used for repeated incremental loads. | source ยท raw |
Transform project¶
This is the smallest built-in transform example: one dataflow, one synthetic input and one Parquet output. Its metadata focuses on column cleanup and projection. The project runner creates the input when the extracted project does not contain it. Open Transform project (download) for a complete checkout.
projects/transform/
โโโ metadata/
โ โโโ dataflows/
โ โ โโโ orders_clean.json
โ โโโ connections.json
โ โโโ schema_hints.json
โโโ runners/
โ โโโ dev/
โ โโโ run.py
โโโ datacoolie.yml
| File/Folder | Description | Links |
|---|---|---|
datacoolie.yml |
Project and environment build contract. | source ยท raw |
metadata/ |
FileProvider metadata root. | โ |
โโ connections.json |
Connection definitions for the fixture. | source ยท raw |
โโ dataflows/ |
Focused transformer metadata. | โ |
โโโโ orders_clean.json |
Dataflow that cleans and projects order columns. | source ยท raw |
โโ schema_hints.json |
Explicit input schema hints. | source ยท raw |
runners/ |
Project-owned execution entrypoints. | โ |
โโ dev/ |
Development environment runner. | โ |
โโโโ run.py |
Local transform project runner. | source ยท raw |
Platform smoke project¶
Use this three-row fixture for the local rehearsal and managed-platform handoff. The download includes input and metadata; obtain the selected runner through its separate raw action. CLI builds do not upload input or execute notebooks. Cloud variants are setup contracts checked locally.
projects/platform-smoke/
โโโ data/
โ โโโ input/
โ โโโ orders/
โ โโโ orders.csv
โโโ metadata/
โ โโโ dataflows/
โ โ โโโ orders_platform_smoke.json
โ โโโ environments/
โ โ โโโ aws-iceberg.json
โ โ โโโ aws.json
โ โ โโโ databricks.json
โ โ โโโ fabric.json
โ โ โโโ local.json
โ โโโ connections.json
โ โโโ schema_hints.json
โโโ datacoolie.yml
| File/Folder | Description | Links |
|---|---|---|
data/ |
Fixture source directory. | โ |
โโ input/ |
Fixture source directory. | โ |
โโโโ orders/ |
Fixture source directory. | โ |
โโโโโโ orders.csv |
Three known input rows. | source ยท raw |
datacoolie.yml |
Project build/environment configuration. | source ยท raw |
metadata/ |
Fixture source directory. | โ |
โโ connections.json |
Shared metadata and type hints. | source ยท raw |
โโ dataflows/ |
Fixture source directory. | โ |
โโโโ orders_platform_smoke.json |
Shared metadata and type hints. | source ยท raw |
โโ environments/ |
Fixture source directory. | โ |
โโโโ aws-iceberg.json |
Environment-specific connection addressing. | source ยท raw |
โโโโ aws.json |
Environment-specific connection addressing. | source ยท raw |
โโโโ databricks.json |
Environment-specific connection addressing. | source ยท raw |
โโโโ fabric.json |
Environment-specific connection addressing. | source ยท raw |
โโโโ local.json |
Environment-specific connection addressing. | source ยท raw |
โโ schema_hints.json |
Shared metadata and type hints. | source ยท raw |
Configuration¶
These focused files show the public configuration boundaries. A runner owns engine/platform construction and passes metadata, SQL roots, runtime roots and external run attributes to the Driver.
configuration/
โโโ logging_modes.py
โโโ provider_construction.py
โโโ provider_fixtures.py
โโโ run_attributes.py
โโโ sql_roots.py
โโโ standalone_file_provider.py
| File/Folder | Description | Links |
|---|---|---|
logging_modes.py |
Snapshot and JSON-record batch logging configuration. | source ยท raw |
provider_construction.py |
Artifact and explicit provider construction paths. | source ยท raw |
provider_fixtures.py |
Standalone database and API provider startup. | source ยท raw |
run_attributes.py |
External correlation values passed to a Driver session. | source ยท raw |
sql_roots.py |
Resolution through multiple explicit SQL roots. | source ยท raw |
standalone_file_provider.py |
FileProvider construction without a Driver. | source ยท raw |
Dataflows¶
Each dataflow sample focuses on one metadata or execution feature. Inline SQL, SQL files, schema hints, load strategies and transform metadata remain separate authoring references instead of one large pipeline.
dataflows/
โโโ sql/
โ โโโ orders.sql
โโโ format_connections.json
โโโ inline_sql.json
โโโ load_strategies.json
โโโ sql_file.json
โโโ transform_patterns.json
| File/Folder | Description | Links |
|---|---|---|
format_connections.json |
Alternative connection metadata representations. | source ยท raw |
inline_sql.json |
Inline SQL kept directly in source metadata. | source ยท raw |
load_strategies.json |
Append, overwrite and merge load patterns. | source ยท raw |
sql/ |
SQL files kept next to focused metadata examples. | โ |
โโ orders.sql |
Qualified SQL used by the SQL-file example. | source ยท raw |
sql_file.json |
File-backed SQL query metadata. | source ยท raw |
transform_patterns.json |
Column and row transformation patterns. | source ยท raw |
Runners¶
Runners are project code, not a universal dc run command. They register engine relations, adapt host credentials and choose Driver options for a particular environment.
runners/
โโโ aws/
โ โโโ run_glue_spark.py
โ โโโ run_polars_s3.py
โโโ databricks/
โ โโโ maintenance_spark.ipynb
โ โโโ replay_spark.ipynb
โ โโโ run_polars_sdk.py
โ โโโ run_spark.ipynb
โโโ fabric/
โ โโโ run_polars.ipynb
โ โโโ run_polars_azure_sdk.py
โ โโโ run_spark.ipynb
โโโ local/
โโโ maintenance.py
โโโ replay.py
โโโ run.py
โโโ run_artifact_minimal.py
โโโ run_spark.py
| File/Folder | Description | Links |
|---|---|---|
aws/ |
AWS Glue and S3 runner contracts. | โ |
โโ run_glue_spark.py |
AWS Glue Spark runner. | source ยท raw |
โโ run_polars_s3.py |
Polars runner with S3 roots. | source ยท raw |
databricks/ |
Databricks notebook and SDK runner contracts. | โ |
โโ maintenance_spark.ipynb |
Databricks Spark maintenance notebook. | source ยท raw |
โโ replay_spark.ipynb |
Databricks Spark replay notebook. | source ยท raw |
โโ run_polars_sdk.py |
Databricks Polars SDK runner. | source ยท raw |
โโ run_spark.ipynb |
Databricks Spark runner notebook. | source ยท raw |
fabric/ |
Fabric Spark and Polars runner contracts. | โ |
โโ run_polars.ipynb |
Fabric Polars runner notebook. | source ยท raw |
โโ run_polars_azure_sdk.py |
Fabric Polars Azure SDK runner. | source ยท raw |
โโ run_spark.ipynb |
Fabric Spark runner. | source ยท raw |
local/ |
Local Python, Spark, replay and maintenance runners. | โ |
โโ maintenance.py |
Local Polars maintenance runner. | source ยท raw |
โโ replay.py |
Local Polars replay runner. | source ยท raw |
โโ run.py |
Configurable local Polars runner. | source ยท raw |
โโ run_artifact_minimal.py |
Minimal artifact-root runner. | source ยท raw |
โโ run_spark.py |
Local Spark runner. | source ยท raw |
Operations¶
Operational wrappers demonstrate replay, interrupted-session recovery, maintenance confirmation and structured logging without changing the Driver contract.
| File/Folder | Description | Links |
|---|---|---|
replay_recovery.py |
Repeatable replay wrapper with explicit watermark-save confirmation. | source ยท raw |
Plugins¶
Plugin samples show the smallest extension boundary and its packaging metadata. Follow the transformer tutorial to install this package and verify its output through a Driver. The transformer guide explains adaptation and pipeline ordering.
| File/Folder | Description | Links |
|---|---|---|
pii_masker.py |
Example transformer plugin that masks sensitive values. | source ยท raw |
pyproject.toml |
Build metadata, framework dependency and transformer entry point. | source ยท raw |
Using the catalog with the CLI¶
The examples are documentation sources, not a project template. To inspect or build one of the complete projects locally:
Follow the CLI preparation walkthrough when you want a clean download-and-verify sequence. The commands below are the shortest checkout-based equivalent:
dc --project-dir docs/examples/files/projects/artifact validate --format json
dc --project-dir docs/examples/files/projects/artifact build --dry-run --format json
The equivalent executable names are dc and datacoolie. The project and CLI guide explains adaptation, runtime roots and runner ownership.