Skip to content

taosdata/gds-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TDengine Google Data Studio Connector

TDengine connector for Google Data Studio. This connector is based on TDengine's RESTful APIs and can connect with either a TDengine server with taosAdapter installed or a TDengine cloud instance. This document includes the following content:

  • Prerequisite of using TDengine connector for Google Data Studio.

  • Connect configuration information.

  • Relationship with Google Data Studio ConceptType and DataType.

  • A simple example.

Prerequisite

You can install TDengine server with taosAdapter or just using TDengine cloud.

Connect Configuration Information Description

Data Source

Necessary configuration

This is a single selection that needs to be selected first. Options include TDengine Server and TDengine Cloud. Based on the option you choose, you will see different configuration items.

URL

Necessary configuration for both TDengine Server and TDengine Cloud

This URL is used to send http requests to TDengine through REST APIs. For TDengine Server, the URL format should follow the syntax: http://hostname:port. In this URL, the hostname needs to be accessible on a public network. What’s more, the port should be opened and the TDengine REST connection's default port is 6041. The following is a TDengine Server URL example:

# For TDengine Server
http://norepeat.space:6041

For TDengine Cloud, you can get this URL from your cloud instance information page. Indeed, this URL's instance must be in active status. The following is a TDengine Cloud URL example.

# For TDengine Cloud 
http://gw.us-east-1.aws.cloud.tdengine.com:80

TDengine Cloud Token

Necessary configuration for TDengine Cloud This token is from your TDengine cloud, which should correspond with an active instance URL. The following is a TDengine Cloud token example.

9da2fda0b141e3c85064cdcca90ea9357c9bd790

username

Necessary configuration for TDengine Server

The username, which has the access priority of the database that you want to query. In the example, the username is root, and that is the default user of TDengine.

password

Necessary configuration for TDengine Server

The password corresponds with the username you have entered in the previous text field. In the example, taosdata is the default password for TDengine's default user root.

database

Necessary configuration for both TDengine Cloud and TDengine Server

The database name that contains the table(no matter if it is a normal table, a super table or a child table) is the one you want to query for data and make reports on. In the example, we suggest we want to access a database named test.

table

Necessary configuration for both TDengine Cloud and TDengine Server

The name of the table you want to connect to and query its data to make a report. In this example, we will create a report for table meters.

Notice Currently, the maximum number of retrieved records is 1000000 rows.

Query range start date & end date

Optional configurations

There are two text fields on our login page. Generally, these are two date filter conditions which are used to limit the amount of retrieved data, and the date should be entered in YYYY-MM-DD HH:MM:SS format. e.g.

2022-05-12 18:24:15

The start date defines the beginning timestamp of the query result. In other words, records earlier than this start date will not be retrieved.

The end time indicates the end timestamp of the query result. Which means that records later than this end date will not be retrieved. These conditions are used in SQL statement's where clause like:

-- select * from table_name where ts >= start_date and ts <= end_date
select * from test.demo where ts >= '2022-05-10 18:24:15' and ts<='2022-05-12 18:24:15'

Indeed, through these filters, you can improve the data loading speed in your report.

Match with Google Data Studio ConceptType and DataType

ConceptType

Currently, we set TDengine's TAG columns and timestamp columns as dimensions, and other columns will be set as metrics.

DataType

TDengine's data type mapping with Google Data Studio's field type. You can refer to the following matrix.

TDengine's DataType GDS's DataType
BOOL BOOLEAN
TINYINT NUMBER
SMALLINT NUMBER
INT NUMBER
BIGINT NUMBER
FLOAT NUMBER
DOUBLE NUMBER
TINYINT UNSIGNED NUMBER
SMALLINT UNSIGNED NUMBER
INT UNSIGNED NUMBER
BIGINT UNSIGNED NUMBER
BINARY TEXT
NCHAR TEXT
JSON TEXT
TIMESTAMP YEAR_MONTH_DAY_SECOND

A Simple Using Example

Authorize Page

Authorize page

Login Config Page

TDengine Cloud Login Config

login config

TDengine Server Login Config

login config

Got Connection

got connection

Example Report Template

report example

About

TDengine connector for Google Data Studio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published