Ssis Package Sensor¶
Sensor that polls the SSIS Catalog for the completion status of a package execution.
- exception SSIS_Operator.sensors.ssis_package_sensor.PackageExecutionError(message, package_name, execution_status)¶
Basisklassen:
ExceptionRaised when an SSIS Catalog execution terminates in a Failure or Canceled state.
- class SSIS_Operator.sensors.ssis_package_sensor.SsisPackageSensor(conn_id, database, parameters=None, xcom_task_id=None, *args, **kwargs)¶
Basisklassen:
BaseSensorOperatorPolls SSISDB.catalog.executions until an SSIS package execution reaches a terminal state.
Reads the execution_id pushed to XCom by an upstream SsisPackageOperator task and pokes the SSIS Catalog until the execution reaches a terminal status (Success, Failure, Canceled, Completed, Pending, or Stopping). Raises PackageExecutionError if the execution ends in Failure or Canceled.
Example:
SsisPackageSensor( task_id="wait_for_etl_package", conn_id="ssisdb_default", database="SSISDB", xcom_task_id="run_etl_package", )
- poke(context)¶
Check whether the SSIS package execution has reached a terminal state.
- Parameters:
context – Airflow task instance context.
- Returns:
True if the execution has reached a terminal status, False if it should be polled again.
- Veroorzaakt:
PackageExecutionError – If the execution terminated with status Failure or Canceled.