Skip to content

fix: add namespace to adapter.dispatch(), qualify macro calls#9

Merged
tomreitz merged 1 commit into
edanalytics:mainfrom
pinkberg-eh:main
Jun 3, 2026
Merged

fix: add namespace to adapter.dispatch(), qualify macro calls#9
tomreitz merged 1 commit into
edanalytics:mainfrom
pinkberg-eh:main

Conversation

@pinkberg-eh
Copy link
Copy Markdown
Contributor

Before this PR, I was getting compiler errors from dbt_synth_data like:

Compilation Error in model _my_model_fixture (models/.../fixtures/_my_model_fixture.sql)
  In dispatch: No macro named 'synth_distribution_continuous_uniform' found within namespace: 'None'
      Searched for: 'snowflake__synth_distribution_continuous_uniform', 'default__synth_distribution_continuous_uniform'
  
  > in macro synth_distribution_continuous_uniform (macros/distributions/continuous/uniform.sql)
  > called by macro synth_distribution_discrete_probabilities (macros/distributions/discrete/probabilities.sql)
  > called by macro synth_distribution_discrete (macros/distributions/util.sql)
  > called by macro synth_distribution (macros/distributions/util.sql)
  > called by model _my_model_fixture (models/.../fixtures/_my_model_fixture.sql)

I'm compiling against Snowflake, but I believe this affects all adapters.

This regression may have been caused by DBT's choice to move adapters out of dbt-core.

Copy link
Copy Markdown
Collaborator

@tomreitz tomreitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for the contribution, @pinkberg-eh!

We've been getting around this by setting

macro-paths: ["macros", "dbt_packages/dbt_synth_data/macros"]

in dbt_project.yml, but that's a workaround, not a solution. Yours is the correct approach here; I've tested and approve.

@tomreitz tomreitz merged commit 9798b15 into edanalytics:main Jun 3, 2026
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