유혜연님의 프로필 사진

유혜연

.

[빅쿼리에서 중첩(nested)된 배열 평면화(unnest)하기] ❌ SELECT * FROM `spaceships` WHERE crew = "Zoe" -> crew는 배열, "Zoe"는 문자열 -> 중첩된 배열을 평면화하여 조건 부여 필요 ⭕ SELECT * FROM `spaceships`, UNNEST(crew) as crew_member WHERE crew_member = "Zoe" -> 쉼표 또는 cross join UNNEST(ARRAY) ✅ 응용 SELECT event_name, param FROM `firebase-public-project.analytics_153293282.events_20180915`, UNNEST(event_params) AS param WHERE event_name = "level_complete_quickplay" AND param.key = "value" -> event_params 배열을 평면화하여 param.key가 "value"인 조건 부여 참고: https://zzsza.github.io/gcp/2020/04/12/bigquery-unnest-array-struct/

Using the UNNEST function in BigQuery to analyze event parameters in Analytics

Medium

Using the UNNEST function in BigQuery to analyze event parameters in Analytics

다음 내용이 궁금하다면?

지금 간편 가입하고 다음 내용을 확인해 보세요!

또는

이미 회원이신가요?

2022년 11월 28일 오후 1:54

댓글 0