在您開始之前:設定 COPY 選項並載入資料 - AWS Data Pipeline

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

在您開始之前:設定 COPY 選項並載入資料

在將資料複製到其中的亞馬遜紅移之前AWS Data Pipeline,請確保您:

  • 從亞馬遜 S3 載入資料。

  • 在亞馬遜紅移中設置COPY活動。

一旦讓這些選項開始運作並成功完成資料載入,請將這些選項傳輸至 AWS Data Pipeline,在其中執行複製。

如需COPY選項,請參閱 Amazon Redshift 資料庫開發人員指南中的複製

如需從 Amazon S3 載入資料的步驟,請參閱亞馬遜 Redshift 資料庫開發人員指南中的從 Amazon S3 載入資料。

例如,Amazon Redshift 中的下列 SQL 命令會建立名為的新表格,LISTING並從 Amazon S3 中公開可用的儲存貯體複製範例資料。

以您自己的值取代 <iam-role-arn> 和區域。

如需有關此範例的詳細資訊,請參閱 Amazon Redshift 入門指南中的從 Amazon S3 載入範例資料。

create table listing( listid integer not null distkey, sellerid integer not null, eventid integer not null, dateid smallint not null sortkey, numtickets smallint not null, priceperticket decimal(8,2), totalprice decimal(8,2), listtime timestamp); copy listing from 's3://awssampledbuswest2/tickit/listings_pipe.txt' credentials 'aws_iam_role=<iam-role-arn>' delimiter '|' region 'us-west-2';