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
| name | type | description |
|---|---|---|
| instance_id | str | Database instance name (preferred) or UUID. |
| table_names | list[str] | None | Tables to analyze; if `None` or empty, every table in the instance is analyzed. |
| operation_id | str | None | Optional client-supplied operation identifier. If omitted, a fresh UUID is generated. Pass the same value that `wait_for_operation` will poll on. |
Returns
| type | description |
|---|---|
| str | The 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)