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

nametypedescription
operation_id: strstr
timeout_s: float = 300.0float
poll_s: float = 2.0float

Returns

typedescription
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()")