Skip to content

aws.dms.describe_table_statistics

Example SQL Queries

SELECT * FROM
aws.dms.describe_table_statistics
WHERE
"replication_task_arn" = 'VALUE';

Description

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 DMS last updated the table statistics record for a table. It does not indicate the time of the last update to the table.

Table Definition

Column NameColumn Data Type
replication_task_arn Required Input Column

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

VARCHAR
filters Input Column

Filters applied to table statistics.

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

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

STRUCT(
"name" VARCHAR,
"values" VARCHAR[]
)[]
Show child fields
filters[]
Show child fields
filters[].name

The name of the filter as specified for a Describe* or similar operation.

filters[].values[]
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
table_statistics

The table statistics.

STRUCT(
"schema_name" VARCHAR,
"table_name" VARCHAR,
"inserts" BIGINT,
"deletes" BIGINT,
"updates" BIGINT,
"ddls" BIGINT,
"applied_inserts" BIGINT,
"applied_deletes" BIGINT,
"applied_updates" BIGINT,
"applied_ddls" BIGINT,
"full_load_rows" BIGINT,
"full_load_condtnl_chk_failed_rows" BIGINT,
"full_load_error_rows" BIGINT,
"full_load_start_time" TIMESTAMP_S,
"full_load_end_time" TIMESTAMP_S,
"full_load_reloaded" BOOLEAN,
"last_update_time" TIMESTAMP_S,
"table_state" VARCHAR,
"validation_pending_records" BIGINT,
"validation_failed_records" BIGINT,
"validation_suspended_records" BIGINT,
"validation_state" VARCHAR,
"validation_state_details" VARCHAR
)[]
Show child fields
table_statistics[]
Show child fields
table_statistics[].applied_ddls

The number of data definition language (DDL) statements used to build and modify the structure of your tables applied on the target.

table_statistics[].applied_deletes

The number of delete actions applied on a target table.

table_statistics[].applied_inserts

The number of insert actions applied on a target table.

table_statistics[].applied_updates

The number of update actions applied on a target table.

table_statistics[].ddls

The data definition language (DDL) used to build and modify the structure of your tables.

table_statistics[].deletes

The number of delete actions performed on a table.

table_statistics[].full_load_condtnl_chk_failed_rows

The number of rows that failed conditional checks during the full load operation (valid only for migrations where DynamoDB is the target).

table_statistics[].full_load_end_time

The time when the full load operation completed.

table_statistics[].full_load_error_rows

The number of rows that failed to load during the full load operation (valid only for migrations where DynamoDB is the target).

table_statistics[].full_load_reloaded

A value that indicates if the table was reloaded (true) or loaded as part of a new full load operation (false).

table_statistics[].full_load_rows

The number of rows added during the full load operation.

table_statistics[].full_load_start_time

The time when the full load operation started.

table_statistics[].inserts

The number of insert actions performed on a table.

table_statistics[].last_update_time

The last time a table was updated.

table_statistics[].schema_name

The schema name.

table_statistics[].table_name

The name of the table.

table_statistics[].table_state

The state of the tables described.

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

table_statistics[].updates

The number of update actions performed on a table.

table_statistics[].validation_failed_records

The number of records that failed validation.

table_statistics[].validation_pending_records

The number of records that have yet to be validated.

table_statistics[].validation_state

The validation state of the table.

This parameter can have the following values:

  • Not enabled – Validation isn't 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 don't match between the source and target.

  • Suspended records – Some records in the table couldn't be validated.

  • No primary key –The table couldn't be validated because it has no primary key.

  • Table error – The table wasn't validated because it's in an error state and some data wasn't migrated.

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

  • Error – The table couldn't be validated because of an unexpected error.

  • Pending validation – The table is waiting validation.

  • Preparing table – Preparing the table enabled in the migration task for validation.

  • Pending revalidation – All rows in the table are pending validation after the table was updated.

table_statistics[].validation_state_details

Additional details about the state of validation.

table_statistics[].validation_suspended_records

The number of records that couldn't be validated.