메뉴 건너뛰기

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;


번호 제목 글쓴이 날짜 조회 수
200 cloudera-scm-agent 설정파일 위치및 재시작 명령문 총관리자 2018.03.29 327
199 Cloudera가 사용하는 서비스별 포트 총관리자 2018.03.29 337
198 sentry설정후 beeline으로 hive2server에 접속하여 admin계정에 admin권한 부여하기 총관리자 2018.07.03 337
197 Cleaning up the staging area file시 'cannot access' 혹은 'Directory is not writable' 발생시 조치사항 총관리자 2017.05.02 338
196 Apache Spark와 Drools를 이용한 CEP구현 테스트 총관리자 2016.07.15 345
» [sqoop] mapper를 2이상으로 설정하기 위한 split-by컬럼을 찾을때 유용하게 활용할 수 있는 쿼리 총관리자 2020.05.13 348
194 Hive MetaStore Server기동시 Could not create "increment"/"table" value-generation container SEQUENCE_TABLE since autoCreate flags do not allow it. 오류발생시 조치사항 총관리자 2017.05.03 352
193 [kudu]테이블 drop이 안되고 timeout이 걸리는 경우 조치 방법 총관리자 2020.06.08 356
192 root계정으로 MariaDB설치후 mysql -u root -p로 db에 접근하여 바로 해줘야 하는일..(케릭터셑은 utf8) 총관리자 2015.10.02 362
191 hadoop클러스터를 구성하던 서버중 HA를 담당하는 서버의 hostname등이 변경되어 문제가 발생했을때 조치사항 총관리자 2016.07.29 363
190 기준일자 이전의 hdfs 데이타를 지우는 shellscript 샘플 총관리자 2019.06.14 363
189 HDFS상의 /tmp폴더에 Permission denied오류가 발생시 조치사항 총관리자 2017.01.25 367
188 TransmitData() to failed: Network error: Recv() got EOF from remote (error 108) 오류 현상 총관리자 2019.02.15 368
187 HUE를 사용할 사용자를 추가 하는 절차 총관리자 2018.05.29 369
186 scan의 startrow, stoprow지정하는 방법 총관리자 2015.04.08 376
185 Namenode Metadata백업하는 방법 총관리자 2020.02.10 385
184 namenode오류 복구시 사용하는 명령 총관리자 2016.04.01 387
183 Error: E0501 : E0501: Could not perform authorization operation, User: hadoop is not allowed to impersonate hadoop 해결하는 방법 총관리자 2015.06.07 389
182 hive metadata(hive, impala, kudu 정보가 있음) 테이블에서 db, table, owner, location를 조회하는 쿼리 총관리자 2020.02.07 392
181 Cassandra 3.4(3.10) 설치/설정 (5대로 clustering) 총관리자 2016.04.11 399

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.

위로