I have multiple time-series, for example, for different categories and products. So my data have the following columns: time, category, product, sales. Should I just create a normal table with time partition and category+product clustering, or should I create a nested structure such as
SELECT category, product, ARRAY_AGG(STRUCT(time, sales) ORDER BY time ASC) as series
FROM data_source
GROUP BY 1, 2
The end goal is to visualize the data in Looker, where I would like to see the trending for multiple category and product, i.e. (number of products x number of categories) time-series.