2013-07-21 3 views
1

매일 덤프 파일을 가져 와서 압축을 푼 다음 다시 s3에 저장했습니다.Amazon RedShift로 Alexa 데이터 가져 오기

나는 다음과 같은 오류를 수신하고 노력과 PostgreSQL에 복사본 문을

Missing newline: Unexpected character 0x14 found at location 4 

검색어 :

copy temp from 's3://bucket/top-1m.csv' credentials 'blah blah blah'; 

내가 각 라인에 몇 가지 좀 문자를 추가해야합니까?

원시 데이터 :에서

1,facebook.com 
2,google.com 
3,youtube.com 
4,yahoo.com 
5,amazon.com 
6,baidu.com 
7,wikipedia.org 
8,live.com 
+0

구분 :

copy temp from 's3://bucket/top-1m.csv' credentials 'blah blah blah' delimiter as ',';

또는 쉼표에 대한

파일을 분리? 기본값은 | – Guy

+0

RedShift 또는 Alexa의 기본값은 무엇입니까? –

+0

적색 변경 COPY 명령 – Guy

답변

0

Redshift COPY 명령은 PIPE '|' 기본 구분 문자로 사용됩니다. 파일이 다른 문자 (쉼표로 구분)로 구분되는 경우 COPY 명령에 DELIMITER 키워드를 추가하기 만하면됩니다.

copy temp from 's3://bucket/top-1m.csv' credentials 'blah blah blah' csv; 
-1

복사 온도 '(S3) : //bucket/top-1m.csv'자격 증명 'ㅋ ㅋ ㅋ ㅋ ㅋ ㅋ'구분 ',';

관련 문제