.csv
파일을 하이브 테이블에 ORC 파일로로드하려고합니다.임시 하이브 테이블을 통해 ORC로 하이브 테이블에 텍스트 데이터를로드 할 수 없습니다.
CREATE TABLE IF NOT EXISTS CrimesData(ID int, Case_Number int, CrimeDate string, Block string , IUCR string,Primary_Type string, Description string, Location_Description string, Arrest string, Domestic string, Beat int, District int, Ward int, Community_Area int, FBI_Code string, X_Coordinate int, Y_Coordinate int, Year int, Updated_On string, Latitude decimal(10,10), Longitude decimal(10,10), CrimeLocation string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' ESCAPED BY '"' LINES TERMINATED BY '\n'
tblproperties("skip.header.line.count"="1")
LOAD DATA LOCAL INPATH '/home/cloudera/Documents/CrimesData.csv' INTO TABLE CrimesData
: 임시 테이블에 텍스트 파일로 작성
1) 및 데이터를로드 : 나는 아래의 쿼리를 실행하는 문제에 대한 해결 방법을 제시 한 post 건너 온)
CREATE TABLE IF NOT EXISTS CrimesDataORC(ID int, Case_Number int, CrimeDate string, Block string , IUCR string,Primary_Type string, Description string, Location_Description string, Arrest string, Domestic string, Beat int, District int, Ward int, Community_Area int, FBI_Code string, X_Coordinate int, Y_Coordinate int, Year int, Updated_On string, Latitude decimal(10,10), Longitude decimal(10,10), CrimeLocation string)
STORED AS ORC;
3 : 2) 새로운 테이블을 생성하고 소스로서 ORC 데이터 지정 처음 두 단계는 오류없이 실행
INSERT INTO TABLE CrimesDataORC SELECT * FROM CrimesData;
을하지만, 3 단계는 다음과 같은 오류가 발생합니다 : 임시 테이블에서 새 테이블에 데이터를 삽입 내가 클라우 데라에서 위의 쿼리를 실행하고
Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
을 Manager 빠른 시작 VM 5.8.
같은 데이터베이스의 다른 테이블에 대해 비슷한 단계가 예상대로 작동하지 않는 이유는 확실하지 않습니다.
제안 해 주셔서 감사합니다. 작동하는지 확인해 보시기 바랍니다. –
시도한 시도 : INSERT INTO TABLE CrimesDataORC SELECT * FROM CrimesData LIMIT 10; 하지만 그것도 잘 풀리지 않았다 .. :( –