Workflow Commands
Manage Treasure Data workflows powered by Digdag.
Alias: tdx wf is an alias for tdx workflow
Commands
bash
tdx wf projects [pattern] # List projects
tdx wf project list [pattern] # Same as projects
tdx wf workflows [project] # List workflows
tdx wf sessions [project] # List sessions
tdx wf session list [project] # Same as sessions
tdx wf attempts [project] # List attempts
tdx wf attempt list [project] # Same as attemptsList Projects and Workflows
bash
# List all workflow projects
tdx wf projects
# Filter projects by pattern
tdx wf projects "cdp_segment_*"
# List all workflows
tdx wf workflows
# List workflows for specific project
tdx wf workflows myproject
# Filter workflows by project pattern
tdx wf workflows "lda*"Sessions and Attempts
bash
# List all workflow sessions
tdx wf sessions
# List sessions for specific project
tdx wf sessions myproject
# List sessions for specific workflow
tdx wf sessions myproject.daily_etl
# Filter sessions by status
tdx wf sessions --status error
tdx wf sessions --status running
# Filter sessions by time range
tdx wf sessions --from "2025-01-01" --to "2025-01-31"
# List all attempts
tdx wf attempts
# List attempts including retried
tdx wf attempts --include-retriedAttempt Management
The attempt command provides subcommands for managing workflow attempts:
bash
tdx wf attempt <attempt-id> [action] [args...]Show Attempt Details
bash
# Show specific attempt details
tdx wf attempt 67890View Tasks
bash
# Show tasks for an attempt
tdx wf attempt 67890 tasks
# Show tasks including subtasks
tdx wf attempt 67890 tasks --include-subtasksView Logs
bash
# View logs with interactive task selector
tdx wf attempt 67890 logs
# View logs for a specific task
tdx wf attempt 67890 logs +step1
# List available log files as JSON
tdx wf attempt 67890 logs --jsonWhen no task name is provided, an interactive selector will display available tasks with their log file sizes.
Kill Attempt
bash
# Kill a running attempt (with confirmation)
tdx wf attempt 67890 kill
# Kill with reason and skip confirmation
tdx wf attempt 67890 kill --reason "manual stop" -yRetry Attempt
bash
# Retry attempt
tdx wf attempt 67890 retry
# Retry attempt from specific task
tdx wf attempt 67890 retry --resume-from +step2
# Retry with parameter override
tdx wf attempt 67890 retry --params '{"key":"value"}'
# Force retry without confirmation
tdx wf attempt 67890 retry --force -yRun Workflow
Start a new workflow run (attempt) directly from the command line.
bash
# Start a workflow run
tdx wf run myproject.myworkflow
# Start with parameters
tdx wf run myproject.myworkflow --param key1=value1 --param key2=123
# Start with multiple parameters
tdx wf run myproject.myworkflow --param env=production --param date=2025-01-15 --param count=100
# Start with custom session time
tdx wf run myproject.myworkflow --session-time "2025-01-15T10:00:00Z"
# Combine parameters and session time
tdx wf run myproject.myworkflow --param env=staging --session-time "2025-01-15T00:00:00+09:00"Run Options
| Option | Description |
|---|---|
--param <key=value> | Workflow parameter (repeatable) |
--session-time <time> | Session time in ISO 8601 format (default: now) |
Parameter Type Detection
Parameter values are automatically parsed:
- Numbers:
--param count=100→{"count": 100} - Booleans:
--param enabled=true→{"enabled": true} - Strings:
--param name=hello→{"name": "hello"} - JSON:
--param config={"a":1}→{"config": {"a": 1}}
Session Retry
To retry a session (as opposed to a specific attempt), use the retry command with the session: prefix:
bash
# Retry entire session
tdx wf retry session:12345
# Retry session from specific task
tdx wf retry session:12345 --from-task +step2
# Retry with parameter override
tdx wf retry session:12345 --params '{"key":"value"}'
# Retry with params from file
tdx wf retry session:12345 --params @params.jsonProject Management
Download Project
bash
# Download workflow project
tdx wf download myproject
# Download to specific directory
tdx wf download myproject ./workflows
# Download specific revision
tdx wf download myproject --revision v1.0.0Push Project
bash
# Push workflow project (digdag-style)
cd myproject
tdx wf push myproject
# Push with custom revision
tdx wf push myproject --revision v1.0.0
# Push from parent directory with path
tdx wf push ./myproject
# Push with --name override
tdx wf push myproject --name production_workflow
# Push without validation
tdx wf push myproject --skip-validationDelete Project
bash
# Delete workflow project (with confirmation)
tdx wf delete myproject
# Delete by project ID
tdx wf delete 12345
# Delete without confirmation
tdx wf delete myproject -yCommand Options
Sessions Options
| Option | Description |
|---|---|
--status <status> | Filter by status (running, success, error, blocked, all) |
--from <timestamp> | Start time filter (ISO 8601) |
--to <timestamp> | End time filter (ISO 8601) |
Attempts Options
| Option | Description |
|---|---|
--include-retried | Include retried attempts |
Attempt Options
| Option | Description |
|---|---|
--include-subtasks | Include subtasks in tasks output |
--reason <text> | Reason for killing the attempt |
--resume-from <task> | Resume from specific task (retry) |
--params <json> | Override parameters for retry (JSON or @file.json) |
--force | Force retry even if not failed |
-y, --yes | Skip confirmation prompt |
Session Retry Options
| Option | Description |
|---|---|
--from-task <task> | Resume from specific task |
--params <json> | Override parameters (JSON or @file.json) |
Push Options
| Option | Description |
|---|---|
--name <name> | Project name (default: directory name) |
--revision <revision> | Revision name (default: timestamp) |
--skip-validation | Skip validation of .dig files |