Skip to content

Job Commands

Manage and execute Treasure Data jobs (queries).

Commands

bash
tdx jobs                              # List jobs
tdx job list                          # Same as jobs

List 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 --json

Show Job Details

bash
# Show job details
tdx job show <job-id>

# Show as JSON
tdx job show <job-id> --json

Submit 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> --tsv

Kill a Job

bash
# Kill a job (with confirmation)
tdx job kill <job-id>

# Skip confirmation prompt
tdx job kill <job-id> --yes

Job Command Options

OptionDescriptionDefault
--job-type <type>Job type (trino or hive)trino
-f, --file <path>Read query from file-
--database <name>Database nameinformation_schema
--status <status>Filter by status (for jobs list)-
--limit <number>Maximum jobs to list40

Status Values

StatusDescription
queuedJob is waiting to run
runningJob is currently executing
successJob completed successfully
errorJob failed with an error