Bulk Import from PostgreSQL

This article explains how to dump data from PostgreSQL and import them into Treasure Data.

Table of Contents

Install Bulk Loader

First, install the toolbelt, which includes bulk loader program, on your computer.

Downloads

After the installation, the td command will be installed on your computer. Open up the terminal and type td to execute the command. Also, please make sure you have java as well. Run td import:jar_update to download the up-to-date version of our bulk loader:

$ td
usage: td [options] COMMAND [args]
$ java
Usage: java [-options] class [args...]
$ td import:jar_update
Installed td-import.jar 0.x.xx into /path/to/.td/java

Dump

Use copy to export a table from PostgreSQL to a CSV file as shown below:

COPY users TO '/tmp/data.csv' DELIMITER ','

For more information, please see the PostgreSQL documentation.

Bulk Import from CSV file

Refer to Bulk Import from CSV files to learn how to import CSV files.

For further details, please check the following pages:


Last modified: Feb 24 2017 09:27:52 UTC

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