AWS Database Migration Service

2017/11/17 - AWS Database Migration Service - 2 new 1 updated api methods

Changes  Support for migration task assessment. Support for data validation after the migration.

DescribeReplicationTaskAssessmentResults (new) Link ¶

Returns the task assessment results from Amazon S3. This action always returns the latest results.

See also: AWS API Documentation

Request Syntax

client.describe_replication_task_assessment_results(
    ReplicationTaskArn='string',
    MaxRecords=123,
    Marker='string'
)
type ReplicationTaskArn

string

param ReplicationTaskArn
  • The Amazon Resource Name (ARN) string that uniquely identifies the task. When this input parameter is specified the API will return only one result and ignore the values of the max-records and marker parameters.

type MaxRecords

integer

param MaxRecords

The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.

Default: 100

Constraints: Minimum 20, maximum 100.

type Marker

string

param Marker

An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords .

rtype

dict

returns

Response Syntax

{
    'Marker': 'string',
    'BucketName': 'string',
    'ReplicationTaskAssessmentResults': [
        {
            'ReplicationTaskIdentifier': 'string',
            'ReplicationTaskArn': 'string',
            'ReplicationTaskLastAssessmentDate': datetime(2015, 1, 1),
            'AssessmentStatus': 'string',
            'AssessmentResultsFile': 'string',
            'AssessmentResults': 'string',
            'S3ObjectUrl': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Marker (string) --

      An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords .

    • BucketName (string) --

      • The Amazon S3 bucket where the task assessment report is located.

    • ReplicationTaskAssessmentResults (list) --

      The task assessment report.

      • (dict) --

        The task assessment report in JSON format.

        • ReplicationTaskIdentifier (string) --

          The replication task identifier of the task on which the task assessment was run.

        • ReplicationTaskArn (string) --

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

        • ReplicationTaskLastAssessmentDate (datetime) --

          The date the task assessment was completed.

        • AssessmentStatus (string) --

          The status of the task assessment.

        • AssessmentResultsFile (string) --

          The file containing the results of the task assessment.

        • AssessmentResults (string) --

          The task assessment results in JSON format.

        • S3ObjectUrl (string) --

          The URL of the S3 object containing the task assessment results.

StartReplicationTaskAssessment (new) Link ¶

Starts the replication task assessment for unsupported data types in the source database.

See also: AWS API Documentation

Request Syntax

client.start_replication_task_assessment(
    ReplicationTaskArn='string'
)
type ReplicationTaskArn

string

param ReplicationTaskArn

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'ReplicationTask': {
        'ReplicationTaskIdentifier': 'string',
        'SourceEndpointArn': 'string',
        'TargetEndpointArn': 'string',
        'ReplicationInstanceArn': 'string',
        'MigrationType': 'full-load'|'cdc'|'full-load-and-cdc',
        'TableMappings': 'string',
        'ReplicationTaskSettings': 'string',
        'Status': 'string',
        'LastFailureMessage': 'string',
        'StopReason': 'string',
        'ReplicationTaskCreationDate': datetime(2015, 1, 1),
        'ReplicationTaskStartDate': datetime(2015, 1, 1),
        'ReplicationTaskArn': 'string',
        'ReplicationTaskStats': {
            'FullLoadProgressPercent': 123,
            'ElapsedTimeMillis': 123,
            'TablesLoaded': 123,
            'TablesLoading': 123,
            'TablesQueued': 123,
            'TablesErrored': 123
        }
    }
}

Response Structure

  • (dict) --

    • ReplicationTask (dict) --

      The assessed replication task.

      • ReplicationTaskIdentifier (string) --

        The replication task identifier.

        Constraints:

        • Must contain from 1 to 255 alphanumeric characters or hyphens.

        • First character must be a letter.

        • Cannot end with a hyphen or contain two consecutive hyphens.

      • SourceEndpointArn (string) --

        The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.

      • TargetEndpointArn (string) --

        The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.

      • ReplicationInstanceArn (string) --

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

      • MigrationType (string) --

        The type of migration.

      • TableMappings (string) --

        Table mappings specified in the task.

      • ReplicationTaskSettings (string) --

        The settings for the replication task.

      • Status (string) --

        The status of the replication task.

      • LastFailureMessage (string) --

        The last error (failure) message generated for the replication instance.

      • StopReason (string) --

        The reason the replication task was stopped.

      • ReplicationTaskCreationDate (datetime) --

        The date the replication task was created.

      • ReplicationTaskStartDate (datetime) --

        The date the replication task is scheduled to start.

      • ReplicationTaskArn (string) --

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

      • ReplicationTaskStats (dict) --

        The statistics for the task, including elapsed time, tables loaded, and table errors.

        • FullLoadProgressPercent (integer) --

          The percent complete for the full load migration task.

        • ElapsedTimeMillis (integer) --

          The elapsed time of the task, in milliseconds.

        • TablesLoaded (integer) --

          The number of tables loaded for this task.

        • TablesLoading (integer) --

          The number of tables currently loading for this task.

        • TablesQueued (integer) --

          The number of tables queued for this task.

        • TablesErrored (integer) --

          The number of errors that have occurred during this task.

DescribeTableStatistics (updated) Link ¶
Changes (response)
{'TableStatistics': {'ValidationFailedRecords': 'long',
                     'ValidationPendingRecords': 'long',
                     'ValidationState': 'string',
                     'ValidationSuspendedRecords': 'long'}}

Returns table statistics on the database migration task, including table name, rows inserted, rows updated, and rows deleted.

Note that the "last updated" column the DMS console only indicates the time that AWS DMS last updated the table statistics record for a table. It does not indicate the time of the last update to the table.

See also: AWS API Documentation

Request Syntax

client.describe_table_statistics(
    ReplicationTaskArn='string',
    MaxRecords=123,
    Marker='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
type ReplicationTaskArn

string

param ReplicationTaskArn

[REQUIRED]

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

type MaxRecords

integer

param MaxRecords

The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.

Default: 100

Constraints: Minimum 20, maximum 500.

type Marker

string

param Marker

An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords .

type Filters

list

param Filters

Filters applied to the describe table statistics action.

Valid filter names: schema-name | table-name | table-state

A combination of filters creates an AND condition where each record matches all specified filters.

  • (dict) --

    • Name (string) -- [REQUIRED]

      The name of the filter.

    • Values (list) -- [REQUIRED]

      The filter value.

      • (string) --

rtype

dict

returns

Response Syntax

{
    'ReplicationTaskArn': 'string',
    'TableStatistics': [
        {
            'SchemaName': 'string',
            'TableName': 'string',
            'Inserts': 123,
            'Deletes': 123,
            'Updates': 123,
            'Ddls': 123,
            'FullLoadRows': 123,
            'FullLoadCondtnlChkFailedRows': 123,
            'FullLoadErrorRows': 123,
            'LastUpdateTime': datetime(2015, 1, 1),
            'TableState': 'string',
            'ValidationPendingRecords': 123,
            'ValidationFailedRecords': 123,
            'ValidationSuspendedRecords': 123,
            'ValidationState': 'string'
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    • ReplicationTaskArn (string) --

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

    • TableStatistics (list) --

      The table statistics.

      • (dict) --

        • SchemaName (string) --

          The schema name.

        • TableName (string) --

          The name of the table.

        • Inserts (integer) --

          The number of insert actions performed on a table.

        • Deletes (integer) --

          The number of delete actions performed on a table.

        • Updates (integer) --

          The number of update actions performed on a table.

        • Ddls (integer) --

          The Data Definition Language (DDL) used to build and modify the structure of your tables.

        • FullLoadRows (integer) --

          The number of rows added during the Full Load operation.

        • FullLoadCondtnlChkFailedRows (integer) --

          The number of rows that failed conditional checks during the Full Load operation (valid only for DynamoDB as a target migrations).

        • FullLoadErrorRows (integer) --

          The number of rows that failed to load during the Full Load operation (valid only for DynamoDB as a target migrations).

        • LastUpdateTime (datetime) --

          The last time the table was updated.

        • TableState (string) --

          The state of the tables described.

          Valid states: Table does not exist | Before load | Full load | Table completed | Table cancelled | Table error | Table all | Table updates | Table is being reloaded

        • ValidationPendingRecords (integer) --

          The number of records that have yet to be validated.

        • ValidationFailedRecords (integer) --

          The number of records that failed validation.

        • ValidationSuspendedRecords (integer) --

          The number of records that could not be validated.

        • ValidationState (string) --

          The validation state of the table.

          The parameter can have the following values

          • Not enabled—Validation is not enabled for the table in the migration task.

          • Pending records—Some records in the table are waiting for validation.

          • Mismatched records—Some records in the table do not match between the source and target.

          • Suspended records—Some records in the table could not be validated.

          • No primary key—The table could not be validated because it had no primary key.

          • Table error—The table was not validated because it was in an error state and some data was not migrated.

          • Validated—All rows in the table were validated. If the table is updated, the status can change from Validated.

          • Error—The table could not be validated because of an unexpected error.

    • Marker (string) --

      An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords .