湖仓构建 LAKEFORMATION-更新表的列统计信息:请求示例

时间:2024-10-22 17:23:06

请求示例

POST https://{endpoint} /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name}/column-statistics

{
  "merge" : false,
  "table_column_statistics" : {
    "column_statistics_desc" : {
      "last_analyzed_time" : "1970-01-01T00:00:00.100+00:00"
    },
    "column_statistics_objects" : [ {
      "column_name" : "column_prefix1",
      "column_type" : "string",
      "data_type" : "stringStats",
      "string_statistics_data" : {
        "average_length" : 10,
        "maximum_length" : 100,
        "number_of_null" : 30,
        "number_of_distinct_value" : 20,
        "bit_vector" : "FwAAAAAAAAAAAA=="
      }
    }, {
      "column_name" : "column_prefix2",
      "column_type" : "string",
      "data_type" : "stringStats",
      "string_statistics_data" : {
        "average_length" : 10,
        "maximum_length" : 100,
        "number_of_null" : 30,
        "number_of_distinct_value" : 20,
        "bit_vector" : "FwAAAAAAAAAAAA=="
      }
    }, {
      "column_name" : "column_prefix3",
      "column_type" : "string",
      "data_type" : "stringStats",
      "string_statistics_data" : {
        "average_length" : 10,
        "maximum_length" : 100,
        "number_of_null" : 30,
        "number_of_distinct_value" : 20,
        "bit_vector" : "FwAAAAAAAAAAAA=="
      }
    } ]
  }
}
support.huaweicloud.com/api-lakeformation/SetTableColumnStatistics.html