Provide model definition when using ref override
See original GitHub issueHi,
This is a suggestion for the model definition provider.
Sometimes an override is used for ref
in dbt projects and it would be really nice to have the model definition shortcut working in such cases.
Example override:
{% macro ref_no_db(model_name) %}
{% do return(builtins.ref(model_name).include(database=false)) %}
{% endmacro %}
Suggested solution: override macro must start with “ref_” to simplify parsing.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Using $ref
Local Reference – $ref: '#/definitions/myElement' # means go to the root of the current document and then find elements definitions and myElement one...
Read more >Swagger schema properties ignored when using $ref
A possible workaround is to wrap $ref into allOf - this can be used to "add" attributes to a $ref but not override...
Read more >Allow sibling elements with $ref that overrides the ...
Currently I can either specify a $ref or the complete property description. However there are use cases where refenced definition needs to be ......
Read more >Refs and the DOM
Refs provide a way to access DOM nodes or React elements created in the render method. ... Avoid using refs for anything that...
Read more >ref keyword - C# Reference
To use a ref parameter, both the method definition and the calling ... such as hiding or overriding, in , ref , and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If your overriden ref is not smart enough, then make it smarter: You can get the current scheme and current database and compare it towards the input, if it’s not the same you keep the database.
This is the override we ended up with:
Views are really the only type of model where 2-part names are needed. Everything else defaults to original ref and 3-part names.