SsisPackageOperator¶
Operator that starts an SSIS Catalog package execution over an MSSQL connection.
- class SSIS_Operator.operators.ssis_package_operator.SsisPackageOperator(conn_id, database: str, folder: str, project: str, package: str, environment: str | None = None, logging_level: LoggingLevel = LoggingLevel.basic, parameters: List[QueryParameters] | None = None, *args, **kwargs)¶
Bases:
BaseOperatorStarts an SSIS Catalog package execution and pushes its execution ID to XCom.
Builds a [SSISDB].[catalog] T-SQL script that creates and starts the execution, optionally binding an environment reference and setting project/package/logging parameters, then runs it via MsSqlHook. The resulting execution_id is pushed to XCom under the execution_id key so a downstream SsisPackageSensor can poll it.
Example:
SsisPackageOperator( task_id="run_etl_package", conn_id="ssisdb_default", database="SSISDB", folder="MyFolder", project="MyProject", package="LoadOrders.dtsx", environment="Production", logging_level=LoggingLevel.basic, parameters=[ QueryParameters(name="BatchDate", value="2026-08-21", type=ParameterType.PACKAGE), ], )
- execute(context)¶
Start the SSIS package execution and push its execution_id to XCom.
- Parameters:
context – Airflow task instance context.
- Raises:
ValueError – If the SSIS Catalog query returns no execution ID.