airflow.providers.amazon.aws.operators.dms

Module Contents

Classes

DmsCreateTaskOperator

Creates AWS DMS replication task.

DmsDeleteTaskOperator

Deletes AWS DMS replication task.

DmsDescribeTasksOperator

Describes AWS DMS replication tasks.

DmsStartTaskOperator

Starts AWS DMS replication task.

DmsStopTaskOperator

Stops AWS DMS replication task.

class airflow.providers.amazon.aws.operators.dms.DmsCreateTaskOperator(*, replication_task_id: str, source_endpoint_arn: str, target_endpoint_arn: str, replication_instance_arn: str, table_mappings: dict, migration_type: Optional[str] = 'full-load', create_task_kwargs: Optional[dict] = None, aws_conn_id: str = 'aws_default', **kwargs)[source]

Bases: airflow.models.BaseOperator

Creates AWS DMS replication task.

See also

For more information on how to use this operator, take a look at the guide: Create replication task, wait for it completion and delete it.

Parameters
  • replication_task_id (str) -- Replication task id

  • source_endpoint_arn (str) -- Source endpoint ARN

  • target_endpoint_arn (str) -- Target endpoint ARN

  • replication_instance_arn (str) -- Replication instance ARN

  • table_mappings (dict) -- Table mappings

  • migration_type (str) -- Migration type ('full-load'|'cdc'|'full-load-and-cdc'), full-load by default.

  • create_task_kwargs (Optional[dict]) -- Extra arguments for DMS replication task creation.

  • aws_conn_id (Optional[str]) -- The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node).

template_fields :Sequence[str] = ['replication_task_id', 'source_endpoint_arn', 'target_endpoint_arn',...[source]
template_ext :Sequence[str] = [][source]
template_fields_renderers[source]
execute(self, context: airflow.utils.context.Context)[source]

Creates AWS DMS replication task from Airflow

Returns

replication task arn

class airflow.providers.amazon.aws.operators.dms.DmsDeleteTaskOperator(*, replication_task_arn: Optional[str] = None, aws_conn_id: str = 'aws_default', **kwargs)[source]

Bases: airflow.models.BaseOperator

Deletes AWS DMS replication task.

See also

For more information on how to use this operator, take a look at the guide: Create replication task, wait for it completion and delete it.

Parameters
  • replication_task_arn (str) -- Replication task ARN

  • aws_conn_id (Optional[str]) -- The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node).

template_fields :Sequence[str] = ['replication_task_arn'][source]
template_ext :Sequence[str] = [][source]
template_fields_renderers :Dict[str, str][source]
execute(self, context: airflow.utils.context.Context)[source]

Deletes AWS DMS replication task from Airflow

Returns

replication task arn

class airflow.providers.amazon.aws.operators.dms.DmsDescribeTasksOperator(*, describe_tasks_kwargs: Optional[dict] = None, aws_conn_id: str = 'aws_default', **kwargs)[source]

Bases: airflow.models.BaseOperator

Describes AWS DMS replication tasks.

Parameters
  • describe_tasks_kwargs (Optional[dict]) -- Describe tasks command arguments

  • aws_conn_id (Optional[str]) -- The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node).

template_fields :Sequence[str] = ['describe_tasks_kwargs'][source]
template_ext :Sequence[str] = [][source]
template_fields_renderers :Dict[str, str][source]
execute(self, context: airflow.utils.context.Context)[source]

Describes AWS DMS replication tasks from Airflow

Returns

Marker and list of replication tasks

Return type

(Optional[str], list)

class airflow.providers.amazon.aws.operators.dms.DmsStartTaskOperator(*, replication_task_arn: str, start_replication_task_type: Optional[str] = 'start-replication', start_task_kwargs: Optional[dict] = None, aws_conn_id: str = 'aws_default', **kwargs)[source]

Bases: airflow.models.BaseOperator

Starts AWS DMS replication task.

See also

For more information on how to use this operator, take a look at the guide: Create replication task, wait for it completion and delete it.

Parameters
  • replication_task_arn (str) -- Replication task ARN

  • start_replication_task_type (Optional[str]) -- Replication task start type ('start-replication'|'resume-processing'|'reload-target')

  • start_task_kwargs (Optional[dict]) -- Extra start replication task arguments

  • aws_conn_id (Optional[str]) -- The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node).

template_fields :Sequence[str] = ['replication_task_arn', 'start_replication_task_type', 'start_task_kwargs'][source]
template_ext :Sequence[str] = [][source]
template_fields_renderers[source]
execute(self, context: airflow.utils.context.Context)[source]

Starts AWS DMS replication task from Airflow

Returns

replication task arn

class airflow.providers.amazon.aws.operators.dms.DmsStopTaskOperator(*, replication_task_arn: Optional[str] = None, aws_conn_id: str = 'aws_default', **kwargs)[source]

Bases: airflow.models.BaseOperator

Stops AWS DMS replication task.

Parameters
  • replication_task_arn (str) -- Replication task ARN

  • aws_conn_id (Optional[str]) -- The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node).

template_fields :Sequence[str] = ['replication_task_arn'][source]
template_ext :Sequence[str] = [][source]
template_fields_renderers :Dict[str, str][source]
execute(self, context: airflow.utils.context.Context)[source]

Stops AWS DMS replication task from Airflow

Returns

replication task arn

Was this entry helpful?