From 9a8e90cd8e796edf1d7b81aad1f34af72f0ec511 Mon Sep 17 00:00:00 2001 From: Andres Gregori Altamirano Date: Fri, 12 Jul 2024 15:49:13 +0000 Subject: [PATCH] change array_agg --- views/sessions.view.lkml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/sessions.view.lkml b/views/sessions.view.lkml index ba0d4d0..29a1f78 100644 --- a/views/sessions.view.lkml +++ b/views/sessions.view.lkml @@ -158,7 +158,8 @@ extends: [event_funnel, page_funnel] dimension: event_data { hidden: yes type: string - sql: SELECT ARRAY_AGG(event_data) FROM sessions ;; + sql: WITH t1 AS(SELECT ARRAY_AGG(${TABLE}.event_data) as event_data) + SELECT event_data FROM t1;; ## This is the parent array that contains the event_data struct elements. It is not directly useably as a dimension. ## It is necessary for proper unnesting in the model Join. }