Skip to content

feat(processing): dbt-spark Gold backend on Kubernetes over Polaris/Iceberg #880

Open

Description

@malon64

Split implementation tasks (v0.8)

v0.8 — Spark processing track (P1, parallel with DuckDB query)

Goal: make Apache Spark the selectable compute backend for dbt Gold, running distributed on Kubernetes against the existing Polaris Iceberg catalog. Spark must never become an alternate standalone Gold transformation framework. Work starts in parallel with #547 (DuckDB query); only the final no-Trino E2E waits for both tracks.

Mandatory invariants

  • Every Gold table is built from existing lakehouse_code/gold/<product>/dbt models through dbt build; tests, macros, versions, manifest, run_results, Dagster asset keys, lineage and reproducibility remain preserved.
  • Selecting processing.gold.engine: spark must not itself change query.engine; Trino can remain the query backend during Spark development. Once query=duckdb is qualified, run the full Trino-free combination.
  • No naked PySpark DataFrame writer, spark.sql bypass, or direct SparkApplication-to-Gold path as a substitute for dbt.
  • Stage isolation and immutable ProjectRevision/promotion; Polaris/Gl​ue provider compatibility individually gated.

Explicit sub-workstreams (separate implementation issues)

  1. dbt-spark connection/runtime feasibility and orchestration: determine the version-pinned supported adapter/transport (Spark Thrift Server, Livy, or another proven connection method), its actual K8s driver/executor lifecycle and operating cost, and deploy a stage-scoped processing runtime. Do not assume an ephemeral SparkApplication alone implements dbt-spark's SQL connection protocol. Hard fail if no workable execution topology.
  2. dbt profile/materialization conformance: adapter-specific environment profile and stage-neutral manifest strategy; Iceberg REST and S3 credentials, table + atomic replace, incremental/merge, full refresh, tests, schema/catalog naming, crash recovery; prove actual existing reference products.
  3. Dagster operations: dbt_assets, run status, cancellation, logs/artifacts, OpenLineage, autosizing and node failures.
  4. Cross-engine read path: Spark commits Gold; Trino and DuckDB both read the same table immediately after commit with no data copy and consistent snapshots.

Target profile (conditional support)

spec:
  query:
    engine: duckdb   # or trino during migration
    size: small
  processing:
    gold:
      engine: spark
      size: medium

Acceptance

  • One existing dbt Gold project runs via Spark and produces correct Iceberg output from Floe Silver.
  • Document pinned versions, supported dbt-spark connection, Spark deployment topology, resource limits and whether a permanent SQL service is unavoidable.
  • Automated conformance: table replace, incremental MERGE, full refresh, rerun/idempotence, failed partial write, tests and schema consistency.
  • Dagster dbt artifacts and lineage match existing contracts and DEV/PROD isolation.
  • Existing Trino query path still works with Spark Gold; DuckDB query path also works at convergence.
  • No-Trino mode must not depend on Trino Gold maintenance, credential jobs, BI endpoint or SQL service.
  • K3s multi-node execution, worker failure and actual performance/footprint measured; do not assert heavy-workload superiority without evidence.

Parallel dependencies: #879 architecture; #547 DuckDB queries are not a blocker to Spark development. Coordinate with #546 #324 #802 #803 #804. v0.8 experimental/additive; not a P0 on-prem install blocker.

Activity

  1. added this to the milestone on Nov 5, 2026
  2. added
    roadmap
    priority: P2
    track: workloads
    on Nov 5, 2026
  3. changed the title [-]feat(gold): qualify dbt-spark over Kubernetes, Polaris and Iceberg as optional processing backend[/-] [+]feat(processing): dbt-spark Gold backend on Kubernetes over Polaris/Iceberg[/+] on Nov 5, 2026
  4. added
    priority: P1
    and removed
    priority: P2
    on Nov 5, 2026
  5. modified the milestones: , v0.8-beta — Cloud and On-Premises Beta, v0.9-beta — Cloud Cost and Capacity on Nov 19, 2026
  6. 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