influxdata / influxdb-gds-connector

Google Data Studio Connector for InfluxDB.
MIT License
11 stars 4 forks source link

Metrics and Dimensions are imported around the wrong way #6

Closed BeenFifteen closed 3 years ago

BeenFifteen commented 4 years ago

Currently when data is imported into data studio from InfluxDB, time is imported as a metric (blue) while the metrics are imported as dimensions (green). This should be the opposite way round and currently makes this unusable.

bednar commented 4 years ago

Hi @BeenFifteen,

thanks for using our connector.

I think that the mapping highly depend on your InfluxDB schema. The connector is not able to know how was your field aggregated.

The metrics could be use as a source for aggregated operation:

Schema: image

Aggregated function over metrics: image

For more info see our example: https://github.com/influxdata/influxdb-gds-connector/tree/master/examples

If this setting doesn't fit your requirements, Could you please share a little bit more info about your InfluxDB schema and how you want to use it in Google Data Studio?

Regards

BeenFifteen commented 4 years ago

Hi bednar,

Thanks for the quick reply and for everything you've done on this connector.

Currently I am simply trying to begin with a basic weather station dashboard using my weather station information stored on influxdb. The first thing I wanted to implement was a time-series chart so I tried to set it up as follows.

image

But as can be seen above it couldn't be done. Other time-series charts get set-up as seen in the example following with time being the dimension, and the other fields being metrics.

image

Is this an issue with my InfluxDB field setup or with the connector?

Thanks

bednar commented 4 years ago

You are able to change how you visualise your data. Just change dimension to time and as a metric add Average of temperature_C.

BeenFifteen commented 4 years ago

I was able to shift a dimension to be a metric as you recommended. But the metric of time doesn't appear to be able to be set as a dimension even when setting it up time as a custom field.

BeenFifteen commented 4 years ago

Hi Bednar,

I was able to set time as a metric through the custom field.

image

Thanks for your help.

bednar commented 4 years ago

You could use TODATE function:

image
max-mykhailenko commented 3 years ago

Works for me

Formula for new calculated time dimension TODATE(time, '%Y-%m-%d %H:%M:%S', '%Y%m%d%H%M')

image