Making changes to cht-couch2pg view useview_telemetry

I’d like to make some improvements to the useview_telemetry view created by cht-couch2pg. As detailed here this issue has some structural challenges which make it ill-suited for the task.

I’m wondering what is the right way to make this change?

Do I just make a new matview like useview_telemetry_long? Should we “recommend users to drop the useview_telemetry” so it doesn’t waste compute? Or should I update the existing view?

2 Likes

I see two possible paths:

  • Direct replacement: if the new view would contain existing fields
  • New view: e.g useview_telelemtry_extended if it’s impossible to retain backwards compatibility

It would be interesting to get views from the community on how they’ve used the existing useview_telemetry which could inform what approach is taken with the new view.

1 Like

As I see it - the “wide” format of the table can’t be made to work with the dynamic nature of telemetry metrics. For example enketo:my_form:metric will add new columns to the table schema each time a new form is created in the project data… Seems we want to use a “long” format for this.

That would mean a new view. But that’s a second redundant view which does the same thing.
I’m open to any suggestions or alternatives.

1 Like