Agent skill
trino-cli
Trino CLI for TD interactive queries. Covers connection to regional endpoints, batch mode (--execute, --file), output formats (CSV, JSON, TSV), and session properties.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/trino-cli
SKILL.md
Trino CLI for Treasure Data
Installation
curl -o trino https://repo1.maven.org/maven2/io/trino/trino-cli/477/trino-cli-477-executable.jar
chmod +x trino
sudo mv trino /usr/local/bin/
Requires Java 11+.
Connection
export TD_API_KEY="your_api_key"
trino \
--server https://api-presto.treasuredata.com \
--catalog td \
--user $TD_API_KEY \
--schema your_database
Regional Endpoints:
- US:
https://api-presto.treasuredata.com - Tokyo:
https://api-presto.treasuredata.co.jp - EU:
https://api-presto.eu01.treasuredata.com
Batch Mode
# Single query
trino --server ... --execute "SELECT COUNT(*) FROM events"
# From file
trino --server ... --file queries.sql
# From stdin
echo "SELECT * FROM events LIMIT 10" | trino --server ...
Output Formats
# CSV for spreadsheets
--output-format CSV_HEADER > results.csv
# JSON for programmatic use
--output-format JSON > results.json
# TSV for data processing
--output-format TSV_HEADER > results.tsv
# Markdown for docs
--output-format MARKDOWN
Available: CSV, CSV_HEADER, CSV_UNQUOTED, TSV, TSV_HEADER, JSON, MARKDOWN, NULL
Interactive Commands
| Command | Description |
|---|---|
USE schema |
Switch database |
SHOW SCHEMAS |
List databases |
SHOW TABLES |
List tables |
DESCRIBE table |
Show structure |
EXPLAIN query |
Show plan |
Configuration File
# ~/.trino_config
server=https://api-presto.treasuredata.com
catalog=td
user=$TD_API_KEY
schema=sample_datasets
Session Properties
trino \
--session query_max_run_time=1h \
--session query_priority=2 \
--execute "SELECT ..."
Common Options
| Option | Description |
|---|---|
--execute "SQL" |
Run query and exit |
--file queries.sql |
Run from file |
--output-format |
Output format |
--client-request-timeout 30m |
Query timeout |
--ignore-errors |
Continue on error |
--no-progress |
Disable progress |
Resources
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
riot-games
Manage Riot Games account, track stats across League, Valorant, and more
parcel
Provides comprehensive guidance for Parcel bundler including zero-configuration setup, asset handling, hot module replacement, and production builds. Use when the user asks about Parcel, needs to set up a build tool quickly, or work with Parcel's automatic configuration.
bbs
Manage issues with The Fold's CAS-native BBS (Bulletin Board System). Use for creating, updating, searching, and tracking issues. Invoke when the user wants to create tickets, find work, check issue status, or manage dependencies.
jito-bundles-and-priority-fees
Master Jito bundles for MEV protection and priority fee optimization on Solana - bundle submission, tip strategies, and transaction landing. Use for trading bots, high-priority transactions, and MEV-aware applications.
observability-monitoring-monitor-setup
You are a monitoring and observability expert specializing in implementing comprehensive monitoring solutions. Set up metrics collection, distributed tracing, log aggregation, and create insightful da
makefile-review
Didn't find tool you were looking for?