The Linking API can be managed just by building an URL. The URL always has the same path and all of the customizations are made in the parameters.
The path is always:
https://datastudio .google.com/reporting/create
After the path, you can add the parameters to customize the experience of the user of the dashboard or change the dashboard itself.
There are some standard parameters you can add to the Linking URL. These are also called control parameters:
So a possible URL would be:
There is currently one setting for the report you are sharing:
When you click on one of these prepared links, at first you see the report with the selected page, in the selected mode and you can work with the dashboard already. Additionally at the top right corner is a “Save and share” button.
After clicking on this button a new menu for setting up the data sources appears.
You see the connected data sources and more information about the different connector settings (e.g. for BigQuery data: project, dataset, table, …). Furthermore, you can edit the data source, change fields, reconnect to another source, and more.
When you click then the “Acknowledge and save” button, a new report gets created with all the settings you have chosen.
You can change the data source settings by creating the new dashboard from the template. But it is also possible to do adjustments already with the “programmed” URL.
For the shared dashboard you can also replace or update the connected data sources. The settings for the different connector types are highly different. Due to that, we are focusing on the connector we have the most experience with, Google BigQuery.
The data source parameters for a BigQuery source you can add to the URL are the following:
The following connectors are currently supported by the Linking API:
The missing part is the alias of the data source. In the previous weeks, you might have already recognized the alias next to the data source.
Alias of the data sources
Every data source has an id attached which always starts with “ds” and then a random number behind. To change the data source settings for the new report, you have to use the alias of the template's data source in the final URL.
An example URL with changing the data source would be:
https://datastudio.google.com/reporting/create?c.reportId=ca5902da-ad31-1z34-13f8-98ec5f3ad950&c.pageId=p_xu283kdkwl&c.mode=edit&ds.ds334.datasourceName=changeddatasource&ds.ds334.connector=bigQuery&ds.ds334.projectId=project-123&ds.ds334.type=TABLE&ds.ds334.datasetId=marketing_data&ds.ds334.tableId=daily_channels
If there is an error in your URL you also get an error message.
In this case, the value of the type parameter is wrong. It should be TABLE.
Google improved with this API the way of duplicating and sharing dashboards and changing during the process the most important configurations. The idea is to build template reports and create custom reports out of these, with their own report settings and other data source connections.
This post is part of the new features in the Google cloud series from datadice and gives you detailed insights about a new feature in BigQuery or Data Studio.
Check out our LinkedIn account, to get insights into our daily working life and get important updates about BigQuery, Data Studio and marketing analytics
We also started with our own YouTube channel. We talk about important DWH, BigQuery, Data Studio and many more topics. Check out the channel here.
If you want to learn more about how to use Google Data Studio and take it to the next level in combination with BigQuery, check our Udemy course here.
If you are looking for help to set up a modern and cost-efficient data warehouse or analytical dashboards, send us an email to hello@datadice.io and we will schedule a call.