Skip to content

/AWS1/CL_RSH=>RESTORETABLEFROMCLUSTERSNAP()

About RestoreTableFromClusterSnapshot

Creates a new table from a table in an Amazon Redshift cluster snapshot. You must create the new table within the Amazon Redshift cluster that the snapshot was taken from.

You cannot use RestoreTableFromClusterSnapshot to restore a table with the same name as an existing table in an Amazon Redshift cluster. That is, you cannot overwrite an existing table in a cluster with a restored table. If you want to replace your original table with a new, restored table, then rename or drop your original table before you call RestoreTableFromClusterSnapshot. When you have renamed your original table, then you can pass the original name of the table as the NewTableName parameter value in the call to RestoreTableFromClusterSnapshot. This way, you can replace the original table with the table created from the snapshot.

You can't use this operation to restore tables with interleaved sort keys.

Method Signature

IMPORTING

Required arguments:

IV_CLUSTERIDENTIFIER TYPE /AWS1/RSHSTRING /AWS1/RSHSTRING

The identifier of the Amazon Redshift cluster to restore the table to.

IV_SNAPSHOTIDENTIFIER TYPE /AWS1/RSHSTRING /AWS1/RSHSTRING

The identifier of the snapshot to restore the table from. This snapshot must have been created from the Amazon Redshift cluster specified by the ClusterIdentifier parameter.

IV_SOURCEDATABASENAME TYPE /AWS1/RSHSTRING /AWS1/RSHSTRING

The name of the source database that contains the table to restore from.

IV_SOURCETABLENAME TYPE /AWS1/RSHSTRING /AWS1/RSHSTRING

The name of the source table to restore from.

IV_NEWTABLENAME TYPE /AWS1/RSHSTRING /AWS1/RSHSTRING

The name of the table to create as a result of the current request.

Optional arguments:

IV_SOURCESCHEMANAME TYPE /AWS1/RSHSTRING /AWS1/RSHSTRING

The name of the source schema that contains the table to restore from. If you do not specify a SourceSchemaName value, the default is public.

IV_TARGETDATABASENAME TYPE /AWS1/RSHSTRING /AWS1/RSHSTRING

The name of the database to restore the table to.

IV_TARGETSCHEMANAME TYPE /AWS1/RSHSTRING /AWS1/RSHSTRING

The name of the schema to restore the table to.

IV_ENABLECASESENSITIVEID TYPE /AWS1/RSHBOOLEANOPTIONAL /AWS1/RSHBOOLEANOPTIONAL

Indicates whether name identifiers for database, schema, and table are case sensitive. If true, the names are case sensitive. If false (default), the names are not case sensitive.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_RSHRESTORETBLFRMCLS01 /AWS1/CL_RSHRESTORETBLFRMCLS01