Skip to content

reload_tables

reload_tables(
    replication_task_arn: String,
    tables_to_reload: TableListToReload,
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
    reload_option: Optional[ReloadOptionValue] = None,
) -> ReloadTablesResponse

Reloads the target database table with the source data.

You can only use this operation with a task in the RUNNING state, otherwise the service will throw an InvalidResourceStateFault exception.

Parameters:

  • replication_task_arn (String) –

    The Amazon Resource Name (ARN) of the replication task.

  • tables_to_reload (TableListToReload) –

    The name and schema of the table to be reloaded.

  • reload_option (Optional[ReloadOptionValue], default: None ) –

    Options for reload. Specify data-reload to reload the data and re-validate it if validation is enabled. Specify validate-only to re-validate the table. This option applies only when validation is enabled for the task.

    Valid values: data-reload, validate-only

    Default value is data-reload.

Raises:

Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
def reload_tables(
    self,
    replication_task_arn: "capo_database_migration_service.types.string.String",
    tables_to_reload: "capo_database_migration_service.types.table_list_to_reload.TableListToReload",
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
    reload_option: Optional[
        "capo_database_migration_service.types.reload_option_value.ReloadOptionValue"
    ] = None,
) -> "capo_database_migration_service.types.reload_tables_response.ReloadTablesResponse":
    """<p>Reloads the target database table with the source data. </p> <p>You can only use this operation with a task in the <code>RUNNING</code> state, otherwise the service will throw an <code>InvalidResourceStateFault</code> exception.</p>

    Args:
        replication_task_arn: <p>The Amazon Resource Name (ARN) of the replication task. </p>
        tables_to_reload: <p>The name and schema of the table to be reloaded. </p>
        reload_option: <p>Options for reload. Specify <code>data-reload</code> to reload the data and re-validate it if validation is enabled. Specify <code>validate-only</code> to re-validate the table. This option applies only when validation is enabled for the task. </p> <p>Valid values: data-reload, validate-only</p> <p>Default value is data-reload.</p>

    Raises:
        capo_database_migration_service.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</p>
        capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
        capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_database_migration_service.types.reload_tables_message.ReloadTablesMessage]",
    ) -> OperationResponse[
        "capo_database_migration_service.types.reload_tables_response.ReloadTablesResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.reload_tables

        output, http_response = (
            capo_database_migration_service._operations.amazon_dm_sv20160101.reload_tables.reload_tables(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ReloadTables")
    )
    input_: capo_database_migration_service.types.reload_tables_message.ReloadTablesMessage = {
        "replication_task_arn": replication_task_arn,
        "tables_to_reload": tables_to_reload,
    }
    if reload_option is not None:
        input_["reload_option"] = reload_option

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output