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
Currently in databases like postgres (at least pre v16) we attempt to inject subqueries with aliases. This can create a poor user experience as when they write something like:
select * from {{ source('my_table') }} as my_source where x=y
and run with --empty, we produce something like:
select * from {{ source('my_table') }} as _dbt_limit_subq as my_source where x=y
The duplicate aliases are invalid sql.
The challenge is that in order to know whether the ref already has an alias.
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:
To anyone searching for a quick short term solution:
We used a dirty hack to run our pipelines with --empty. We parse our sql after it compiles here and remove double aliases where it breaks our code.
Is this your first time submitting a feature request?
Describe the feature
Follow up from: #124
Currently in databases like postgres (at least pre v16) we attempt to inject subqueries with aliases. This can create a poor user experience as when they write something like:
and run with
--empty
, we produce something like:The duplicate aliases are invalid sql.
The challenge is that in order to know whether the ref already has an alias.
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: