Function to bypass the compilation overrides on only particular refs #2124
Unanswered
benjikj-cera
asked this question in
Q&A
Replies: 1 comment
-
|
I've shown an example here of a custom The reason you're getting an error in your original question is that the If you need to develop only a small amount of models (compared to the overall size of DAG), I'd suggest:
So your developed model can look like this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to get more sophisticated with source selection during model development and would love some ideas on whether this is achievable via a Dataform macro/include.
Context: My compilation overrides replace the GCP project ID (swapping
-prodfor-dev) and append a schema suffix (_benjikj). This means all modelref()calls in my workspace point to dev tables.The problem: When I'm developing a model mid-pipeline, I want per-ref control over whether the override applies. Specifically:
This lets me test a downstream model against real prod data for untouched sources, while still pulling from my dev tables for anything I've actually been working on.
Proposed approach: I'm thinking of creating a
ref_prodmacro that wraps the standardref()function but somehow suppresses the compilation overrides for that specific call — so I can swap inref_prodonly where I want prod data, and leave everything else asref.Is this achievable? Is there a better pattern for this kind of selective override suppression in Dataform?
Beta Was this translation helpful? Give feedback.
All reactions