Skip to content

docs: fix invalid pool config in dbt snapshot component examples#33933

Merged
dehume merged 1 commit into
dagster-io:masterfrom
will-warner:docs-fix-dbt-snapshot-pool
Jun 24, 2026
Merged

docs: fix invalid pool config in dbt snapshot component examples#33933
dehume merged 1 commit into
dagster-io:masterfrom
will-warner:docs-fix-dbt-snapshot-pool

Conversation

@will-warner

Copy link
Copy Markdown
Contributor

Summary

The "Preventing concurrent dbt snapshots" section of the dbt patterns docs shows how to put dbt snapshots in a concurrency pool. The example component YAMLs set the pool via post_processing asset attributes:

post_processing:
  assets:
    - target: "*"
      attributes:
        pool: "dbt-snapshots"

This doesn't work: pool is not a valid asset attribute (it is op-level). Loading such a component raises a pydantic ValidationError:

Extra inputs are not permitted [type=extra_forbidden]  # on AssetSpecUpdateKwargsModel, field "pool"

so the examples as written fail to load.

Fix

Set the pool via attributes.op.pool, which DbtProjectComponent applies to the generated multi-asset op (pool=op_spec.pool):

attributes:
  project: '{{ project_root }}/dbt'
  select: "resource_type:snapshot"
  op:
    pool: "dbt-snapshots"

Updated three snippet files referenced by docs/docs/integrations/libraries/dbt/dbt-patterns.md:

  • integrations/dbt/component/snapshot/snapshot.yaml
  • integrations/dbt/component/snapshot/snapshot_sales.yaml
  • integrations/dbt/component/snapshot/snapshot_inventory.yaml

A separate snippet (pythonic/custom_component_incremental_defs.yaml) uses post_processing with partitions_def, which is a valid asset attribute, and is left unchanged.

Verified against dagster 1.13.9 / dagster-dbt 0.29.9.

🤖 Generated with Claude Code

The snapshot concurrency examples set the pool via `post_processing`
asset attributes, but `pool` is not a valid asset attribute (it is
op-level). Loading these components raises a pydantic ValidationError
(`Extra inputs are not permitted` on `AssetSpecUpdateKwargsModel`), so
the examples as written fail to load.

Set the pool via `attributes.op.pool` instead, which `DbtProjectComponent`
applies to the generated multi-asset op (`pool=op_spec.pool`).

Verified against dagster 1.13.9 / dagster-dbt 0.29.9.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes three documentation snippet YAML files where the pool concurrency setting was incorrectly placed under post_processing.assets[*].attributes (an asset-level attribute that does not accept pool) instead of attributes.op.pool (the op-level setting that DbtProjectComponent correctly wires through to @dg.multi_asset). The broken config would raise a Pydantic ValidationError with extra_forbidden when loading the component.

  • snapshot.yaml: Moves pool: "dbt-snapshots" from post_processing.assets block to attributes.op.pool.
  • snapshot_sales.yaml / snapshot_inventory.yaml: Same fix, using their respective pool names (sales-snapshots / inventory-snapshots).

Confidence Score: 5/5

Three documentation YAML snippets are updated with a straightforward and well-scoped config path correction; the fix is verified against the DbtProjectComponent source and OpSpec model.

The change moves pool from a non-existent asset attribute path to attributes.op.pool, which is correctly consumed by DbtProjectComponent._get_op_spec() and passed to @dg.multi_asset(pool=...). The source-level verification (OpSpec.pool field, op_spec.pool usage in component.py) confirms the new config path is valid. No runtime logic is changed — only three documentation snippet files are affected, and the fix is consistent across all three.

No files require special attention; all three changes are identical in structure and clearly correct.

Important Files Changed

Filename Overview
examples/docs_snippets/docs_snippets/integrations/dbt/component/snapshot/snapshot.yaml Correctly moves pool config from invalid post_processing.assets[*].attributes.pool to attributes.op.pool, matching OpSpec.pool wired into @dg.multi_asset. Missing trailing newline is pre-existing.
examples/docs_snippets/docs_snippets/integrations/dbt/component/snapshot/snapshot_sales.yaml Same fix as snapshot.yaml — pool moved to op-level attribute. Pre-existing missing trailing newline unchanged.
examples/docs_snippets/docs_snippets/integrations/dbt/component/snapshot/snapshot_inventory.yaml Same fix as snapshot.yaml — pool moved to op-level attribute. Pre-existing missing trailing newline unchanged.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["snapshot*.yaml\n(YAML component config)"]
    B{"Config path?"}
    C["❌ OLD: post_processing.assets[*].attributes.pool\n→ AssetSpecUpdateKwargsModel\n→ extra_forbidden ValidationError"]
    D["✅ NEW: attributes.op.pool\n→ OpSpec.pool"]
    E["DbtProjectComponent._get_op_spec()"]
    F["@dg.multi_asset(pool=op_spec.pool, ...)"]
    G["Concurrency pool enforced ✓"]

    A --> B
    B -->|Before fix| C
    B -->|After fix| D
    D --> E
    E --> F
    F --> G
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["snapshot*.yaml\n(YAML component config)"]
    B{"Config path?"}
    C["❌ OLD: post_processing.assets[*].attributes.pool\n→ AssetSpecUpdateKwargsModel\n→ extra_forbidden ValidationError"]
    D["✅ NEW: attributes.op.pool\n→ OpSpec.pool"]
    E["DbtProjectComponent._get_op_spec()"]
    F["@dg.multi_asset(pool=op_spec.pool, ...)"]
    G["Concurrency pool enforced ✓"]

    A --> B
    B -->|Before fix| C
    B -->|After fix| D
    D --> E
    E --> F
    F --> G
Loading

Reviews (1): Last reviewed commit: "docs: fix invalid pool config in dbt sna..." | Re-trigger Greptile

@cnolanminich cnolanminich requested a review from dehume June 22, 2026 17:21
@dehume dehume added this pull request to the merge queue Jun 24, 2026
Merged via the queue into dagster-io:master with commit 14205af Jun 24, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants