hive 에서 json 문자열을 map으로 변환하는 방법은 다음과 같다. SELECT substring("{'a':'1','b':'2'}", 2, length("{'a':'1','b':'2'}")-2); SELECT str_to_map(substring("{'a':'1','b':'2'}", 2, length("{'a':'1','b':'2'}")-2), ",", ":"); SELECT explode(str_to_map(substring("{'a':'1','b':'2'}", 2, length("{'a':'1','b':'2'}")-2), ",", ":")) as (key,value); hive> SELECT substring("{'a':'1','b':'2'}", 2, length("{'a':'1','b':'2..
[python2의 map, filter, reduce 함수] map 함수를 이용하여 리스트의 값들에 동일한 로직을 적용하여 데이터를 변환하고, filter 함수를 이용하여 리스트의 값들을 필터링,reduce 함수를 이용하여 리스트의 값을 하나로 모은다. temp_list = range(0, 10) # python map, filter, reduce 함수 # map 함수는 iterable 에 동일한 함수를 적용한다. # map(function, iterable, ...) print map(lambda x: x + 1, temp_list) # filter 함수는 iterable 에서 조건에 맞는 함수를 제거한다. print filter(lambda x: x > 3, temp_list) # reduce 함수는..
- Total
- Today
- Yesterday
- 하둡
- build
- bash
- HIVE
- HDFS
- 하이브
- nodejs
- airflow
- Python
- Linux
- 오류
- hbase
- S3
- 다이나믹
- 파이썬
- 백준
- emr
- yarn
- SPARK
- 정올
- 알고리즘
- AWS
- mysql
- java
- Hadoop
- error
- ubuntu
- SQL
- Tez
- oozie
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |