메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


sqoop에서 mapper를 2이상으로 설정하기 위한 split-by컬럼을 찾을때 유용하게 활용할 수 있는 쿼리

(abctable에서 part_ym='201908'인 데이터를 가지고 test_col이라는 컬럼의 값을 이용하여 10등분하고 그 개수를 확인하는 impala sql임, -1은 마지막 값에 속하는 개수를 의미함)

select tt, count(*) from {
   select case when bb.lapse1 <= cast(substr(aa.test_col, 5,4) as int) and case(substr(aa.test_col, 5,4) as int) < bb.lapse2 then t
                  when t=10 and bb.lapse2 = cast(substr(aa.test_col, 5,4) as int) then -1
            end tt
   from 
    (select * from dw.abctable where part_ym='201908' aa,
    (select min_val, max_vl, t, max_val*((t-1)/10) as lapse1, max_val*((t+0)/10) as lapse2 from
          (select min(cast(substr(test_col, 5,4) as int)) as min_val, max(cast(substr(test_col, 5,4) as int)) as max_val from dw.abctable where part_ym= '201908') a, 
          (select cast(t as int) as t from copy_t where t in ('01','02','03','04','05','06','07','08','09','10')) b
    ) bb
} kk
where kk.tt is not null
group by kk.tt
order by 1;


번호 제목 날짜 조회 수
621 hbase CustomFilter만들기 (0.98.X이상) 2015.05.08 409
620 hbase가 기동시키는 zookeeper에서 받아드리는 ip가 IPv6로 사용되는 경우가 있는데 이를 IPv4로 강제적용하는 방법 2015.05.08 363
619 secureCRT에서 backspace키가 작동하지 않는 경우 해결방법 2015.05.11 840
618 Nodes of the cluster (unhealthy)중 1/1 log-dirs are bad: 오류 해결방법 2015.05.17 829
617 Permission denied: user=hadoop, access=EXECUTE, inode="/tmp":root:supergroup:drwxrwx--- 오류해결방법 2015.05.17 484
616 java.lang.ClassNotFoundException: org.apache.hadoop.util.ShutdownHookManager 오류조치사항 2015.05.20 673
615 flume 1.5.2 설치및 테스트(source : file, sink : hdfs) in HA 2015.05.21 1609
614 hbase shell 필드 검색 방법 2015.05.24 2124
613 HAX is not working and emulator runs in emulation mode 메세지가 나오는 경우 file 2015.05.25 235
612 apk 파일 위치 file 2015.05.25 2301
611 센서테스트 file 2015.05.25 238
610 Error: Could not find or load main class nodemnager 가 발생할때 해결하는 방법 2015.06.05 652
609 Error: E0501 : E0501: Could not perform authorization operation, User: hadoop is not allowed to impersonate hadoop 해결하는 방법 2015.06.07 521
608 "File /user/hadoop/share/lib does not exist" 오류 해결방법 2015.06.07 849
607 hadoop 2.6.0에 sqoop2 (1.99.5) server및 client설치 == fail 2015.06.11 1914
606 Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.http.HttpConfig.getSchemePrefix()Ljava/lang/String; 해결->실패 2015.06.14 462
605 hortonworks에서 제공하는 메모리 설정값 계산기 사용법 file 2015.06.14 792
604 java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error: Unable to deserialize reduce input key from...오류해결방법 2015.06.16 1976
603 Tracking URL = N/A 가발생하는 경우 - 환경설정값을 잘못설정하는 경우에 발생함 2015.06.17 696
602 바나나 파이의 /tmp폴더를 외장하드로 변경하기 2015.07.24 307
위로