catalog_ai_lake.

analyze_statistics

analyze_statistics(instance_id: str, table_names: list[str] | None, operation_id: str | None) -> str

Trigger ANALYZE TABLE for tables in an AI Lake database instance.

Parameters

nametypedescription
instance_idstrDatabase instance name (preferred) or UUID.
table_nameslist[str] | NoneTables to analyze; if `None` or empty, every table in the instance is analyzed.
operation_idstr | NoneOptional client-supplied operation identifier. If omitted, a fresh UUID is generated. Pass the same value that `wait_for_operation` will poll on.

Returns

typedescription
strThe operation ID (UUID string) the platform will track this run

Example

operation_id = sdk.catalog_ai_lake.analyze_statistics(
    instance_id="warehouse-prod",
    table_names=["agg_orders_country_daily", "agg_orders_country_monthly"],
)
sdk.catalog_ai_lake.wait_for_operation(operation_id)