Google Data Studio Connector

Data Studio Community Connectors enable direct connections from Data Studio to any internet accessible data source. You can connect to commercial platforms, public datasets, or your own on-premise private data. Community Connectors can fetch data through Web APIs, JDBC APIs, flat files (CSV, JSON, XML), and Apps Script Services.

Let's assume you have published a package on npm and you want to track the download count of the package over time by day. In this codelab, you will build a Community Connector that fetches this data from the npm package download counts API. Then you can use that Community Connector in Data Studio to build a dashboard visualizing this data.

In a basic Community Connector, you'll define four functions:

  • getAuthType()

  • getConfig()

  • getSchema()

  • getData()

Depending on the current step of the workflow, Data Studio executes these connector functions and uses the response in the subsequent steps. The video below gives an overview of:

  • How a Community Connector works

  • Different steps in the workflow

  • When different functions are called

  • When Data Studio shows different user interfaces

  • Expected user actions at different steps

 

Nov 26, 2020

I have managed to create a connector that can invoke an Jira api e.g. https://example.atlassian.net/rest/agile/latest/board/1. The authentication utilised for this purpose is the use of a Key as a Basic token.

When the user starts the connector, they will need to provide a key in this instance. The key needs to be in the format of user_email:token and then base64 encoded.

Currently in the code, i have supplied the base64 key.

The result of this specific query will look something like this:

{
"maxResults": 50,
"startAt": 0,
"total": 1,
"isLast": true,
"values": [
{
"id": 1,
"self": "https://kodevelop.atlassian.net/rest/agile/1.0/board/1",
"name": "GDS board",
"type": "simple",
"location": {
"projectId": 10000,
"displayName": "GDS (GDS)",
"projectName": "GDS",
"projectKey": "GDS",
"projectTypeKey": "software",
"avatarURI": "/secure/projectavatar?size=small&s=small&pid=10000&avatarId=10412",
"name": "GDS (GDS)"
}
}
]
}

Then the response will be parsed and you can pretty much get any data from this and many other apis on the platform.

The next steps are:

  1. Check if there is a function that appscript can support to create a base64 encoded key otherwise will probably have to call an api to do that. I am not sure how secure will that be.

  2. To use oAuth instead of key auth type.