Visit our new documentation site! This documentation page is no longer updated.

Connect to Databases & Create Datasets

This article describes how to connect to databases from Treasure Reporting.

Table of Contents

Initial Setup by Account Owner

First, login as Treasure Data’s account owner and go to Treasure Data Console.

Then you’ll see Reporting button on the left navigation. Click Reporting to go to and log in to Treasure Reporting.

First time account owner clicks the Reporting button, it will setup Treasure Reporting account automatically.

Connect to Databases

Then let’s set up the connection from Treasure Reporting to your databases. In Treasure Reporting, connections are called Integrations.

To create the new integration, click the red + button on the bottom right, and select Integration. Then you can choose either Treaure Data or PostgreSQL.

Treasure Data

Treasure Data integration will let you query directly against your databases.

  • Integration Name: Your integration name
  • Endpoint:
  • Database Name (Optional): Your default database to use
  • API key: Your apikey. Please refer here to retrieve your API key.

After you’ve confirmed the connection, select Multidimentional data source.

PostgreSQL (Data Tank)

PostgreSQL integration will connect to your Data Tanks, which is a TD’s datamart.

  • Integration Name: Your integration name
  • Host: Your PostgreSQL hostname
  • Port: Your PostgreSQL port
  • Database Name: Your PostgreSQL database name (you need to create integration per database)
  • Username: Your PostgreSQL username
  • Password: Your PostgreSQL password

Create Dataset

Next, you need to create a Dataset which represents the source data for your report & dashboard. Click the red + button on the bottom right again, and select Dataset.

Then click Dataset based on existing integration and select the integration you’ve created above.

Then, you can create the dataset either from your own SQL or existing tables.

Then you specify types of each column.

If you click Done, the dataset is created. Now it’s time to create charts and dashboards!

Last modified: Apr 19 2018 16:16:18 UTC

If this article is incorrect or outdated, or omits critical information, let us know. For all other issues, access our support channels.