메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, 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;


번호 제목 글쓴이 날짜 조회 수
340 DataNode를 기동할때 "Block pool ID needed, but service not yet registered with NN" 오류 발생에 따른 조치사항 총관리자 2018.05.28 962
339 postgresql-9.4에서 FATAL: remaining connection slots are reserved for non-replication superuser connections가 나올때 조치 총관리자 2018.08.16 945
338 column family삭제시 Column family 'delete' does not exist오류 발생하는 경우 총관리자 2014.04.14 932
337 동일서버에서 LA와 LC동시에 기동하여 테스트 총관리자 2014.04.01 928
336 Current heap configuration for MemStore and BlockCache exceeds the threshold required for successful cluster operation 총관리자 2017.07.18 892
335 unique한 값 생성 총관리자 2014.04.25 888
334 sqoop export/import등을 할때 driver를 못찾는 오류가 발생하면... 총관리자 2014.05.15 867
333 Impala의 Queries탭에서 여러조건으로 쿼리 찾기 총관리자 2018.05.09 864
332 oozie 4.1 설치 - maven을 이용한 source compile on hadoop 2.5.2 with postgresql 9.3 총관리자 2015.04.30 862
331 Hive JDBC Connection과 유형별 에러및 필요한 jar파일 총관리자 2021.05.24 836
330 dual table만들기 총관리자 2014.05.16 827
329 hive query에서 mapreduce돌리지 않고 select하는 방법 총관리자 2014.05.23 812
328 update 샘플 총관리자 2018.03.12 810
327 oozie job 구동시 JA009: User: hadoop is not allowed to impersonate hadoop 오류나는 경우 총관리자 2014.06.02 807
326 sentry설정 방법및 활성화시 설정이 필요한 파일및 설정값, 계정생성 방법 총관리자 2018.08.16 780
325 mongodb aggregation query를 Java code로 변환한 샘플 총관리자 2016.12.15 777
324 oracle to hive data type정리표 총관리자 2018.08.22 765
323 [Kerberos]Kerberos상태의 클러스터에 JDBC로 접근할때 케이스별 오류내용 총관리자 2020.02.14 764
322 beeline실행시 User: root is not allowed to impersonate오류 발생시 조치사항 총관리자 2016.06.03 761
321 [DBeaver 4.3.0]import/export시 "Client home is not specified for connection" 오류발생시 조치사항 총관리자 2017.12.21 753

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로