Walkthrough

The reader creates a Neon project, runs one local setup command, then tries CLI Shadow Review and local Airflow. Nothing on this page is a connection string or a role password.

Before you start: install the local CLI

Use a Bash terminal on Linux, macOS, or WSL, with Git and Python 3.12 installed. The Airflow section also needs Docker Engine or Docker Desktop running, with Docker Compose v2. Start from the project repository:

git clone --branch master https://github.com/youzaina001/airflow-dq-agent.git
cd airflow-dq-agent
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
dq-agent --help

Run the remaining commands from this directory in the same terminal. A live model is optional: the walkthrough uses LLM_MODE=stub, the default, and needs no model credential.

1. Create the project you own

The reader creates and owns the Neon project on the free plan and adds no payment method, so a quota breach suspends the project instead of charging them. Free-plan compute scales to zero after 5 minutes and cannot be disabled. The reader controls the lifecycle of that project (keep, suspend, or delete it).

Keep the owner connection string on the reader's machine. Do not send it to this site, and do not add a payment method to keep the project from being suspended.

2. Run setup

setup is a local command. It requires --dsn and the owner connection string. It does not fall back to the process warehouse setting. It does not call a Neon API.

Paste the owner connection string into this hidden local prompt, then pass the quoted value to setup:

read -r -s -p 'Owner connection string: ' OWNER_DSN
printf '\n'
dq-agent setup --dsn "$OWNER_DSN"
unset OWNER_DSN

Success is exit 0, and only after schema install, synthetic warehouse seed, and restricted-login provisioning have all finished. Standard output is exactly these four lines:

setup: ready
read: <read connection string>
audit: <audit connection string>
apply: <apply connection string>

The three login lines are distinct. The connection string and the generated role passwords stay on the reader's machine. This page does not show them.

A missing or refused connection string exits 2. Standard output is exactly the following line. There is no setup: ready line and there are no login lines.

command: incomplete: setup or execution error

3. Run setup again

To restart the walkthrough later, repeat the setup commands above. A second successful run recreates the synthetic warehouse and replaces the three login passwords. Passwords from the previous run no longer work. The new login lines are again only on the reader's machine. Use the newest output in the next step; if Airflow is already running, recreate its containers after exporting the replacement values.

4. What seed still does

seed still recreates the local warehouse from the process warehouse setting. Invoke it as dq-agent seed. It does not take a connection string, and it does not print login passwords. It is not a substitute for setup.

5. CLI Shadow Review

At each prompt below, paste only the connection-string value after read: , audit: , or apply: from the newest setup output, without that label or added quotes. Exporting makes the values available to both the CLI and Docker Compose. The apply login remains unused while APPLY_MODE=off.

read -r -s -p 'Printed read value: ' READ_DSN
printf '\n'
read -r -s -p 'Printed audit value: ' AUDIT_DSN
printf '\n'
read -r -s -p 'Printed apply value: ' APPLY_DSN
printf '\n'
export READ_DSN AUDIT_DSN APPLY_DSN
export WAREHOUSE_DSN="$READ_DSN"
export TRACE_POSTGRES=true LLM_MODE=stub APPLY_MODE=off
unset REGISTRY_PATH
dq-agent shadow

TRACE_POSTGRES=true writes the review to PostgreSQL. Running dq-agent shadow with no registry argument loads the demo catalog for this process. In a fresh clone, leave REGISTRY_PATH unset; if reusing a checkout, remove any adopter registry setting from your local configuration before following this synthetic demo. The known seeded quality defects produce exit 1 and a review; exit 2 means setup or check execution is incomplete.

That review records PostgreSQL Audit Lineage through the audit login. It is an evaluated, sample-free Remediation Plan review. Quality Evidence from the failed checks is what a Remediation Plan may use. Check Policy remains the reviewed law for what may be compiled. The review does not take a Human Decision and does not create an Apply Admission.

A JSONL-only trace is a local demonstration, not a completed PostgreSQL Shadow Review. Leaving PostgreSQL tracing off (TRACE_POSTGRES=false) is that JSONL-only case.

6. Local Airflow for the synthetic daily demo

The repository's docker-compose.yaml runs the synthetic daily demo in dags/dq_daily.py. Keep the exported settings from step 5 in this terminal. Compose explicitly passes READ_DSN, AUDIT_DSN, APPLY_DSN, TRACE_POSTGRES, LLM_MODE, and APPLY_MODE into the Airflow services. Do not merely set unexported shell variables or edit a host-only configuration file: the scheduler and DAG processor must receive the printed Neon logins.

Build the image, initialize the local metadata database and UI account, then start the interface, scheduler, DAG processor, and triggerer:

export AIRFLOW_UID="$(id -u)"
mkdir -p logs plugins config dags traces
docker compose build
docker compose run --rm airflow-init
docker compose up -d airflow-apiserver airflow-scheduler airflow-dag-processor airflow-triggerer
docker compose ps

Continue after initialization exits successfully and the services are running. Airflow's metadata stays in the local postgres service and airflow_pg volume. Compose also starts its bundled local warehouse dependency, but dq_daily reads the exported READ_DSN and writes Audit Lineage through AUDIT_DSN in your Neon project. Leave the metadata connection setting unchanged. Setup has already seeded Neon; do not run make seed for this journey.

  1. Open the local Airflow interface. Sign in with the local demo username and password declared as _AIRFLOW_WWW_USER_USERNAME and _AIRFLOW_WWW_USER_PASSWORD in docker-compose.yaml.
  2. Find dq_daily in the DAG list. It starts paused. Unpause it, then use Trigger DAG to start a run.
  3. Open the run's task graph and logs. The suite, proposal, candidate audit, and plan review tasks run against the synthetic warehouse. With APPLY_MODE=off, require_approval and the downstream Human Decision and apply tasks are skipped; that is expected.

If the UI or DAG is not ready, inspect docker compose logs airflow-apiserver airflow-scheduler airflow-dag-processor. After replacing exported logins, recreate the running services so they receive them:

docker compose up -d --force-recreate airflow-apiserver airflow-scheduler airflow-dag-processor airflow-triggerer

When finished, docker compose stop stops the local services while keeping their data. This release includes no hosted Airflow service and no custom domain.

7. Human Decision and apply

Human Decision and apply stay on the existing external-invoice example, examples/dq_external_invoice.py; its setup is documented in the repository README. Do not turn the synthetic daily demo into that journey by swapping its catalog. setup does not prepare that example: it does not seed the external-invoice table and it does not load that catalog.

Apply in this release is Quarantine only. Quarantine is a copy of the authorized Remediation Target Set, not a repair of source rows. An Apply Admission is the durable authorization to execute one evaluated Remediation Plan after its whole-plan Human Decision. Check Policy remains the reviewed law for what may be compiled.

This release does not claim a Neon project or the Pages site is already deployed. Creating the Cloudflare Pages project and attaching it to master is a dashboard action and has not been done.