Role based embedded reports in data studio

Published On: 23 April 2020.By .
  • General

Multiple times we need to build reports to present our data. The Google Data Studio provides a powerful tool to build your own reports with less time and without any coding knowledge.

Google Studio depends on Data Source. The data source is a connection or method, which can be used to connect to our database.

There are multiple types of connectors available on the google data source and we can also build our own connector.

Inbuilt data source provider Here we can use data sources, according to our requirements.

First, we are using Mysql connector:

Step 1: First, add details to our database. Add Click on Authentication. If all details are correct, it will be connected to our database.

Step 2: There are 2 sections. a) You can select a table that will report the data needed. b) You can write own query. Then click on the connect button.

Step 3: According to the query, the column will show there. You can create an explorer report.

These connectors have a problem. Suppose we have a database of the HR Department. So the Administrator can view all departments’ data, but the Head of a department allows the only view of his department data.

In that case, we need to create a custom data source provider.

Step 1: We need to write a custom data source to First, edit the Application.json. Here we have to update the manifest JSON and script.



For more information

Step 2: Deploy your code. After deployment, you get “Deployment id” and direct URL of your Data Source.

Step 3: Need to provide your source JSON URL and allow parameters to override by URL. Allow parameters for our need for data according to department wise and connect to the data source.

So by using a custom connector, we can show data according to the role.

For publishing your Datasource script or otherwise, you can use less secure


Limits of embedding

  • Bookmark links can’t be used with embedded reports. If you need a customized view of the data, use editor filter properties and date ranges applied to the report.
  • Some websites may block the ability to embed their content.
  • Recursive embedding is not allowed: while you can embed a Data Studio report into itself, you won’t see the URL embed component in the embedded report.

Related content

Got an Idea?

Let’s create a better tomorrow together