메뉴 건너뛰기

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;


번호 제목 날짜 조회 수
630 journalnode노드 기동시 "should be an absolute path"가 발생하고 기동되지 않을 경우 확인사항 2016.09.22 3004
629 hadoop에서 yarn jar ..를 이용하여 appliction을 실행하여 정상적(?)으로 수행되었으나 yarn UI의 어플리케이션 목록에 나타나지 않는 문제 2017.05.02 3005
628 숭실대 교수님등 강의영상(바이오데이터마이닝, 빅데이터분산컴퓨팅, 컴퓨터 그래픽스, 데이터베이스응용및 프로그램밍, 데이터베이스, 의생명영상처리, 웹그로그래밍, 데이터마이닝, 컴퓨터구조) file 2017.06.13 3011
627 RDF storage조합에대한 test결과(4store, Jena+HBase, Hive+HBase, CumulusRDF, Couchbase) 페이지 링크 2016.05.26 3018
626 spark-shell을 실행하면 "Attempted to request executors before the AM has registered!"라는 오류가 발생하면 2018.06.08 3024
625 sparql에서 concat에제 2015.11.27 3030
624 hadoop에서 yarn jar ..를 이용하여 appliction을 실행하여 정상적으로 수행되었으나 yarn UI의 어플리케이션 목록에 나타나지 않는 문제 2017.05.02 3037
623 Cloudera설치중에 "Error, CM server guid updated"오류 발생시 조치방법 2018.03.29 3046
622 Authorization within Hadoop Projects 2022.06.13 3048
621 elasticsearch 기동시 permission denied on key 'vm.max_map_count' 오류발생시 조치사항 2017.06.23 3058
620 모두를 위한 머신러닝과 딥러닝의 강의 file 2016.09.27 3063
619 fuseki용 config-examples.ttl 예시 내용 2017.05.17 3069
618 [Encryption Zone]Encryption Zone에 생성된 table을 select할때 HDFS /tmp/zone1에 대한 권한이 없는 경우 2023.06.29 3070
617 Spark Streaming 코드레벨단에서의 성능개선 2016.10.31 3071
616 magento2 샘플데이타 설치 2017.01.31 3072
615 바나나 파이의 /tmp폴더를 외장하드로 변경하기 2015.07.24 3076
614 대표 오픈소스 라이선스, 한 눈에 보기! 2015.12.10 3080
613 format된 namenode를 다른 서버에서 다시 format했을때 오류내용 2016.09.22 3086
612 Ubuntu 16.04 LTS에 Hive 2.1.1설치하면서 "Version information not found in metastore"발생하는 오류원인및 조치사항 2017.05.03 3088
611 [jsoup]Jsoup Tutorial 2017.04.11 3104
위로