Table Commands
List, describe, and show table contents.
Commands
bash
tdx tables [pattern] # List tables
tdx table list [pattern] # Same as tablesPattern Syntax
All table commands use dot-separated patterns: (database).(table)
- Database wildcard:
"mydb.*"- all tables from mydb - Database.table:
mydb.users- specific table - Wildcards:
"*.users","prod_*.user*"- pattern matching - Catalog:
"td.mydb.users"- with catalog prefix
List Tables
bash
# List all tables from all databases
tdx tables
# List all tables from specific database
tdx tables "mydb.*"
# Filter tables with pattern
tdx tables "mydb.user_*"
# Database pattern with table
tdx tables "prod_*.access_log"
# Wildcard database and table
tdx tables "*.user*"Describe Table
Show table schema:
bash
# Using dot notation
tdx describe mydb.users
tdx desc mydb.users # aliasShow Table Contents
Display table data (SELECT * with limit):
bash
# Show first 40 rows (default)
tdx show mydb.users
# With custom limit
tdx show mydb.users --limit 10Using Session Context
Set a default database to avoid repeating it in every command:
bash
# Set session database
tdx use database mydb
# Now these commands use mydb automatically
tdx tables # Lists tables in mydb
tdx describe users
tdx show users --limit 10Examples
bash
# List tables in production databases
tdx tables "prod_*.*"
# Describe user tables across all databases
tdx tables "*.user*"
# Show sample data from specific table
tdx show mydb.users --limit 5 --json
# Export table schema
tdx describe mydb.users --json --output schema.json