Job Commands
Manage and execute Treasure Data jobs (queries).
Commands
bash
tdx jobs # List jobs
tdx job list # Same as jobsList Jobs
bash
# List jobs (default: 40 jobs)
tdx jobs
# List more jobs
tdx jobs --limit 100
# Filter by status
tdx jobs --status running
tdx jobs --status success
tdx jobs --status error
tdx jobs --status queued
# Combine filters
tdx jobs --status running --limit 50
# Output as JSON
tdx jobs --jsonShow Job Details
bash
# Show job details
tdx job show <job-id>
# Show as JSON
tdx job show <job-id> --jsonSubmit Jobs
bash
# Submit Trino query (default)
tdx job submit "SELECT * FROM mydb.table LIMIT 10"
# Submit with specific database
tdx job submit "SELECT * FROM table" --database mydb
# Submit Hive query from file
tdx job submit --job-type hive -f query.sql --database mydb
# Submit without specifying database
tdx job submit "SELECT 1"Get Job Results
bash
# Get job results (table format)
tdx job result <job-id>
# Get results as JSON
tdx job result <job-id> --json
# Save results to file
tdx job result <job-id> --output results.json
# Get results as TSV
tdx job result <job-id> --tsvKill a Job
bash
# Kill a job (with confirmation)
tdx job kill <job-id>
# Skip confirmation prompt
tdx job kill <job-id> --yesJob Command Options
| Option | Description | Default |
|---|---|---|
--job-type <type> | Job type (trino or hive) | trino |
-f, --file <path> | Read query from file | - |
--database <name> | Database name | information_schema |
--status <status> | Filter by status (for jobs list) | - |
--limit <number> | Maximum jobs to list | 40 |
Status Values
| Status | Description |
|---|---|
queued | Job is waiting to run |
running | Job is currently executing |
success | Job completed successfully |
error | Job failed with an error |