Hey @amal.kmr.singh ,
Can you please detail the table schema for you customer table and describe the granularity?
At first it seems that the square brackets are extra there and you can take them off.
maybe try this:
{{ config(materialized=‘table’) }}
SELECT
customer_id,
ARRAY_AGG(STRUCT(first_name,middle_name
,MOBILE_PHONE_NUMBER) as cutomer_details)
FROM `customer`
GROUP BY
customer_id
But for you to achieve what you want I’d say a little more detail on your part would be helpful!
Thanks and happy dbt’ing