Presto 0.151 Documentation에 보면 JSON함수 이야기가 나온다.

내가 필요한 내용 위주로 다시 정리해 본다.



1. 일부 값 추출하기 

  • json_extract( json, json_path )
  • 예) json_extract( json, '$.root.child')


2. "a"인 경우 "제거한 a만 구하기

  • json_extract_scalar( json, json_path )
  • 예) json_extract_scalar( json, '$.root.child')


3. 사이즈 구하기

  • json_size( json, json_path)
  • 예) json_size( json, '$.root' )


나머지 함수에 대한 자료

https://prestodb.io/docs/current/functions/json.html


'Presto' 카테고리의 다른 글

[Presto] 사용팁 정리  (0) 2016.10.27
Presto에서 base64 데이터 디코딩하기  (0) 2016.08.17

+ Recent posts