{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["img"]},"redocly_category":"Data Tank","product_name":"Data Tank","type":"markdown"},"seo":{"title":"Replacing Data Tank 1.0 with 2.0","description":"Guide to migrating from Treasure Data Data Tank to Data Tank 2.0, covering feature differences, integration changes, and authentication updates.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"replacing-data-tank-10-with-20","__idx":0},"children":["Replacing Data Tank 1.0 with 2.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This article covers changes around integrations when replacing Data Tank with Data Tank 2.0. As part of its commitment to security and protection of sensitive data, Treasure Data recommends reviewing the entire document before beginning any steps."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"feature-differences-between-data-tank-and-data-tank-20","__idx":1},"children":["Feature Differences between Data Tank and Data Tank 2.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This section describes the feature gaps between Data Tank and Data Tank 2.0."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Feature"},"children":["Feature"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Data Tank 1.0"},"children":["Data Tank 1.0"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Data Tank 2.0"},"children":["Data Tank 2.0"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DIFF"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Static IP address"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Writer endpoint URI; associated IP address cannot be fixed"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Database name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DIFF"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["datatank"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aciddb"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Access controls (roles and schemas)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DIFF"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Treasure Data provides ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tank_user"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tank_integration_user"]}," accounts"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Users and schemas are created in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Management UI"]}," (accounts are called ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Access Keys"]},"); access control is managed within the UI"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DDL statements"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DIFF"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No additional command required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SET ROLE _owner_aciddb_<schema_name>"]}," must be executed before running DDL"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SSL encryption"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DIFF"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not enforced"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["All connections require SSL"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maintenance windows"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DIFF"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No regular window; support coordinates as needed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customers define a weekly maintenance window; patches are applied during that time (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/understanding-data-tank-2-0-maintenance"},"children":["Understanding Data Tank 2.0 Maintenance"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["IP allowlist size"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DIFF"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No limit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Up to 200 IP addresses"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Engine behavior gaps"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DIFF"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Based on PostgreSQL 12"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Based on Aurora PostgreSQL 12.13; some engine differences apply"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom port number"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UNSUPPORTED"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Default 5432, customizable via Support"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fixed to port 5432"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Port forwarding"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UNSUPPORTED"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Support can add ports 80, 443, or 5439"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not supported"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["IPv6 allowlist"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UNSUPPORTED"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supports IPv6"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["IPv6 is not supported"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Extensions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UNSUPPORTED"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["plpgsql"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pgcrypto"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cstore_fdw"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mysql_fdw"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tds_fdw"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["foreign_table_exposer"]}," installed by default"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["plpgsql"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pgcrypto"]}," available; ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SERVER"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FOREIGN DATA WRAPPER"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FOREIGN TABLE"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USER MAPPING"]}," objects cannot be migrated"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Management UI"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["NEW"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not available"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Web interface for managing configurations, roles, schemas, and monitoring"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Log collection"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["NEW"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not available"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["PostgreSQL logs viewable in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Management UI"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Monitoring"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["NEW"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dashboards provided via DataDog link"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dashboards available directly in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Management UI"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraPostgreSQLReleaseNotes/AuroraPostgreSQL.Extensions.html#AuroraPostgreSQL.Extensions.12"},"children":["AWS Aurora PostgreSQL extension documentation"]}," for the full list of extensions supported in Data Tank 2.0 (Aurora PostgreSQL 12.13)."]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/migration-from-data-tank-1-0-to-2-0-2024-04-16.bade5080991c01a24b3a336144f24f449f1a256aafadc04a7ab7ed4038ac9e21.f97e5221.png","alt":"Migration overview from Data Tank 1.0 to 2.0","withLightbox":true},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Within the Management UI you can configure database settings, create and manage schemas and access keys, and review logs and dashboards from a single interface."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Legacy Monitoring"},"children":["Legacy Monitoring"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Management UI Monitoring"},"children":["Management UI Monitoring"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/datadogmonitoring.aa8164483e488c4971542e235e70da5215549003e3099c9e97f2a76af31c11d0.f97e5221.png","alt":"Legacy DataDog monitoring dashboard","withLightbox":true},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/migration-from-data-tank-1-0-to-2-0-2024-04-16-2.4f0928af37c1403009a75ba08db9bf6a8f55ba8085a6b3baa22bff33034a0229.f97e5221.png","alt":"Management UI monitoring dashboard","withLightbox":true},"children":[]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"change-integration-with-data-tank-to-that-with-data-tank-20","__idx":2},"children":["Change Integration with Data Tank to that with Data Tank 2.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following two functions can be used to import records from Data Tank or export the result of a Hive/Trino query to Data Tank."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/postgresql-import-integration"},"children":["Import from PostgreSQL"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/postgresql-export-integration"},"children":["Export to PostgreSQL"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To use these integrations, you need to create an Authentication in advance in most cases."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authentications-for-data-tank","__idx":3},"children":["Authentications for Data Tank"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentications"]}," are prepared by default. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tank_integration_user"]}," is used as a database user for both of the following ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentications"]},"."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["datatank"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["datatank_cstore"]}]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/migration-from-data-tank-1-0-to-2-0-2024-04-10-2.fcbf369e85e3caa08ebc1749ba47fdc7132c321122db485c9add5d9ac44da233.f97e5221.png","alt":"Default Authentications for Data Tank","withLightbox":true},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also create user-defined Authentications."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"authentications-for-data-tank-20","__idx":4},"children":["Authentications for Data Tank 2.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authentications are not prepared by default. You need to create new Authentications."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"import-from-data-tank","__idx":5},"children":["Import from Data Tank"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To import from Data Tank, you need to run a Bulk Load job. To run this type of job, you use either of the following. If you want to replace Data Tank with Data Tank 2.0, you must change the import source from Data Tank to Data Tank 2.0."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sources (Treasure Console)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["CLI (Toolbelt, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_load>"]}," operator of Workflow)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sources","__idx":6},"children":["Sources"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you have existing ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sources"]}," for Data Tank, you can see those Sources connected to the Authentication in the Treasure Console as follows. The red arrow in the image points to the number of Sources associated with the Authentication named ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["databank"]},"."]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/migration-from-data-tank-1-0-to-2-0-2024-04-10-1.12586b5e3f7b3dc023279740ce5d4eace1b20a002d1c174db96dfe12901e5003.f97e5221.png","alt":"Sources connected to Authentication in Treasure Console","withLightbox":true},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If an existing Source imports from Data Tank 2.0, a new Source associated with the Authentication for Data Tank 2.0 is needed because each Source's authentication cannot be replaced. When you create a new Source that imports from Data Tank 2.0, it is recommended that the existing Source not be scheduled to run."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cli-td-toolbelt","__idx":7},"children":["CLI (TD Toolbelt)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you use CLI to import to Plazma DB using an Authentication, you use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_authentication_id"]}," option in your YAML file as follows. The Authentication ID set in this option must be changed to change the import source. In addition, you also need to change other options like the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["database"]}," option."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: postgresql\n  td_authentication_id: <your_authentication_id>\n  ...\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you don't use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_authentication_id"]}," option in the YAML file, the credentials of Data Tank would be specified instead of Authentication as shown in the following example. If so, replace them with Data Tank 2.0 credentials."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: postgresql\n  host: xx.xxx.xxx.xxx\n  user: tank_integration_user\n  password: xxxxx\n  ...\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"export-result-of-hivetrino-to-data-tank","__idx":8},"children":["Export Result of Hive/Trino to Data Tank"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Either of the following features can export the result of a Hive/Trino job to Data Tank. If you are using these features to export to Data Tank, you will need to change the destination to export to Data Tank 2.0."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Query Editor on Treasure Console"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_run>"]}," operator of Workflow"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td>"]}," operator of Workflow"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["CLI (Toolbelt)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["REST API"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"query-editor-on-treasure-console","__idx":9},"children":["Query Editor on Treasure Console"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can configure the export settings by selecting ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export Results"]}," as shown below. Then, you need to configure it again with a new ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentication"]}," to replace the existing one. Once you have deleted the existing export settings, use the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentication"]}," for Data Tank 2.0 to make new export settings."]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/migration-from-data-tank-1-0-to-2-0-2024-04-16-3.2ed05744854cbe023aa3ae20f4ba2eac2eb286bd5efc31e5d20f93707fe2cd6e.f97e5221.png","alt":"Export Results configuration in Query Editor","withLightbox":true},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If DDL is required, you need to set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_owner_<database_name>_<schema_name>"]}," to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Set Role"]}," option as follows:"]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/setroleaciddb.9b26bc3e92b291ebfdf78fa6fb46bb8a61d22a3888be9561a7403997d55e6266.f97e5221.png","alt":"Set Role option configuration for DDL","withLightbox":true},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"td_run-operator-of-workflow","__idx":10},"children":["td_run> Operator of Workflow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This workflow operator calls the existing Saved Query. Therefore, you need to do the same operation as in the case of Query Editor."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"td-operator-of-workflow","__idx":11},"children":["td> Operator of Workflow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For this workflow operator, you specify your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentication"]}," name for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_connection"]}," parameter as follows. Replace this parameter with the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentication"]}," for Data Tank 2.0 as well as any other parameters."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+export_task:\n  td>: queries/sample.sql\n  result_connection: data_tank # Authentication Name\n  result_settings:\n    database: datatank\n    table: ...\n    ...\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition, if DDL is required, you need to specify the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["set_role"]}," option as follows."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+export_task:\n  td>: queries/sample.sql\n  result_connection: <your_authentication_name>\n  result_settings:\n    database: aciddb\n    table: ...\n    schema: <schema_name>\n    set_role: _owner_aciddb_<schema_name>\n    ...\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you don't specify your Authentication for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_connection"]},", use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_url"]}," parameter instead of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_connection"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_settings"]}," as shown."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+export_task:\n  td>: queries/sample.sql\n  result_url: postgresql://tank_integration_user:xxx@......\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this case, modify the value for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_url"]}," parameter."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition, add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["set_role=_owner_aciddb_<schema_name>"]}," as a query parameter if a DDL statement is required."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cli-toolbelt-for-export","__idx":12},"children":["CLI (Toolbelt) for Export"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For CLI, you specify the information for export in URL format."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, you can export the result of the query to Data Tank by using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td query"]}," command as follows. As you specify the information for export to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-r"]}," option directly, specify the setting for Data Tank 2.0."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query -d kazzy_test -w -r \"postgresql://tank_integration_user:<password>@<ip_address>/datatank/<table_name>?mode=replace\" \"SELECT 1 AS col1;\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"connect-to-data-tank-via-pg-operator-of-workflow","__idx":13},"children":["Connect to Data Tank via pg> Operator of Workflow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can run any query statement in Data Tank from Workflow by using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pg>"]}," operator as shown in the following example."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"_export:\n  pg:\n    host: ....\n    port: 5432\n    database: datatank\n    user: tank_integration_user\n    schema: public\n\n+access_data_tank:\n  pg>: queries/sample.sql\n  ...\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You need to change the values set for the options of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pg>"]}," operator in order to run the query statements in Data Tank 2.0. If you use DDL, you need to add a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SET ROLE"]}," statement before the DDL statements."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"connect-to-data-tanks-via-third-party-tools","__idx":14},"children":["Connect to Data Tanks via Third-Party Tools"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To connect to your Data Tank via any third-party tool, you specify the connection information in the tool. Replace the connection information with that of Data Tank 2.0."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"references","__idx":15},"children":["References"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/about-data-tank-2-0"},"children":["About Data Tank 2.0"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/about-integrating-data-tank-2-0-with-plazma-db"},"children":["Integrating Data Tank 2.0 with Plazma DB"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/understanding-data-tank-2-0-maintenance"},"children":["Understanding Data Tank 2.0 Maintenance"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/managing-data-tank-2-0-with-the-management-ui"},"children":["Managing Data Tank 2.0 with the Management UI"]}]}]}]},"headings":[{"value":"Replacing Data Tank 1.0 with 2.0","id":"replacing-data-tank-10-with-20","depth":1},{"value":"Feature Differences between Data Tank and Data Tank 2.0","id":"feature-differences-between-data-tank-and-data-tank-20","depth":2},{"value":"Change Integration with Data Tank to that with Data Tank 2.0","id":"change-integration-with-data-tank-to-that-with-data-tank-20","depth":2},{"value":"Authentications for Data Tank","id":"authentications-for-data-tank","depth":2},{"value":"Authentications for Data Tank 2.0","id":"authentications-for-data-tank-20","depth":3},{"value":"Import from Data Tank","id":"import-from-data-tank","depth":3},{"value":"Sources","id":"sources","depth":3},{"value":"CLI (TD Toolbelt)","id":"cli-td-toolbelt","depth":3},{"value":"Export Result of Hive/Trino to Data Tank","id":"export-result-of-hivetrino-to-data-tank","depth":2},{"value":"Query Editor on Treasure Console","id":"query-editor-on-treasure-console","depth":3},{"value":"td_run> Operator of Workflow","id":"td_run-operator-of-workflow","depth":3},{"value":"td> Operator of Workflow","id":"td-operator-of-workflow","depth":3},{"value":"CLI (Toolbelt) for Export","id":"cli-toolbelt-for-export","depth":3},{"value":"Connect to Data Tank via pg> Operator of Workflow","id":"connect-to-data-tank-via-pg-operator-of-workflow","depth":2},{"value":"Connect to Data Tanks via Third-Party Tools","id":"connect-to-data-tanks-via-third-party-tools","depth":2},{"value":"References","id":"references","depth":2}],"frontmatter":{"seo":{"title":"Replacing Data Tank 1.0 with 2.0","description":"Guide to migrating from Treasure Data Data Tank to Data Tank 2.0, covering feature differences, integration changes, and authentication updates."}},"lastModified":"2026-06-01T09:09:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/control-panel/datatank/replacing-data-tank-1-0-with-2-0","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}