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
I have searched the existing issues, and I could not find an existing issue for this feature
I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion
Describe the feature
Hi, am using dbt pg adaptator.
I want to use the --empty feature but it doesn't work in my context.
In fact, we have source tables with hyphens in the name (e.g. my-table).
This feature does not take quoting configuration into account.
dbt run --select my_marts --empty
16:33:54 Running with dbt=1.9.1
16:33:54 Registered adapter: postgres=1.9.0
16:33:54
16:33:54 …
16:33:54
16:33:55 1 of 1 START sql table model public.my_marts ....... [RUN]
16:33:56 1 of 2 ERROR creating sql table model public.my_marts [ERROR in 0.45s]
16:33:56
16:33:56 …
16:33:56
16:33:56 Database Error in model my_marts (models/marts/my_marts.sql)
syntax error at or near "-"
LINE 17: ..." where false limit 0) _dbt_limit_subq_my-table
^
compiled code at target/run/my_project/models/marts/my_marts.sql
16:33:56
16:33:56 Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1
Is this your first time submitting a feature request?
Describe the feature
Hi, am using dbt pg adaptator.
I want to use the
--empty
feature but it doesn't work in my context.In fact, we have source tables with hyphens in the name (e.g.
my-table
).This feature does not take quoting configuration into account.
The problem is in the alias of the subquery:
_dbt_limit_subq_my-table
, there's a hyphen in the alias.I think the
_render_subquery_alias
function (dbt-adapters/src/dbt/adapters/base/relation.py
) should take into account theself.quote_policy
.This test should then pass:
Describe alternatives you've considered
No response
Who will this benefit?
Enable use of the
--empty
feature for all dbt users who have source tables with a special format.Are you interested in contributing this feature?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: