Automatic Clustering: SYSTEM$CLUSTERING_INFORMATION Syntax and Output Changes

Attention

This behavior change is in the 2023_04 bundle.

For the current status of the bundle, refer to Bundle History.

Currently you can use the SYSTEM$CLUSTERING_INFORMATION function to view Automatic Clustering errors that have occurred in the last 14 days.

Previously:

Users cannot obtain descriptive messages for errors encountered during Automatic Clustering.

Currently:
  • The JSON output of the SYSTEM$CLUSTERING_INFORMATION function includes a new field, clustering_errors, which contains an array of errors. Each error contains a timestamp and descriptive message.

    For example, the new output of the function might be:

    {
    "cluster_by_keys" : "LINEAR(i)",
    "notes" : "Clustering key columns contain high cardinality key I which
    might result in expensive re-clustering. Consider reducing the
    cardinality of clustering keys. Please refer to
    https://docs.snowflake.net/manuals/user-guide/tables-clustering-keys.html
    for more information.",
    "total_partition_count" : 0,
    "total_constant_partition_count" : 0,
    "average_overlaps" : 0.0,
    "average_depth" : 0.0,
    "partition_depth_histogram" : {
        "00000" : 0,
        // omitted for brevity
    },
    "clustering_errors" : [ {
        "timestamp" : "2023-04-03 17:50:42 +0000",
        "error" : "(003325) Clustering service has been disabled.\n"
    } ]
    }
    
    Copy
  • By default, the 10 most recent messages are returned by the function. New function syntax allows you to specify an integer as the optional second argument in order to return more or fewer messages. For example, the following returns the 25 most recent errors:

    SELECT SYSTEM$CLUSTERING_INFORMATION( 'my_table' , 25);
    
    Copy

Ref: 985

Language: English