Skip to content

About Integrating Data Tank 2.0 with Plazma DB

Treasure Data Data Tank 2.0 allows you to integrate with Plazma DB using PostgreSQL Import/Export connectors.

Import Data from Data Tank 2.0 to Plazma DB

You can import data from Data Tank 2.0 to Plazma DB using the PostgreSQL Import connector.

  1. Confirm the Data Tank 2.0 hostname, port, and database name in the Data Tank 2.0 Management UI.
  2. Create an access key and note the username and password. Learn more about the PostgreSQL Import Integration.
Data Tank 2.0 Management UI showing hostname, port, and database name
  1. In Authentications, enter the Data Tank 2.0 hostname, port, database name, username, and password. The Use SSL option must be enabled.
Authentication settings for PostgreSQL Import connector

Export Data to Data Tank 2.0 from Plazma DB

You can copy data from Plazma DB to Data Tank 2.0 using Result Export and Treasure Workflow.

Create the Data Tank 2.0 hostname, port, and database name beforehand from the Data Tank 2.0 Management UI. Also, create an access key with a policy of CUSTOMIZABLE_ADMIN and note the username and password. When using the integration, the Set Role option setting is required.

Export configuration for Data Tank 2.0

Presto Data Tank 2.0 Integration

This function requires configuration on both the customer and Treasure Data sides.

Presto, one of Treasure Data's query engines, can be used to submit queries and retrieve results from Data Tank 2.0. The query result set can be JOINed with Plazma DB data during Presto job processing. When using Presto, the query syntax conforms to Presto (extended functions on Data Tank 2.0 are not supported). When a query is submitted, the Data Tank 2.0 connection is made to the Reader node, which avoids load effects on the Writer node.

Presto Data Tank 2.0 integration architecture

Configuration to link the Access Key in Data Tank 2.0 with the API is operated by Treasure Data.

Operation Procedure

  1. Create an access key for your Data Tank 2.0 for use with this function. Set the necessary access policy for the access key in the Management UI.

    Creating an access key in Data Tank 2.0 Management UI
  2. Create a dedicated empty database for this function in the Treasure Console.

    Creating an empty database in Treasure Console
  3. Request Treasure Support to enable Data Tank 2.0 Presto integration. In the request, include the following information:

    • Data Tank 2.0 access key and password created in Step 1
    • Database name created in Step 2
    • Data Tank 2.0 hostname
  4. Treasure Data configures the integration setting and reports back to the customer when complete.

Query Syntax

To access Data Tank 2.0 via Presto, use the following syntax:

SELECT
  [Column Names in Data Tank 2.0]
FROM
  [Database Name created in Step 2].[Schema name in Data Tank 2.0].[Table Name in Data Tank 2.0]

Access Control

  • Plazma DB permission — Data Tank 2.0 Presto Integration requires Query or Full Access permission to the database for the Treasure Data user. Access control is managed in the Treasure Console.
  • Data Tank 2.0 permission — Data Tank 2.0 Presto Integration requires access permission to the schema associated with the access key in Data Tank 2.0. Access control is managed in the Management UI.
Access control configuration for Data Tank 2.0 Presto integration

Access to Data Tank 2.0

Data Tank 2.0 offers the PostgreSQL protocol, which allows you to use common PostgreSQL client tools. This section describes how to access Data Tank 2.0 with the psql command.

Access from the psql Command

The psql command allows you to connect to Data Tank 2.0 from the CLI.

  1. Download and install psql from the PostgreSQL downloads page.

  2. After installation, run the following command:

    psql -d <Database> -h <Host> -p 5432 -U <UserName>

The username and password are displayed on the Access Key page in the Management UI.