Skip to content
Last updated

Selecting a Database for a Job

Each job in Treasure Data has a database. There is a one-to-one correspondence between a job and a database.

  1. Open TD Console.

  2. Navigate to Jobs.

  3. Select a job and then select Details.

Permitting Access to Job Activities

You must have database permissions to display job activities. Be careful how to grant or revoke permissions. For example, if you don't want a user to see the results of a query job, do not grant permission to the Job's database to the user. However, if you only revoke permission to the database referenced by the query from the user, the user can still see the job results as long as the user has view permission for the job's database.

Selecting the Database of a Hive/Presto Job

Hive/Presto Job in TD Console

  1. Open TD Console.
  2. Navigate to Data Workbench > Queries.

  1. Select the database for the job.

The selected database is the default for the database of the query statement. When referring to tables under the selected database, you can omit the database name, such as '... FROM <table_name>...instead of '... FROM <database_name>.<table_name>...’.

Hive/Presto Job via Workflow

You can specify the job's database for the td>: operator when you run a Hive/Presto job via Workflow.

+run_query:
  td>:
  query: "SELECT * FROM sample_datasets.nasdaq LIMIT 1;"
  database: blog_test

Selecting the Database in a Bulk Load Job

In Bulk Load jobs, the database is the destination of an import.

Bulk Load Job in TD Console

  1. Open TD Console.
  2. Navigate to Integrations Hub > Sources.
  3. Select Data Placement.
  4. Select a database.

Bulk Load Job via Workflow

You can specify the job's database for the td_load>: operator when you run the Bulk Load job via Workflow.

+import_bulk_load:
  td_load>: config/import.yml
  database: blog_test
  table: dest_table