Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use defer_relation for unit test type detection if available #60

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

jtcohen6
Copy link
Contributor

needed for dbt-labs/dbt-core#9199

Problem

dbt-labs/dbt-core#9199
moves deferral logic to RefResolver. But it won't apply for unit test fixtures because they are materialized ephemeral.

Solution

Within get_fixture_sql itself, use defer_relation if available, then fall back to this.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@mikealfare mikealfare merged commit 154ca61 into main Feb 2, 2024
5 checks passed
@mikealfare mikealfare deleted the jerco/support-deferral-refactor branch February 2, 2024 01:52
@jtcohen6 jtcohen6 requested review from MichelleArk and removed request for MichelleArk February 2, 2024 12:32
@jtcohen6 jtcohen6 restored the jerco/support-deferral-refactor branch February 19, 2024 13:32
@jtcohen6 jtcohen6 deleted the jerco/support-deferral-refactor branch February 19, 2024 13:33
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.

3 participants