Skip to content

feat(dbt): make Gold dbt adapters portable across Trino and Spark with Iceberg conformance #887

Open

Description

@malon64

Goal — v0.8 Spark processing correctness gate

Make existing Gold dbt projects run against Spark without forking the product model definitions or using raw Spark writes as an alternative. This issue covers dbt semantics; the Spark SQL execution service is tracked separately.

Current coupling

  • packages/runtime/openlakeforge_runtime/dbt/render_profiles.py defaults to Trino, with Trino-only parse placeholders and templates.
  • images/project-code/pyproject.toml pins dbt-trino, and image build generates stage-neutral dbt manifests.
  • Example lakehouse_code/gold/*/dbt/dbt_project.yml uses materialized: table and on_table_exists: replace; models/sources.yml names logical Silver schema from stage runtime.
  • openlakeforge_runtime/product_dagster.py owns DbtCliResource, dbt_assets, artifacts, OpenLineage and error handling.

Work

  1. Add a spark.yml profile template, environment bindings and version-pinned adapter/dependencies compatible with the Spark runtime; retain trino.yml and default selection. No passwords or stage URLs in ProjectRevision/image.
  2. Validate source(), ref(), generated schema names, correct warehouse + catalog, nested schemas and stage prefixes on Polaris. For Glue: document unsupported until AWS conformance passes.
  3. Compare actual Iceberg materialization semantics for dbt Spark: table replace/atomicity, incremental merge, primary/unique key handling, full refresh, schema evolution, failure halfway through a write, retry/idempotence, snapshot visibility, concurrent writers. Do not claim CREATE OR REPLACE parity without observing committed snapshots.
  4. Preserve versioned, engine-appropriate manifest.json at Dagster definition loading, per-stage environment reparse where needed, deterministic builds and promotion of the same immutable ProjectRevision DEV→PROD.
  5. Preserve dbt build (including tests), Dagster asset keys/graph, per-run run_results.json, dbt logs, OpenLineage and artifact upload. If openlineage-dbt needs an engine-specific adapter, test catalog dataset names in OpenMetadata.

Acceptance

  • All sample Gold products pass dbt build through dbt-spark and read Floe Silver as Iceberg.
  • Output values, schemas, Iceberg snapshots and rollback are compared with dbt-trino, for full and incremental paths.
  • Existing Trino model tests and E2E stay green; source/model code isn't duplicated for Spark.
  • Dagster manifests/asset graphs valid after engine switch; no stale Trino relation names or escaped stage credentials.
  • Failure cases and unsupported dbt materializations cause actionable, fail-closed validation errors.
  • One ProjectRevision digest deploys with different stage bindings and compatible adapters.

Depends on: #879, Spark runtime issue, #880. Parallel with DuckDB query implementation (#547). P1 optional v0.8.

Activity

  1. added this to the milestone on Nov 5, 2026
  2. added
    roadmap
    priority: P1
    track: workloads
    on Nov 5, 2026
  3. modified the milestones: , v0.8-beta — Cloud and On-Premises Beta, v0.9-beta — Cloud Cost and Capacity on Nov 19, 2026
  4. 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