Skip to content

fix: DbtProcess/DbtColumnProcess extend correct process parent (SHA-887)#923

Merged
Aryamanz29 merged 1 commit into
mainfrom
SHA-887/dbt-process-superclass-fix
May 1, 2026
Merged

fix: DbtProcess/DbtColumnProcess extend correct process parent (SHA-887)#923
Aryamanz29 merged 1 commit into
mainfrom
SHA-887/dbt-process-superclass-fix

Conversation

@Aryamanz29
Copy link
Copy Markdown
Member

Same root cause as the DbtMeasure fix in 9.7.0 (#919) — Atlas typedefs list Dbt first in superTypes, the class generator picks super_types[0], and atlan-publish-app's issubclass(cls, Process) / issubclass(cls, ColumnProcess) checks (used to identify lineage types that must publish after the entities they reference) silently return False. The dbt-process classes then land in Batch 1 alongside their upstream entities and ATLAS-404 on every inputs / outputs lookup. ~35 publish failures observed in a live dbt run, plus the same pattern hits SAP BW connectors.

Atlas typedefs

Class superTypes (Atlas) Picked by generator Should pick
DbtProcess [\"Dbt\", \"Process\"] Dbt Process
DbtColumnProcess [\"Dbt\", \"ColumnProcess\"] Dbt ColumnProcess

Sibling type DbtMeasure was fixed via the same mechanism in 9.7.0 — this PR uses the same _SUPERCLASS_OVERRIDES map.

Changes

  • pyatlan/generator/class_generator.py — extend _SUPERCLASS_OVERRIDES with \"DbtProcess\": \"Process\" and \"DbtColumnProcess\": \"ColumnProcess\". The override only applies when the named supertype is actually declared on the entity, so a future typedef change that drops it cleanly errors rather than silently reverting.
  • pyatlan/model/assets/dbt_process.pyclass DbtProcess(Process) and class Attributes(Process.Attributes).
  • pyatlan/model/assets/dbt_column_process.py — same shape against ColumnProcess.

Blast radius

Same as the DbtMeasure fix:

  • isinstance(x, Dbt) on a DbtProcess / DbtColumnProcess was True, is now False. That check was incorrect — Atlas does not model DbtProcess as a Dbt subtype in a way that's meaningful for ordering. A grep across pyatlan and its tests finds no such isinstance usage.
  • Serialised JSON (type_name, attribute keys) is unchanged — every dbt_* and Process / ColumnProcess field is declared inline on the respective Attributes classes, so no fields are lost; only the MRO is corrected.

Tests

  • tests/unit/model/dbt_process_test.py — 7 cases (issubclass guards both directions, __bases__[0], type_name immutability, dbt_* and Process attribute round-trip on the same instance).
  • tests/unit/model/dbt_column_process_test.py — same 7 cases for the ColumnProcess parent.

Verified

  • ./qa-checks — ruff format / ruff check / mypy all pass
  • pytest tests/unit/model/dbt_process_test.py tests/unit/model/dbt_column_process_test.py -q — 14/14 pass
  • Full unit suite clean (no new failures)
  • Downstream verification in atlan-publish-app once this ships: DbtProcess / DbtColumnProcess move to a strictly later batch than the entities they reference

Notes

Release notes will land in the next version bump (HISTORY.md is left alone here so 9.7.0's already-shipped section isn't retroactively edited). The typing.get_type_hints shim that was bundled into the closed PR #922 has been dropped — the better fix is on the publish-app side (switching to pydantic v1's ModelField.type_ / .shape, which are already fully resolved at SDK import time via update_forward_refs). A separate publish-app PR will land that change.

🤖 Generated with Claude Code

Same root cause as the DbtMeasure fix in 9.7.0 — Atlas typedefs list
``Dbt`` first in ``superTypes``, the class generator picks
``super_types[0]``, and publish-app's ``issubclass(cls, Process)`` /
``issubclass(cls, ColumnProcess)`` checks (used to identify lineage types
that must publish *after* the entities they reference) silently return
False. The dbt-process classes then land in Batch 1 alongside their
upstream entities and ATLAS-404 on every ``inputs`` / ``outputs`` lookup.

Atlas typedefs:
- DbtProcess.superTypes = ["Dbt", "Process"]            → should be Process
- DbtColumnProcess.superTypes = ["Dbt", "ColumnProcess"] → should be ColumnProcess

Fix
- pyatlan/generator/class_generator.py: extend _SUPERCLASS_OVERRIDES with
  "DbtProcess": "Process" and "DbtColumnProcess": "ColumnProcess".
- pyatlan/model/assets/dbt_process.py: ``class DbtProcess(Process)`` and
  ``class Attributes(Process.Attributes)``.
- pyatlan/model/assets/dbt_column_process.py: same shape against
  ``ColumnProcess``.

The override only applies when the named supertype is actually declared
on the entity, so a future typedef change that drops it cleanly errors
rather than silently reverting.

Tests
- tests/unit/model/dbt_process_test.py — 7 cases (issubclass guards,
  __bases__[0], type_name immutability, dbt_* + Process attribute
  round-trip on the same instance).
- tests/unit/model/dbt_column_process_test.py — same 7 cases for the
  ColumnProcess parent.

Verified
- ./qa-checks: ruff format / ruff check / mypy all pass.
- 14/14 new tests pass; full unit suite clean.

Release notes will land in the next version bump (HISTORY.md is left
alone here so 9.7.0's already-shipped section isn't retroactively
edited).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Aryamanz29 Aryamanz29 merged commit 8e8210d into main May 1, 2026
66 of 74 checks passed
@Aryamanz29 Aryamanz29 self-assigned this May 1, 2026
@Aryamanz29 Aryamanz29 added the bugfix Bug fix pull request label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fix pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant