sqoop Hive 설정 가 져 오기
2307 단어 sqoop
sqoop import --connect jdbc:oracle:thin:@url --username user --password pwd \
--table PA18ODSDATA.PARTNER_INFO \
--columns ID_PARTNER_INFO,PARTNER_ID,PARTNER_NAME,PROJECT_ID,PROJECT_NAME\
-m 1 --fields-terminated-by '\001' --lines-terminated-by '
' \
--hive-drop-import-delims --hive-import --hive-overwrite \
--hive-table eshop.partner_info
-- query 를 사용 하려 면 -- output - dir 를 추가 하여 텍스트 형식 으로 데 이 터 를 내 보 내야 합 니 다.
시 계 를 직접 가 져 오 면 위의 코드 와 같 습 니 다.
그 중에서 -- hive - overwrite 키 워드 를 제거 하면 데 이 터 를 덮어 쓰 지 않 고 Hive 표 에 데 이 터 를 삽입 할 수 있 습 니 다.
데 이 터 를 삽입 하 는 표 는 text 표 나 sequence 표 여야 합 니 다. rcfile 표 는 새로운 데 이 터 를 삽입 하 는 것 을 지원 하지 않 습 니 다.
그 중에서 Hive 설정 에 대한 설명 은 다음 과 같 습 니 다.
자세 한 내용 은:
http://sqoop.apache.org/docs/1.4.2/SqoopUserGuide.html
Table�14.�Hive arguments:
Argument
Description
--hive-home
Override $HIVE_HOME
--hive-import
Import tables into Hive (Uses Hive’s default delimiters if none are set.)
--hive-overwrite
Overwrite existing data in the Hive table.
--create-hive-table
If set, then the job will fail if the target hive
table exits. By default this property is false.
--hive-table
Sets the table name to use when importing to Hive.
--hive-drop-import-delims
Drops , \r, and \01 from string fields when importing to Hive.
--hive-delims-replacement
Replace , \r, and \01 from string fields with user defined string when importing to Hive.
--hive-partition-key
Name of a hive field to partition are sharded on
--hive-partition-value
String-value that serves as partition key for this imported into hive in this job.
--map-column-hive
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
ERROR hive.HiveConfig: Could not load org.apache.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR오류 내용: 해결 방법:hive-exec-2.3.4.jar의 소프트 링크가 sqoop의lib 디렉터리에 있습니다...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.