하이브 테이블에 데이터를 쓰려고하는데 실패했습니다. Cycle_dt = null의 끝에 오류가 발생하고 하나의 파티션 만 쓰고 있습니다. 첫날이야.첫 번째 파티션을 디스크가 아닌 디스크에만 쓰는 동적 파티션으로 하이브 테이블에 삽입
set hive.auto.convert.join=true;
set hive.optimize.mapjoin.mapreduce=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.dynamic.partition=true;
set mapred.map.tasks = 100;
Insert into table dynamic.dynamic_test_avro_v1 partition(cycle_dt)
Select date_time as CYCLE_TS, case when evar1 is not null or length(trim(evar1)) > 0 then cast(unbase64(substring(evar1,6,12)) as string) end NRNM ,
prop14 as state, evar8 as FLOW_TYPE, prop25 as KEY, pagename PAGE_NM,
partition_dt as cycle_dt from source.std_avro_v1 WHERE
(partition_dt = '2016-10-02' AND partition_dt < '2016-10-07')
AND (
evar8='google');
나는 여기서 무슨 일이 일어나는지 확신 할 수 없다. 날짜 범위를 파티션으로 만 가져 오는 날짜 범위 설정이 있습니다.
'partition_dt = '2016년 10월 2일'':
당신은 아마 날짜 범위를 원? –
일을 기준으로하는 원본 테이블의 파티션입니다. –
하지만 마지막 열이므로 대상 파티션이기도합니다. 따라서이 쿼리에서 하나의 파티션을 생성하게됩니다. –