Skip to main content

table_restore_status

Creates, updates, deletes, gets or lists a table_restore_status resource.

Overview

Nametable_restore_status
TypeResource
Idaws.redshift.table_restore_status

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
cluster_identifierstringThe identifier of the Amazon Redshift cluster that the table is being restored to.
messagestringA description of the status of the table restore request. Status values include SUCCEEDED, FAILED, CANCELED, PENDING, IN_PROGRESS.
new_table_namestringThe name of the table to create as a result of the table restore request.
progress_in_mega_bytesintegerThe amount of data restored to the new table so far, in megabytes (MB).
request_timestringThe time that the table restore request was made, in Universal Coordinated Time (UTC).
snapshot_identifierstringThe identifier of the snapshot that the table is being restored from.
source_database_namestringThe name of the source database that contains the table being restored.
source_schema_namestringThe name of the source schema that contains the table being restored.
source_table_namestringThe name of the source table being restored.
statusstringA value that describes the current state of the table restore request. Valid Values: SUCCEEDED, FAILED, CANCELED, PENDING, IN_PROGRESS
table_restore_request_idstringThe unique identifier for the table restore request.
target_database_namestringThe name of the database to restore the table to.
target_schema_namestringThe name of the schema to restore the table to.
total_data_in_mega_bytesintegerThe total amount of data to restore to the new table, in megabytes (MB).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_table_restore_statusselectregionClusterIdentifier, TableRestoreRequestId, MaxRecords, MarkerLists the status of one or more table restore requests made using the RestoreTableFromClusterSnapshot API action. If you don't specify a value for the TableRestoreRequestId parameter, then DescribeTableRestoreStatus returns the status of all table restore requests ordered by the date and time of the request in ascending order. Otherwise DescribeTableRestoreStatus returns the status of the table specified by TableRestoreRequestId.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
ClusterIdentifierstringThe Amazon Redshift cluster that the table is being restored to.
MarkerstringAn optional pagination token provided by a previous DescribeTableRestoreStatus request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by the MaxRecords parameter.
MaxRecordsintegerThe 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.
TableRestoreRequestIdstringThe identifier of the table restore request to return status for. If you don't specify a TableRestoreRequestId value, then DescribeTableRestoreStatus returns the status of all in-progress table restore requests.

SELECT examples

Lists the status of one or more table restore requests made using the RestoreTableFromClusterSnapshot API action. If you don't specify a value for the TableRestoreRequestId parameter, then DescribeTableRestoreStatus returns the status of all table restore requests ordered by the date and time of the request in ascending order. Otherwise DescribeTableRestoreStatus returns the status of the table specified by TableRestoreRequestId.

SELECT
cluster_identifier,
message,
new_table_name,
progress_in_mega_bytes,
request_time,
snapshot_identifier,
source_database_name,
source_schema_name,
source_table_name,
status,
table_restore_request_id,
target_database_name,
target_schema_name,
total_data_in_mega_bytes
FROM aws.redshift.table_restore_status
WHERE region = '{{ region }}' -- required
AND ClusterIdentifier = '{{ ClusterIdentifier }}'
AND TableRestoreRequestId = '{{ TableRestoreRequestId }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
;