catalog_ai_lake.
wait_for_operation
wait_for_operation(operation_id: str, timeout_s: float = 300.0, poll_s: float = 2.0) -> CatalogAILakeOperation
Block until an AI Lake operation reaches a terminal status.
Raises `CatalogAILakeOperationError` on `failed` and `TimeoutError` if the operation does not reach a terminal state in time.
Parameters
| name | type | description |
|---|---|---|
| operation_id: str | str | |
| timeout_s: float = 300.0 | float | |
| poll_s: float = 2.0 | float |
Returns
| type | description |
|---|---|
| CatalogAILakeOperation |
Example
from gooddata_sdk import CatalogAILakeOperationError
operation_id = sdk.catalog_ai_lake.analyze_statistics(
instance_id="warehouse-prod",
table_names=["agg_orders_country_daily"],
)
try:
op = sdk.catalog_ai_lake.wait_for_operation(operation_id, timeout_s=600.0)
except CatalogAILakeOperationError as exc:
print(f"analyze failed: {exc.operation.error}")
except TimeoutError:
print("analyze still pending; resume polling later with get_operation()")