user16352126
user16352126

Reputation:

How can I get the range of values, min & max for each of the columns in the micro-partition in Snowflake?

It says Snowflake stores metadata about all rows stored in a micro-partition, including the range of values for each of the columns in the micro-partition in the following thread, https://community.snowflake.com/s/question/0D53r00009kz6HpCAI/are-min-max-values-stored-in-a-micro-partitions-metadata-, What function I can use to retrieve this information? I tried to run SYSTEM$CLUSTERING_INFORMATION and it returns total_partition_count, depth, overlaps related information but no information about the column values in the micro-partitions. Thanks!

Upvotes: 2

Views: 1092

Answers (1)

Felipe Hoffa
Felipe Hoffa

Reputation: 59225

Snowflake stores this meta-data about each partition internally to optimize queries, but it does not publish it.

Part of the reason is security, as knowing metadata about each partition can reveal data that should be masked to some users, or hidden through row level security.

But if there's an interesting business use case that you are looking for to have this data, Snowflake is listening.

Upvotes: 1

Related Questions