{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Data Tank","product_name":"Data Tank","type":"markdown"},"seo":{"title":"Getting Started with Data Tank 2.0","description":"Learn how to set up Treasure Data Data Tank 2.0, including creating database users, schemas, access policies, and importing data.","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":"getting-started-with-data-tank-20","__idx":0},"children":["Getting Started with Data Tank 2.0"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initial-setup-of-data-tank-20","__idx":1},"children":["Initial Setup of Data Tank 2.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For Data Tank 2.0, settings can be self-managed in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/managing-data-tank-2-0-with-the-management-ui"},"children":["Management UI"]},", which is different from Data Tank where settings are configured by Treasure Data."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-database-users","__idx":2},"children":["Create Database Users"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data Tank 2.0 requires Access Keys to access the database, unlike Data Tank which provides default users (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tank_user"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tank_integration_user"]},"). You need to create Access Keys in the Management UI."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn more about ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/managing-data-tank-2-0-with-the-management-ui#managing-access-keys"},"children":["Managing Access Keys"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-schemas","__idx":3},"children":["Create Schemas"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Data Tank 2.0, you can create multiple user-defined schemas in the Management UI, unlike Data Tank which provides only one schema called ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["public"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn more about ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/managing-data-tank-2-0-with-the-management-ui#create-new-schema"},"children":["Creating a New Schema"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configure-access-policies","__idx":4},"children":["Configure Access Policies"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A database user (Access Key) cannot operate on objects in a schema until permission settings, called Access Policies, are applied. You can grant permissions to an Access Key for a specific schema in the Management UI."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn more about ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/managing-data-tank-2-0-with-the-management-ui#managing-access-policies"},"children":["Managing Access Policies"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"set-ip-whitelist","__idx":5},"children":["Set IP Whitelist"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data Tank 2.0 only allows access from specific IP addresses. Add your IP addresses to the IP Whitelist of Data Tank 2.0 in the Management UI."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["g:treasuredata-main"]}," is set by default and is an alias for the IP addresses used by each Treasure Data function (including the Management UI). Do not delete it, as doing so will make Data Tank 2.0 inaccessible."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn more about ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/managing-data-tank-2-0-with-the-management-ui#configure-ip-whitelist"},"children":["Configuring your IP Whitelist"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prepare-data-for-data-tank-20","__idx":6},"children":["Prepare Data for Data Tank 2.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["No data is stored when Data Tank 2.0 is initially provisioned. Prepare any necessary data for import."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"import-records-from-treasure-data-tables-to-data-tank-20","__idx":7},"children":["Import Records from Treasure Data Tables to Data Tank 2.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you want to use records stored in Treasure Data tables, use ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/postgresql-export-integration"},"children":["Result Export to PostgreSQL"]},". This feature exports the results of Hive/Presto queries to PostgreSQL."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"move-records-from-data-tank-to-data-tank-20","__idx":8},"children":["Move Records from Data Tank to Data Tank 2.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you want to move records stored in Data Tank to Data Tank 2.0, follow these steps:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Import your data from Data Tank into a Treasure Data table using ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/postgresql-import-integration"},"children":["Import from PostgreSQL"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Extract the imported records with a Hive/Presto query and export the results into Data Tank 2.0 with ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/postgresql-export-integration"},"children":["Result Export to PostgreSQL"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This must be done on a table-by-table basis."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-objects-in-data-tank-20","__idx":9},"children":["Create Objects in Data Tank 2.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Exporting results to PostgreSQL only exports records. If you need additional objects such as indexes, you need to create them separately. You can use third-party tools such as the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["psql"]}," client or pgAdmin."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"change-destination-of-integrations-to-data-tank-20","__idx":10},"children":["Change Destination of Integrations to Data Tank 2.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are several methods of integrating with Data Tank. If you replace Data Tank with Data Tank 2.0, you need to update the integrations to change the destination. Examples of such scenarios include:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Integrations importing from Data Tank"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Integrations exporting to Data Tank"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Running queries via the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pg>"]}," operator in Workflow"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Third-party tools integrated with Data Tank, such as Tableau"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn more about ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/control-panel/datatank/replacing-data-tank-1-0-with-2-0#change-integration-with-data-tank-to-that-with-data-tank-2.0"},"children":["changing integrations from Data Tank to Data Tank 2.0"]},"."]}]},"headings":[{"value":"Getting Started with Data Tank 2.0","id":"getting-started-with-data-tank-20","depth":1},{"value":"Initial Setup of Data Tank 2.0","id":"initial-setup-of-data-tank-20","depth":2},{"value":"Create Database Users","id":"create-database-users","depth":3},{"value":"Create Schemas","id":"create-schemas","depth":3},{"value":"Configure Access Policies","id":"configure-access-policies","depth":3},{"value":"Set IP Whitelist","id":"set-ip-whitelist","depth":3},{"value":"Prepare Data for Data Tank 2.0","id":"prepare-data-for-data-tank-20","depth":2},{"value":"Import Records from Treasure Data Tables to Data Tank 2.0","id":"import-records-from-treasure-data-tables-to-data-tank-20","depth":3},{"value":"Move Records from Data Tank to Data Tank 2.0","id":"move-records-from-data-tank-to-data-tank-20","depth":3},{"value":"Create Objects in Data Tank 2.0","id":"create-objects-in-data-tank-20","depth":3},{"value":"Change Destination of Integrations to Data Tank 2.0","id":"change-destination-of-integrations-to-data-tank-20","depth":2}],"frontmatter":{"seo":{"title":"Getting Started with Data Tank 2.0","description":"Learn how to set up Treasure Data Data Tank 2.0, including creating database users, schemas, access policies, and importing data."}},"lastModified":"2026-04-06T03:24:45.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/control-panel/datatank/getting-started-with-data-tank-2-0","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}