gopinath kolanchi
gopinath kolanchi

Reputation: 180

JSON file Size loaded into Snowflake Variant Column

We have JSON files loaded into Snowflake table (Variant column), the table has 2 column - File name and Variant column (JSON records).

I am able to get the whole table size from information schema, however we are interested in getting the size of each row/record in the table.

Can you please help me if there is any formula/function that can help me to get the row size.

Upvotes: 1

Views: 769

Answers (1)

leftjoin
leftjoin

Reputation: 38335

LEN(expression) Returns the length of an input string or binary value.

You can concatenate columns using type cast operator and get resulted string length.

Like this:

len(col1::string||col1::string||colN::string)

len(variant) also works

Upvotes: 1

Related Questions