本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
重新載入已卸載資料
若要重新載入卸載作業的結果,您可以使用指COPY令。
下列範例顯示使用資訊清單檔案卸載資VENUE料表、截斷並重新載入的簡單案例。
unload ('select * from venue order by venueid') to 's3://amzn-s3-demo-bucket/tickit/venue/reload_' iam_role 'arn:aws:iam::0123456789012:role/MyRedshiftRole' manifest delimiter '|'; truncate venue; copy venue from 's3://amzn-s3-demo-bucket/tickit/venue/reload_manifest' iam_role 'arn:aws:iam::0123456789012:role/MyRedshiftRole' manifest delimiter '|';
重新載入之後,VENUE表格如下所示:
select * from venue order by venueid limit 5; venueid | venuename | venuecity | venuestate | venueseats ---------+---------------------------+-------------+------------+----------- 1 | Toyota Park | Bridgeview | IL | 0 2 | Columbus Crew Stadium | Columbus | OH | 0 3 | RFK Stadium | Washington | DC | 0 4 | CommunityAmerica Ballpark | Kansas City | KS | 0 5 | Gillette Stadium | Foxborough | MA | 68756 (5 rows)