Model View Definition: Snowflake Connection: Defines Number as string


(Umesh) #1

Database Connection Source: Snowflake
Using the DB connection, when creating the project the model views are automatically generated but attributes of type Number are defined as String
Snowflake attribute with type Number(18.0) => string
Snowflake attribute with type Number(5.2) => string

How can this be fixed so that view defines attributes of type Number as number in view definition without manually checking and fixing the types.


(Izzy) #2

I wonder if it has to do with the special number types— Does it do it to fields of type FLOAT or INT too?

(Umesh) #3


Checked on Snowflake FLOAT and Looker gets it as number in the view definition.


(Izzy) #4

Interesting, I guess Looker doesn’t treat certain snowflake Number types as numeric when generating LookML— For now, I’d experiment around with what works and what doesn’t, and you can always add casts to fix it manually like you said.

I’ll test and see if this is intentional or not.

(Izzy) #5

I haven’t been able to spin up a snowflake instance and create those fields, but it looks like for now the best thing to do would be to add casts to those fields, or store them as a different datatype in the DB.

NUMBER(38,0) ought to be working fine, from my testing.