Command-line Interface

The Treasure Data CLI allows you to create databases and tables, issue queries, view existing job results, and import/export data.

Table of Contents

Installation

Install the Treasure Data Toolbelt to set up your local workstation with td, the Treasure Data command-line client.

If you've followed the Quickstart Guide, you've already installed this.

If you are familiar with Ruby, you can install td from the command line using gem.

$ gem install td

Alternative installation options, including a Mac OSX installer and a Windows installer, can be found on the Treasure Data Toolbelt page.

Usage

Running td help:all shows the commands available in Treasure Data:

$ td help:all

  db:list             # Show list of tables in a database
  db:show <db>        # Describe a information of a database
  db:create <db>      # Create a database
  db:delete <db>      # Delete a database

  ....

If this article is incorrect or outdated, or omits critical information, please let us know. For all other issues, please see our support channels. Live chat with our staffs also work well.