Skip to content

Fix dbt Core external seed bootstrap#1365

Open
seamus-mckinsey wants to merge 1 commit into
tuva-health:mainfrom
seamus-mckinsey:seamus/fix-tuva-empty-seeds
Open

Fix dbt Core external seed bootstrap#1365
seamus-mckinsey wants to merge 1 commit into
tuva-health:mainfrom
seamus-mckinsey:seamus/fix-tuva-empty-seeds

Conversation

@seamus-mckinsey

Copy link
Copy Markdown
Contributor

Summary

  • add one all-null bootstrap record to every externally loaded package seed so dbt Core creates its typed relation before the post-hook runs
  • retain existing seed column types and external-load macros; the hook still truncates the bootstrap row before loading the versioned external asset
  • add a dependency-free validator and CI coverage for the placeholder contract

Why

Header-only seed files are skipped by dbt Core, so the external-load post-hook attempts to inspect or truncate a relation that does not exist. This produces BigQuery 404 errors before GCS loading begins.

Validation

  • python3 scripts/check_external_seed_placeholders.py
  • python3 -m unittest scripts/test_check_external_seed_placeholders.py
  • dbt seed --full-refresh --select chronic_conditions__tuva_chronic_conditions_hierarchy with dbt Core + BigQuery: passed; truncate and external GCS load completed, final relation contained 1,583 rows
  • dbt build --full-refresh with dbt Core + DuckDB integration project: PASS=1802 WARN=45 ERROR=0
  • git diff --check

@netlify

netlify Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploy Preview for thetuvaproject canceled.

Name Link
🔨 Latest commit da98798
🔍 Latest deploy log https://app.netlify.com/projects/thetuvaproject/deploys/6a550acbe1a14700082228b0

@seamus-mckinsey
seamus-mckinsey marked this pull request as ready for review July 13, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 Ready for Review

Development

Successfully merging this pull request may close these issues.

1 participant