Question

add dimensions as they appear in a JSON column

  • 7 June 2021
  • 0 replies
  • 64 views

We’ve got a JSON column with varied and often-changing keys. I want each of those keys to be a dimension.

 

What I do now is run a query that produces, as output, one key per row, and I use that and an offline script to generate the LookML. The query looks back on all of history to make sure I include all the JSON keys we’ve ever used. I then copy-paste the generated LookML instead of the old version into Looker.

 

The problem is that querying so much history every time is inefficient. I’d rather add to a list than replace it.

 

I seek a solution for this.  My idea is to add to a PDT and then somehow get that PDT to automatically become a list of dimensions (perhaps using Liquid?), but I’ve no idea how to do that latter.

 

Any suggestions, please?


This topic has been closed for comments