You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having added {{ relation.render() }} everywhere we are now discovering the wide world of custom materializations and macros that people have created. In many of these a relation is not of type Relation but is actually a string, as a result when we call .render() an exception is raised (ex 'str object' has no attribute 'render').
To support these use case we should be more defensive and replace all instances of {{ relation.render() }} with a new macro function that first checks the type and only calls .render if it's supported.
Something like:
{%- macro safe_render_relationl(relation) -%}
{% if relation is string%}
return {{ relation }}
return {{ relation.render() }}
{%- endmacro -%}
or in python:
def safe_render_relation(relation Union[Relation, str]) -> str:
... something similar
Describe alternatives you've considered
No response
Who will this benefit?
No response
Are you interested in contributing this feature?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is this your first time submitting a feature request?
Describe the feature
This is a follow up to #257
Having added
{{ relation.render() }}
everywhere we are now discovering the wide world of custom materializations and macros that people have created. In many of these arelation
is not of typeRelation
but is actually a string, as a result when we call.render()
an exception is raised (ex'str object' has no attribute 'render'
).To support these use case we should be more defensive and replace all instances of
{{ relation.render() }}
with a new macro function that first checks the type and only calls.render
if it's supported.Something like:
or in python:
Describe alternatives you've considered
No response
Who will this benefit?
No response
Are you interested in contributing this feature?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: