Modeling nested data in Google data studio community connectors

Viewed 1220

My general question is: how should I model the data / build a schema to support nested fields (lists of primitives, lists of objects), like:

{
 "id": 123,
 "phrases": ["a", "b", "c"],
 "authors": [
    {
      "name": "Jon"
    },
    {
      "name": "Bob"
    }
 ]
}

In general, I'd expect two solutions:

1. De-normalize the data. Duplicate rows for each nested value/attribute

"rows": [
    {
      "values": [123, "Jon", "a"]
    },
    {
      "values": [123, "Jon", "b"]
    },
    {
      "values": [123, "Jon", "c"]
    },
    ...   
]

Probably I could do it by myself but just wondering if there is a way google data studio does it for me? I know that tools like Power BI allow expanding nested types.

2. Normalize the data. Create multiple tables and build relations between them.

Is it possible in Google data studio? Are there any examples and documentation?

1 Answers

This depends on your use case for the data. I would recommend going for #1.

You have the option to send multiple schema/tables through one data source from a Community Connector but you cannot send the relationship information. I don't know of any documentation available on this yet.

Related