docs: fix invalid pool config in dbt snapshot component examples#33933
Conversation
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 SummaryThis PR fixes three documentation snippet YAML files where the
Confidence Score: 5/5Three 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 No files require special attention; all three changes are identical in structure and clearly correct.
|
| 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
%%{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
Reviews (1): Last reviewed commit: "docs: fix invalid pool config in dbt sna..." | Re-trigger Greptile
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_processingasset attributes:This doesn't work:
poolis not a valid asset attribute (it is op-level). Loading such a component raises a pydanticValidationError:so the examples as written fail to load.
Fix
Set the pool via
attributes.op.pool, whichDbtProjectComponentapplies to the generated multi-asset op (pool=op_spec.pool):Updated three snippet files referenced by
docs/docs/integrations/libraries/dbt/dbt-patterns.md:integrations/dbt/component/snapshot/snapshot.yamlintegrations/dbt/component/snapshot/snapshot_sales.yamlintegrations/dbt/component/snapshot/snapshot_inventory.yamlA separate snippet (
pythonic/custom_component_incremental_defs.yaml) usespost_processingwithpartitions_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