Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

Alter External Table Examples

The following example changes the location for the SPECTRUM.SALES external table.

Copy
alter table spectrum_tickit.sales set location 's3://awssampledb/tickit/spectrum/';

The following example changes the format for the SPECTRUM.SALES external table to Parquet.

Copy
alter table spectrum.sales set file format parquet;

The following example adds one partition for the table SPECTRUM.LINEITEM_PART.

Copy
alter table spectrum.lineitem_part add partition (l_shipdate='1992-01-29') location 's3://spectrum-public/lineitem_partition/l_shipdate=1992-01-29';

The following example alters SPECTRUM.LINEITEM_PART to drop the partition with l_shipdate='1992-01-29'.

Copy
alter table spectrum.lineitem_part drop partition (l_shipdate='1992-01-29');

The following example sets a new Amazon S3 path for the partition with l_shipdate='1992-01-29'.

Copy
alter table spectrum.lineitem_part partition (l_shipdate='1992-01-29') set location 's3://spectrum-public/lineitem_partition_new/l_shipdate=1992-01-29';