Google Data Studio
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.
#
Step 1:Connect your Metriql on Google Data Studio#
Step 2:You need to deploy Metriql to a public environment and use the URL in Google Data Studio as follows:
Please add the
/api/v0
suffix 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.
#
Step 3: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.
#
LimitationsSince 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
sum(o_orderkey)
itself whiletotal_orders
is a measure defined in the metriql. If you have more than the maximum rows parameter, the value ofsum(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