Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt test fails because of space in source name #213

Closed
Freia3 opened this issue Apr 13, 2022 · 0 comments · Fixed by #214
Closed

dbt test fails because of space in source name #213

Freia3 opened this issue Apr 13, 2022 · 0 comments · Fixed by #214

Comments

@Freia3
Copy link

Freia3 commented Apr 13, 2022

After upgrading dbt from 0.20.1 to 0.21.0, dbt test fails because of spaces (and dot) present in the source name:

source.yml:

version: 2
sources:
- name: 'OMOP CDM v5.4'
  schema: omop
  tables:
  - name: cdm_source
    columns:
    - name: cdm_version_concept_id
      tests:
      - not_null

Error message after running dbt test:
16 of 184 ERROR source_not_null_OMOP CDM v5.4_cdm_source_cdm_version_concept_id [ERROR in 0.84s]
Database Error in test source_not_null_OMOP CDM v5.4_cdm_source_cdm_version_concept_id (sources/source.yml)
('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near 'CDM'. (102) (SQLExecDirectW)")

I get the error in all dbt versions >=0.21.0

Is there any way to resolve this error without adjusting the source name?

Freia3 pushed a commit to lynxcare/dbt-sqlserver that referenced this issue Apr 13, 2022
Freia3 pushed a commit to lynxcare/dbt-sqlserver that referenced this issue Apr 13, 2022
sdebruyn pushed a commit that referenced this issue Jun 6, 2022
Freia3 pushed a commit to lynxcare/dbt-sqlserver that referenced this issue Jun 7, 2022
put back original relation_name
Freia3 pushed a commit to lynxcare/dbt-sqlserver that referenced this issue Jun 7, 2022
put back original relation_name
sdebruyn added a commit that referenced this issue Jun 7, 2022
…with-spaces

Fix #213 - dbt test error when source name contains spaces and/or dots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant