Snowflake Columns Not Being Synced Properly

Hi,

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”’

This field should be called “ID”

Hi @jacobr
I think you’re seeing this issue:
https://github.com/metabase/metabase/issues/9511
Are you seeing any errors in the log while sync/scan?

Hey @flamber

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.