Hi everyone, I am brand new elementary and am just...
# community-support
l
Hi everyone, I am brand new elementary and am just testing out the product. It looks really cool! I am running into an issue, though, because one of the snowflake databases we use was created in lower case. I, unfortunately, cannot change the name of this one because it's connected to a 3rd party data-sync. Because of this dbt run --select elementary is failing because if the db name is lowercase it must be in quotes in the select like
select count(*) from "db_name".INFORMATION_SCHEMA.schemata
. I was wondering if there is any way I can just omit this database when running the elementary models?
Copy code
20:09:35 On model.elementary.dbt_columns: select count(*)
        from db_name.INFORMATION_SCHEMA.schemata
        where upper(schema_name) = upper('{DB_NAME}')
            and upper(catalog_name) = upper('db_name')
Database 'DB_NAME' does not exist or not authorized.
20:09:35 Snowflake adapter: Error running SQL: macro check_schema_exists
20:09:35 Snowflake adapter: Rolling back transaction.
20:09:36 Timing info for model.elementary.dbt_columns (compile): 20:09:15.120370 => 20:09:36.045354
20:09:36 On model.elementary.dbt_columns: Close
20:09:36 Database Error in model dbt_columns (models/edr/dbt_artifacts/dbt_columns.sql)
  002003 (02000): SQL compilation error:
  Database 'DB_NAME' does not exist or not authorized.
20:09:36 29 of 30 ERROR creating sql view model dbt_lschinasi_elementary.dbt_columns .... [ERROR in 21.30s]
👀 1
✅ 1
I actually found an open issue that looks similar and added a comment there, but i'm still not sure how to skip the dbt_columns for that database.
e
Hi there @Lindsay Schinasi! Is your database name by chance
db_name
? Or could this perhaps be a name you wanted to change to your data base name? I'm asking since the database names should be case insensitive in snowflake.
I'm in the midst of reproducing this locally, I think I was wrong and that snowflake db names are indeed case sensitive and need quotes.
I think that this might be possible to overcome this issue with https://docs.getdbt.com/reference/project-configs/quoting , will test as a part of my reproducing efforts and keep you updated.
If you do the following in `dbt_project.yml`:
Copy code
quoting:
  database: true
(according to the link above)
l
Hi @Erik Zaadi. Thanks so much for the reply. I think that the database must have been provisioned with quotes - in which case snowflake does not recognized the all caps. I did try to change the quoting to true, but that broke another query for the same model. I have requested that we change the db name on our end and for now added :
Copy code
edr:
      dbt_artifacts:
        dbt_columns:
          +enabled: false
I know this will limit my ability to use anomaly detection until we fix the error. I was wondering if there is a way to omit just that database? I imagine not, but I thought I would ask.
e
I'm afraid not @Lindsay Schinasi, however we do have plans to change some of the way we works with schemas to overcome that problem in the future