I am connected to our Snowflake data warehouse. All of my tables work great except for one table which seems to be treating many of the column names as lowercase instead of upper case. I have tried to run a re-scan as well as discard cached field value on the entire database, the table, and also the specific columns but the names will not update. Does anyone know how I can accomplish this? Here is an example of the error that I am getting when using the "Ask a Question - Custom Question"
SQL compilation error: error line 1 at position 7 invalid identifier 'ZENDESK.FACT_TICKETS."id"'
Thanks for the quick reply! It is much appreciated!
It seems like my issue is a little different because all of my tables are being read in, itâs just that some of the fields are lower case and some are uppercase. I looked at the logs and I donât see any error when running the scan. It does look like the scan found over 700 fields but updated 0, so it doesnât see a need to update the fields.
I know that in snowflake you can actually create columns with the name in quotes and lowercase letters and then to query that column you will have to use that casing, but if there are no quotes around the column name at the time of creation then it changes it to uppercase.
I think that my table just needs to do a full sync because the ddl in snowflake shows the following:
create or replace TABLE FACT_TICKETS (
ID NUMBER(13,0) NOT NULL,
CHANNEL VARCHAR(100),
FROM_TICKET_ID NUMBER(13,0),
âŚ
so I think the columns should pull through as upper case.
I have also verified that it is only a few columns in the table that are lowercase for some reason. Using only columns that appear upper case in the data model works fine.
@jacobr
You might need to manually do something, since it looks like thereâs an issue when trying to re-sync after a case change: https://github.com/metabase/metabase/issues/7923
Iâm not sure if you should delete the old cache or perhaps even delete and re-add the database for it to see that change.
@geovani Perhaps itâs better to start a new topic, since this was fairly specific to Snowflake.
And please include âDiagnostic Infoâ from Admin > Troubleshooting. And any errors you might see during the sync process in Admin > Troubleshooting > Logs.
@jacobr, I âfixâ this finding and deleting data from metabase_field and metabase_fieldvalues tables
First, I search my problematic table in metabase_table, then search for all data in metabase_filed using the table id, and than found all data in metabase_fieldvalues using filed ID.
After remove this data, I just resync again and now all collumns names was ok
I donât remeber if I removed the data from matabase_table too, meabe I did (probably).