metriql has a community connector for Google Data Studio that converts Google Data Studio queries into metriql queries (segmentation) which are run directly on your data warehouse and let you visualize the data in Google Data Studio. The metriql connector needs you to login through Google OAuth and enter your metriql URL and credentials to access your data. In order to run queries efficiently, the connector uses segmentation feature so you need to deploy Metriql to your environment.Connect your metriql on Google Data Studio
You need to deploy metriql to a public environment and use the URL in Google Data Studio as follows:
Please add the
/api/v0suffix to your metriql URL. If you're using metriql locally, you can use a tunneling service to expose your local port to the internet and use the public URL in Google Data Studio.
If you don't have a password, you can skip the password input.
Once you connect to your metriql deployment, Google Data Studio connectors lists all the dataset available to the user as follows:
You should see the data model when you select the dataset. If you're using semantic types, you can define them in your YML files as follows:
columns:- name: pricemeta:metriql.dimension:report:datastudio:semantic_type: currency_usd
Please refer to the Google Data Studio documentation for all the available semantic types.
Congratulations, you're ready to create reports! 🎉
If your metriql deployment runs behind the firewall, you need to whitelist Google Data Studio IPs in your firewall.
Since metriql doesn't support ad-hoc aggregations on dimensions, you should not drag & drop dimensions into metric as seen in the picture. Google Data Studio calculates the
total_ordersis a measure defined in the metriql. If you have more than the maximum rows parameter, the value of
sum(o_orderkey)won't be correct.
You can only use the fields in dimension & metric in the sorting. Google Data Studio doesn't pushdown this information to the connector so if you have a sorting field that is not being used as part of dimension & metric, metriql treats the sorting field as a dimension field.
You should not be using a DATE dimension in filter if it's not included in the dimensions section. We filed the bug to Google Data Studio, you can find the relevant info here: https://support.google.com/datastudio/thread/121049694/forfilteronly-field-is-not-set-for-date-filters?hl=en