table_restore_status
Creates, updates, deletes, gets or lists a table_restore_status resource.
Overview
| Name | table_restore_status |
| Type | Resource |
| Id | aws.redshift.table_restore_status |
Fields
The following fields are returned by SELECT queries:
- describe_table_restore_status
| Name | Datatype | Description |
|---|---|---|
cluster_identifier | string | The identifier of the Amazon Redshift cluster that the table is being restored to. |
message | string | A description of the status of the table restore request. Status values include SUCCEEDED, FAILED, CANCELED, PENDING, IN_PROGRESS. |
new_table_name | string | The name of the table to create as a result of the table restore request. |
progress_in_mega_bytes | integer | The amount of data restored to the new table so far, in megabytes (MB). |
request_time | string | The time that the table restore request was made, in Universal Coordinated Time (UTC). |
snapshot_identifier | string | The identifier of the snapshot that the table is being restored from. |
source_database_name | string | The name of the source database that contains the table being restored. |
source_schema_name | string | The name of the source schema that contains the table being restored. |
source_table_name | string | The name of the source table being restored. |
status | string | A value that describes the current state of the table restore request. Valid Values: SUCCEEDED, FAILED, CANCELED, PENDING, IN_PROGRESS |
table_restore_request_id | string | The unique identifier for the table restore request. |
target_database_name | string | The name of the database to restore the table to. |
target_schema_name | string | The name of the schema to restore the table to. |
total_data_in_mega_bytes | integer | The total amount of data to restore to the new table, in megabytes (MB). |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_table_restore_status | select | region | ClusterIdentifier, TableRestoreRequestId, MaxRecords, Marker | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
ClusterIdentifier | string | The Amazon Redshift cluster that the table is being restored to. |
Marker | string | An 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. |
MaxRecords | integer | 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. |
TableRestoreRequestId | string | The 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
- describe_table_restore_status
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 }}'
;