# DRE > DRE (Declarative Reporting Engine) is open-source reports as code: a command-line tool that turns SQL into delivered reports. You keep each report as SQL, Jinja and YAML in git; DRE runs the SQL against your warehouse (DuckDB, PostgreSQL, Databricks or ClickHouse; Snowflake and BigQuery as alphas), writes the result as Excel (xlsx: multi-sheet workbooks, number formats, formulas, totals rows, branded templates), csv, delimited, fixed-width, parquet, HTML or PDF (branded documents from an HTML template, one per row if needed, such as a statement for every member, optionally password-protected), and delivers the file to email, SFTP, S3, GCS, Azure Blob, Databricks Volumes or Slack, as is or in a zip pack (optionally AES-256 password-protected). A report can also send a headline message built from its results (yesterday's revenue, failed payments) to Slack or email, conditionally with `when:`; Microsoft Teams and Google Chat destinations are in preview (release candidates) and take messages only. It runs on the scheduler you already have (cron, Airflow, Dagster, Databricks Jobs). DRE brings the dbt-style workflow to reporting: SQL, Jinja and YAML in git, reusable macros in `macros/`, `var()`, `env_var()`, `ref()`, `source()`, folder config, tags and selectors. Syntax and conventions will feel familiar to dbt users; some semantics differ, including `ref()`, which reuses SQL rather than pointing at a built model. dbt builds the tables; DRE delivers the last mile, the reports people receive. DRE is for recurring reporting, file-delivery and headline-message jobs: monthly finance packs, files for a bank or regulator, extracts for downstream systems, one report per store or region. It is not a BI dashboard tool, a transformation tool or a scheduler. Everything is plain YAML and SQL, every command except `dre init` runs without prompts, and `--log-format json`, `dre validate --json` and `dre ls --output json` give machine-readable output, so coding agents can drive it. DRE MCP is a separate companion in release-candidate preview, available by request under its own early-access EULA. It distinguishes verified report outputs, derived answers from saved results, and unverified exploratory queries with SQL to review. DRE core remains GPL-3.0. See the [MCP demo](https://getdre.com/use-cases/trustworthy-ai-with-mcp/) and [licensing details](https://getdre.com/licensing/). ## Contact - [Contact DRE](https://getdre.com/contact/): questions, reporting use cases, ideas, feedback and MCP preview access ## Reporting examples - [Reporting use cases](https://getdre.com/use-cases/): recurring reports, exact file layouts, messages, templates and delivery recipes - [Runnable projects](https://getdre.com/examples/): complete SQL and YAML projects validated in CI - [Monthly finance pack](https://getdre.com/use-cases/monthly-finance-pack/): Excel workbook, SQL, configuration and downloadable output - [Fixed-width bank file](https://getdre.com/use-cases/file-for-a-bank/): exact column layout and SFTP delivery - [Slack headline](https://getdre.com/use-cases/daily-headline-to-slack/): message reports built from query results - [A PDF statement for every member](https://getdre.com/use-cases/statement-for-every-member/): per-row PDFs and emails, held until a checker releases them ## Guides - [Automate SQL reports to Excel](https://getdre.com/guides/automate-sql-reports-to-excel/): the Python script approach and the DRE approach, side by side - [Schedule SQL reports](https://getdre.com/guides/schedule-sql-reports/): named schedules, firing previews and reproducible reruns with your existing orchestrator - [DRE and dbt](https://getdre.com/dbt/): from dbt models to formatted Excel workbooks - [SAS reporting to DRE](https://getdre.com/guides/sas-reporting-to-dre/): released synthetic Oracle/SQL Server example, checked workbooks and a real code-comparison/workflow recording. Technical guide records the SAS reference execution status and DRE 0.10.0 requirements. ## Docs - [Full text](https://getdre.com/llms-full.txt): every page of this site and the latest docs in one Markdown file - [Documentation](https://getdre.com/docs/): every page, by section below - [Plugins](https://getdre.com/plugins/): sources, formats and destinations, with versions - [MCP documentation](https://getdre.com/docs/mcp/): overview, installation, client setup, exposure configuration, tools and provenance - [Agents](https://getdre.com/agents/): agent skills for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and others - [Licensing](https://getdre.com/licensing/): GPL-3.0, and a commercial licence for embedding DRE in a product - [About DRE](https://getdre.com/about/): why DRE exists, how it is built, tested and released, and who started it ## Docs: Get started Install DRE, learn the ideas, and make a first report. - [Getting started](https://getdre.com/docs/getting-started/index.md): Build your first DRE report: let a coding agent with DRE's skills set it up for you, or write the SQL and YAML yourself and run it from the command line. - [Install](https://getdre.com/docs/install/index.md): Install DRE on macOS, Linux or Windows with the install script, Homebrew, Scoop, pip or cargo, verify the download, and check the installed command. - [Your first report in 10 minutes](https://getdre.com/docs/first-report/index.md): Build an Excel report with DuckDB, then add variables, tabs, formats, Sets, a schedule and local delivery. - [Concepts](https://getdre.com/docs/concepts/index.md): Reports, Sets, Bindings, templates, lookups, plugins, delivery, logs, verification and selecting. ## Docs: MCP Install the MCP companion, connect an AI client, review exposure and understand result provenance. MCP is a separate release-candidate companion requiring DRE 0.4.1 or later. - [MCP overview](https://getdre.com/docs/mcp/index.md): Use DRE MCP to find reviewed reports, refine saved results and explore documented tables with clear provenance. - [MCP: install and connect](https://getdre.com/docs/mcp-setup/index.md): Install DRE MCP, review its licence, validate your reporting project and connect a local stdio MCP client. - [MCP configuration and scope](https://getdre.com/docs/mcp-configuration/index.md): Control exposed reports, report-linked tables, explicit schemas, exclusions and retention in DRE MCP. - [MCP tools and provenance](https://getdre.com/docs/mcp-tools/index.md): Understand DRE MCP’s report discovery, execution, refinement and exploration tools, result labels and downloads. - [AI-ready reports](https://getdre.com/docs/ai-ready-reports/index.md): Turn reviewed report logic and upstream documentation into trustworthy context for AI. ## Docs: Build reports Queries, outputs, templates, lookups and messages. - [Build and run reports](https://getdre.com/docs/building-reports/index.md): Commands, the report YAML, profiles, dependencies and what a run does. - [Templates](https://getdre.com/docs/templates/index.md): Jinja in SQL, paths and options: connection, destination, source(), profile(), columns(), dates and timezones. - [Lookups](https://getdre.com/docs/lookups/index.md): Lookups are mapping tables kept as files in your project, with typed columns, loaded inline or as a temp table, plus quoting, an example and common errors. - [Messages](https://getdre.com/docs/messages/index.md): Headline numbers to Slack, Teams, Google Chat and email, built from a report's own queries. - [Per-row outputs](https://getdre.com/docs/per-row-outputs/index.md): One statement, file or email per member, client or account from one run: for_each, each.*, failures, retries, masking and held deliveries. - [Password-protect PDFs and zip report packs](https://getdre.com/docs/password-protected-outputs/index.md): Send password-protected PDF statements and AES-256 zip packs: pdf password:, zip: on destinations, secret_columns masking, and the password by another route. - [DRE practices](https://getdre.com/docs/practices/index.md): The opinions DRE’s agent skills give, and the reasons behind them. - [Project configuration](https://getdre.com/docs/project-configuration/index.md): Share defaults, override reports and Sets, and bound template queries. - [Tested examples](https://getdre.com/docs/examples/index.md): Complete, copyable projects with checked output: Excel, bank files, Sets, messages, SFTP, cloud storage, warehouses and password-protected statements. - [Moving from SAS, SSRS or Crystal](https://getdre.com/docs/moving-from-ssrs-or-crystal/index.md): Migrate reporting from SAS, SSRS, Crystal or SQL with dre-port: dependency assessment, database SQL, business-rule validation and optional output parity. ## Docs: Connect Connections, targets and the sources reports read. - [Connections and targets](https://getdre.com/docs/connections/index.md): profiles.yml connections and destinations, which target each profile uses, and which connection each query runs on. - [Sources](https://getdre.com/docs/sources/index.md): Declare the tables a project reads in dbt's sources format, read them with source(), and select and check by source. ## Docs: Schedule and run Schedules, orchestrators and where runs write their files. - [Schedules](https://getdre.com/docs/schedules/index.md): Name schedules in schedules.yml, share timings, see when they fire, and run them from your orchestrator. - [Schedule occurrences: dre schedule ls](https://getdre.com/docs/schedule-ls/index.md): When a project's schedules fire, as a table or a versioned JSON document with the command for each firing, and its JSON Schema. - [Orchestration recipe](https://getdre.com/docs/orchestration/index.md): Self-host scheduling: load occurrences into a database after every merge, refresh weekly, and run what's due. With Airflow, Databricks Jobs and cron. - [The target path](https://getdre.com/docs/target-path/index.md): The target path: where DRE writes compiled SQL, outputs, snapshots and the project manifest, how overlapping runs are kept apart, and how to clean it. - [Data handling and local files](https://getdre.com/docs/data-handling/index.md): What DRE writes to disk, where it keeps generated files and caches, how long runs are retained, and how to clean them safely. ## Docs: Plugins Installing plugins, the registry, and every first-party plugin. - [Managing plugins](https://getdre.com/docs/managing-plugins/index.md): Plugin packages are installed on demand; how to have them in place before the first run. - [Plugin packages, the registry and dre.lock](https://getdre.com/docs/registry/index.md): Plugin packages, the registry index and dre.lock: how DRE finds, installs and pins plugins, extensions and macro packages, and how to publish a release. - [First-party plugins](https://getdre.com/docs/plugins/index.md): The first-party DRE plugins for sources, formats and destinations, with each one's profile fields and output options and a link to its own page. - [DuckDB](https://getdre.com/docs/plugin-duckdb/index.md): Run report SQL on DuckDB with the duckdb source: profile fields, notes, and running reports on local files without any database server. - [PostgreSQL](https://getdre.com/docs/plugin-postgres/index.md): Run report SQL on PostgreSQL with the postgres source: profile fields, TLS, SSH bastions, and checking the connection before porting a report. - [Databricks](https://getdre.com/docs/plugin-databricks/index.md): The databricks source and destination: SQL warehouses, Volumes and workspace files. - [BigQuery](https://getdre.com/docs/plugin-bigquery/index.md): Run report SQL on Google BigQuery with the bigquery source: sign-in methods, job settings, notes, and testing the billing and data projects separately. - [Snowflake](https://getdre.com/docs/plugin-snowflake/index.md): Run report SQL on Snowflake with the snowflake source: sign-in methods, role, warehouse and connection settings, and testing the chosen role and warehouse. - [ClickHouse](https://getdre.com/docs/plugin-clickhouse/index.md): The clickhouse source: HTTP or native, TLS, ClickHouse Cloud and SSH bastions. - [csv and delimited](https://getdre.com/docs/plugin-csv/index.md): Write CSV and other delimited text files with the csv and delimited formats: options, quoting and encoding, and exporting a file for a downstream importer. - [Fixed-width text](https://getdre.com/docs/plugin-fixed_width/index.md): Write fixed-width text files, such as payment files for a bank, with the fixed_width format: column layout, value padding, and checking the receiver's layout. - [Parquet](https://getdre.com/docs/plugin-parquet/index.md): Write Parquet files with the parquet format: how query column types map to Parquet types, and keeping types intact in an export for an analytics platform. - [Excel (xlsx)](https://getdre.com/docs/plugin-xlsx/index.md): Write Excel workbooks with the xlsx format: multi-sheet tabs, column widths, styles, number formats, formulas, totals rows and branded templates. - [PDF and HTML documents](https://getdre.com/docs/plugin-document/index.md): The html and pdf formats: a branded document from a Jinja HTML + CSS template, with no browser. - [Amazon S3](https://getdre.com/docs/plugin-s3/index.md): Deliver reports to Amazon S3 or S3-compatible storage with the s3 destination: credentials, paths, notes, and delivering a dated finance export. - [Google Cloud Storage](https://getdre.com/docs/plugin-gcs/index.md): Deliver reports to Google Cloud Storage with the gcs destination: credentials, bucket paths, notes, and archiving a workbook with application credentials. - [Azure Blob Storage](https://getdre.com/docs/plugin-azure_blob/index.md): Deliver reports to Azure Blob Storage with the azure_blob destination: credentials, container paths, notes, and archiving a workbook with an Azure identity. - [SFTP](https://getdre.com/docs/plugin-sftp/index.md): Deliver report files over SFTP with the sftp destination: host keys, key and password sign-in, the RSA advisory, and uploads that never land half-written. - [FTP and FTPS](https://getdre.com/docs/plugin-ftp/index.md): Deliver report files over FTP or explicit FTPS with the ftp destination: connection settings, notes, and sending an export over FTPS. - [Email](https://getdre.com/docs/plugin-email/index.md): Send reports by email with the email destination: SMTP settings, recipients, attachments and options, and configuring the sender before adding recipients. - [Slack](https://getdre.com/docs/plugin-slack/index.md): Post report files and headline messages to Slack with the slack destination: bot tokens, channels and direct messages, and the headline example project. - [Microsoft Teams](https://getdre.com/docs/plugin-teams/index.md): Post report headline messages to Microsoft Teams with the teams destination: Workflows webhooks, notes, and adapting a headline to Teams. - [Google Chat](https://getdre.com/docs/plugin-google_chat/index.md): Post report headline messages to Google Chat spaces with the google_chat destination: space webhooks, notes, and adapting a headline to Google Chat. - [JDBC](https://getdre.com/docs/plugin-jdbc/index.md): Connect an optional JDBC source with user-supplied drivers and Java; tested Oracle and SQL Server reporting and catalog discovery, supported types and limits. ## Docs: Reference The command line, every YAML file, error codes, environment variables and the manifest. - [CLI reference](https://getdre.com/docs/cli-reference/index.md): Every dre command, subcommand and flag, with defaults and environment variables. - [YAML reference](https://getdre.com/docs/yaml-reference/index.md): Every key of every YAML file a DRE project uses, generated from the JSON Schemas. - [dre\_project.yml reference](https://getdre.com/docs/reference-project/index.md): Every key of dre_project.yml, the DRE project file: default profile and output, reports, flags, dispatch and plugins, with their types. - [Report YAML reference](https://getdre.com/docs/reference-report/index.md): Every key of a report YAML file: queries, output, destinations, Sets and templates. - [sets.yml reference](https://getdre.com/docs/reference-sets/index.md): Every key of a Sets file, which runs one report once per client, region or store with its own variables, file names and recipients. - [schedules.yml reference](https://getdre.com/docs/reference-schedules/index.md): Every key of schedules.yml, where named schedules say which report runs when and with which variables, including the every key for recurring timings. - [timings.yml reference](https://getdre.com/docs/reference-timings/index.md): Every key of timings.yml: named timings that several schedules share, including the every key, so one change moves every schedule that uses it. - [profiles.yml reference](https://getdre.com/docs/reference-profiles/index.md): Every key of profiles.yml: connections, destinations and their targets. - [Sources reference](https://getdre.com/docs/reference-sources/index.md): Every key of a sources declaration: sources, tables and columns, as in dbt. - [dependencies.yml reference](https://getdre.com/docs/reference-dependencies/index.md): Every key of dependencies.yml: the plugin packages, companion extensions and macro packages a DRE project installs, and how dre.lock pins them. - [Lookup config reference](https://getdre.com/docs/reference-lookups/index.md): Every key of a lookup's config file: the columns, types and loading options of a mapping table kept as a file in your DRE project. - [Error codes reference](https://getdre.com/docs/reference-error-codes/index.md): Every error code DRE reports, grouped by usage, config, plugins, connections, queries and delivery, with what each one means and how to fix it. - [Exit codes](https://getdre.com/docs/exit-codes/index.md): What each dre exit code means, so a scheduler knows whether to retry, alert or stop. - [Environment variables](https://getdre.com/docs/environment-variables/index.md): Every DRE_* environment variable and what it does, including DRE_RUN_AT to give a scheduled run or a late rerun a fixed, reproducible reporting period. - [The manifest and run\_results.json](https://getdre.com/docs/manifest/index.md): The project manifest and the per-run results file, with the manifest JSON Schema. - [Glossary](https://getdre.com/docs/glossary/index.md): DRE terms, from Bindings and Sets to targets, sources and run artifacts. ## Docs: Upgrading Updating DRE and what changed in each release. - [Updating DRE](https://getdre.com/docs/updating/index.md): Update DRE with dre system update or your install method (Homebrew, Scoop, pip, cargo), and rehearse an update against a small report first. - [Stability contract](https://getdre.com/docs/stability/index.md): The public contracts covered by DRE 1.0, how versions signal changes, and which implementation details remain internal. - [New in 0.12](https://getdre.com/docs/new-in-0.12/index.md): Strict configuration, explicit data-check workflows, versioned machine outputs and migration away from legacy layouts. - [New in 0.10](https://getdre.com/docs/new-in-0.10/index.md): JDBC sources use operator-managed Java, and MiniJinja updates change several template results. - [New in 0.9](https://getdre.com/docs/new-in-0.9/index.md): Selected runs isolate report errors, per-row populations stream to disk, and the core is prepared for large projects. - [New in 0.8](https://getdre.com/docs/new-in-0.8/index.md): A YAML parser update: keys pulled in by <<: merges report the merge line, and a few previously rejected YAML forms now parse. - [New in 0.7](https://getdre.com/docs/new-in-0.7/index.md): Password-protected PDFs, zip report packs with AES-256 passwords on any destination, and secret_columns to keep passwords out of logs and results. - [New in 0.6](https://getdre.com/docs/new-in-0.6/index.md): PDF and HTML documents, per-row outputs (a statement per member), held deliveries with dre release, on_empty, --from-results and delivery rate limits. - [New in 0.5](https://getdre.com/docs/new-in-0.5/index.md): New in DRE 0.5: templates follow Jinja2 more closely (Python-style lists and dicts, rounding, division) and an old flag of dre query and dre catalog is gone. - [New in 0.4](https://getdre.com/docs/new-in-0.4/index.md): Reliable runs and deliveries: exit codes, cancellation and timeouts, run folders, safe uploads, retries, connection checks, Bindings at once, and xlsx styles. - [New in 0.3](https://getdre.com/docs/new-in-0.3/index.md): Messages, several outputs per report, when:, number filters and locale:, and the teams and google_chat destinations. - [Upgrading to 0.2](https://getdre.com/docs/migrating-to-0.2/index.md): Every rename and removed name in DRE 0.2 (connections, targets, sources, template names) and what changed in 0.2.1, with what to write instead. ## Docs: Extend DRE The plugin protocol, building from source and editor setup. - [DRE plugin protocol, version 1](https://getdre.com/docs/protocol/index.md): The DRE plugin protocol, version 1: how a plugin talks to DRE over streams and frames, the handshake, errors and versioning, to write one in any language. - [Building from source](https://getdre.com/docs/building-from-source/index.md): Build dre and the first-party plugins from source: the Rust workspace with cargo and the Go Databricks plugin, for development or an unsupported platform. - [Editor setup](https://getdre.com/docs/editor-setup/index.md): Autocomplete and validation for DRE's YAML files in VS Code and JetBrains, from the JSON Schemas. ## Install - Python / pip (macOS, Linux and Windows): `pip install dre-cli` - Shell installer (macOS and Linux): `curl -fsSL https://getdre.com/install.sh | sh` - Homebrew: `brew install get-dre/tap/dre` - Scoop (Windows): `scoop bucket add get-dre https://github.com/get-dre/scoop-bucket`, then `scoop install get-dre/dre` - Coding agents: `npx skills add get-dre/dre#skills-latest` (Claude Code: `claude plugin marketplace add get-dre/dre`), then ask "help me with dre" ## Source - [github.com/get-dre/dre](https://github.com/get-dre/dre): source and issues