chore: how to load external file(.csv) for using as a driving table in Hive

Happyprg
Mar 26, 2021

--

  • 파일 upload to HDFS
  • hdfs dfs -copyFromLocal
  • 테이블 생성
CREATE EXTERNAL TABLE onetime.issue_1081_v1
(
sid string,
category string,
pv string,
nnb string
) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\054'
STORED AS TEXTFILE
LOCATION 'hdfs:///onetime/kr/issue/1081';
  • 생성된 External Table에 Load, Load되면 파일 사라짐
LOAD Data  INPATH '/zeppelin/issue_1081_SID.csv' OVERWRITE INTO TABLE onetime.issue_1081_v1;

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response