Skip to content

arch(compute): independent Query Engine and dbt Gold Processing Engine, including Trino-free profiles #879

Open

Description

@malon64

Implementation issue map — v0.8 parallel tracks

v0.8 architecture decision — two independent engine roles (P1, shared contract)

Deliverable: define a provider-neutral contract that permits query=duckdb + gold=dbt-spark and retains query=trino + gold=dbt-trino as the exact backwards-compatible default. Implementation may progress in parallel across #880 (Spark) and #547 (DuckDB), without requiring either engine to exist before work on the other starts.

Invariants

  • All Gold tables are exclusively built by dbt. dbt build, dbt models, tests, artifacts and Dagster asset lineage stay the contract. Spark means dbt-spark, not independent PySpark/Spark SQL writing Gold. DuckDB is query-only, not a dbt adapter.
  • Query serves interactive reads (Portal, olf query, discovery, agents); Processing Gold runs dbt. The two backends have separate settings, identities, endpoints, lifecycle and resource budgets.
  • Iceberg + stage-isolated Polaris REST/catalog + object storage remain shared truth. No copy or conversion between engines; provider-specific alternatives (Glue) require separate qualification.
  • A deployment without Trino is a target end-to-end combination, only once dbt-spark, DuckDB per-person read-only access, alternative maintenance and all enabled integrations are proved.
  • DuckDB is single-node embedded, not a replacement for distributed interactive workloads. Spark distributes dbt Gold compute; this pairing is not automatically better for heavy interactive queries.

Proposed profile, experimental until gates pass

spec:
  provider:
    type: local  # on-prem existing-cluster target as defined by #802
  preset: slim
  query:
    engine: duckdb             # default: trino
    size: small                # DuckDB worker limits/concurrency vs Trino cluster
  processing:
    gold:
      engine: spark            # default: trino (dbt-trino)
      size: medium             # dbt-spark driver/executor policy
  stages:
    dev:
      enabled: true

Maintain one deployment-scoped choice per role in v0.8; per-product/per-stage engine overrides only if a separate later design justifies them. Engine selection must not be stored in governance.yml or freeze stage endpoints/credentials into ProjectRevision.

Compatibility matrix (proposed, all novel rows gated)

Query Gold processing Expected behavior
Trino dbt-trino Existing supported baseline (both omitted)
Trino dbt-spark Transitional option after Spark conformance; keep Trino service
DuckDB dbt-trino Queries DuckDB; Trino still required for Gold; no resource-free Trino removal
DuckDB dbt-spark Target Trino-free deployment after both backend and cross-stack gates
DuckDB dbt-duckdb Not a target; Gold remains dbt but no DuckDB Gold adapter promised. Revisit only once the DuckDB Iceberg extension supports an atomic table replace (CREATE OR REPLACE) against a REST catalog. The REST protocol allows it (dbt-trino already replaces atomically through Polaris via the Iceberg Java library); the DuckDB client does not implement it yet, so a failed dbt build could leave temporary or half-replaced tables committed. MERGE INTO is not the blocker.
  • Full/analytics stays unsupported for DuckDB query until Superset and associated integration(s) work without Trino; OpenMetadata's Trino ingestion dependency also needs an explicit alternate or disabled capability. No silent service removal.
  • Unsupported provider/capability/backend combination fails closed with a helpful error; keep existing defaults unchanged.

Work to implement

  1. Update tools/olf/olf/common/profile.py, Deployment Profile JSON Schema, resolved topology and olf profile validate/resolve; add two typed engine choices and independent size policies. Expose engine only when implemented/qualified; no accepted no-op fields.
  2. Separate provider/Helm/Terraform contracts for query (interactive, read-only) and processing.gold (dbt writer), per-stage secrets, runtime identities, endpoints, resources and lifecycle.
  3. Make the project-code/dbt manifest and image lifecycle adapter-aware (Trino vs Spark) without embedding environment secrets or varying the immutable ProjectRevision across DEV→PROD.
  4. Route Portal/API/CLI via neutral query backend (separate issue); ensure Gold maintenance is decoupled from Trino before permitting a Trino-free deployment.
  5. Update ADR 0001, ADR 0011, ADR 0019, deployment-profile docs and Roadmap plan: identity, workloads and sizing, observability, on-prem and cloud betas, cost before v1 #183; document Full/Slim/provider restrictions and sizes as actually tested.

Acceptance

  • Architecture diagram and ADR describe two roles and four combinations, including no-Trino target.
  • Both config domains are typed, validated and provider/stage scoped, with read-only query identity distinct from dbt writer.
  • Existing profiles still install exactly Trino + dbt-trino, with no SQL/asset/lineage regressions.
  • Unsupported combinations cannot deploy, even if YAML syntactically validates.
  • An engine or size change never silently changes a project revision, stage data or service permissions.
  • Client routes do not assume a Trino SQL protocol; resource plans do not equate DuckDB with distributed SQL.
  • A no-Trino profile is available only after the integrated gate (follow-up issue) passes.

Parallel workstreams

Milestone: v0.8 (#12), P1 opt-in extension; existing on-prem P0 gates #802/#803/#804 remain mandatory independently.


v0.9-beta addendum (2026-11-23): parallel dbt-polars processing track

This architecture now permits a third Gold compute choice, spec.processing.gold.engine: polars, alongside trino (unchanged default) and spark. dbt-polars and dbt-spark are independent experimental choices, not sequential dependencies; both use dbt build and the same stage-scoped Iceberg catalog. Polars runs as a single-node, ephemeral per-run Kubernetes Job; Spark remains its separate local/distributed runtime. Polars does not replace the query engine.

Roadmap correction: these engine issues now belong to v0.9-beta (milestone #10), not v0.8 as still mentioned in older sections.

Activity

  1. added this to the milestone on Nov 5, 2026
  2. added
    roadmap
    priority: P1
    track: workloads
    on Nov 5, 2026
  3. changed the title [-]arch(compute): separate query serving from dbt Gold processing engines[/-] [+]arch(compute): independent Query Engine and dbt Gold Processing Engine, including Trino-free profiles[/+] on Nov 5, 2026
  4. modified the milestones: , v0.8-beta — Cloud and On-Premises Beta, v0.9-beta — Cloud Cost and Capacity on Nov 19, 2026
  5. malon64 commented on Nov 19, 2026

    @malon64
    CollaboratorAuthor

    Moved from v0.8-beta to v0.9-beta (2026-11-19): v0.8 qualifies the current stack (Trino + dbt-trino) on cloud and on-premises; separating the compute and query engines follows in v0.9, which already targets scale-to-zero and burst capacity for batch and query.

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

    priority: P1roadmaptrack: workloadstype: feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions