ALTER TABLE SET LOCATION - Amazon Athena

ALTER TABLE SET LOCATION

Ändert den Speicherort für die Tabelle namens table_nameund optional eine Partition mit partition_spec.

Syntax

ALTER TABLE table_name [ PARTITION (partition_spec) ] SET LOCATION 'new location'

Parameter

PARTITION (partition_spec)

Gibt die Partition mit partition_spec-Parametern an, dessen Speicherort Sie ändern möchten. partition_spec gibt eine Name/Wert-Kombination einer Spalte im Formular aus partition_col_name = partition_col_value.

SET LOCATION 'new location'

Gibt den neuen Speicherort an. Es muss sich dabei um einen Amazon S3-Speicherort handeln. Weitere Informationen zur Syntax finden Sie unter Tabellenort in Amazon S3.

Beispiele

ALTER TABLE customers PARTITION (zip='98040', state='WA') SET LOCATION 's3://amzn-s3-demo-bucket/custdata/';