dbt-databricks
dbt-databricks copied to clipboard
Query generation fails when a column name startswith "#"
Describe the bug
I ingest raw data in a bronze table. One of the fields starts with a "#". The first dbt run
works successfully but other attempts fail with
[UNRESOLVED_COLUMN.WITHOUT_SUGGESTION] A column or function parameter with name `from` cannot be resolved. ; line 4 pos 12
Steps To Reproduce
I reproduced my issue with this toy example:
{{
config(
materialized="incremental",
incremental_strategy="insert_overwrite",
options={
"mergeSchema": "true"
}
)
}}
SELECT 1 AS `#STUFF`
Then execute dbt run
twice.
Screenshots and log output
The generated SQL query doesn't include fields in the SELECT clause:
insert overwrite table `dev`.`bronze`.`dummy`
select from `dummy__dbt_tmp`
System information
The output of dbt --version
:
Core:
- installed: 1.6.1
- latest: 1.6.1 - Up to date!
Plugins:
- spark: 1.6.0 - Up to date!
- databricks: 1.6.1 - Up to date!
The operating system you're using:
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
The output of python --version
:
3.11.4
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue.