Skip to content

inspect

tonic inspect reads database metadata from saved targets and uses the same target/context runtime as query execution.

Terminal window
tonic inspect catalogs --target warehouse
tonic inspect namespaces --target warehouse
tonic inspect tables --target warehouse
tonic inspect views --target warehouse
tonic inspect columns reports.daily_sales --target warehouse
tonic inspect view-definition reports.daily_sales_view --target warehouse
tonic inspect ddl reports.daily_sales --target warehouse --type table

Aliases:

  • catalogs: databases, dbs
  • namespaces: schemas
  • ddl --type database: catalog
  • ddl --type schema: namespace

Inspect commands accept repeated --context key=value flags.

Terminal window
tonic inspect tables \
--target warehouse \
--context catalog=ANALYTICS \
--context namespace=PUBLIC

Public inspect scope keys are catalog and namespace. Backend aliases such as database and schema are accepted where supported.

List commands support --format table|csv|json:

Terminal window
tonic inspect columns orders --target warehouse --format json

Definition commands support --format text|json:

Terminal window
tonic inspect view-definition orders_view --target warehouse --format text
tonic inspect ddl orders --target warehouse --type table --format json

Inspect metadata is cached persistently in a local SQLite database. The default TTL is seven days.

Use --refresh to bypass cache reads and rewrite the cache with live metadata:

Terminal window
tonic inspect tables --target warehouse --refresh

Cache read or write failures are non-fatal; tonic falls back to live metadata when needed.

Object references are unquoted dot paths:

  • name
  • namespace.name
  • catalog.namespace.name

Quoted identifiers such as "Mixed Case"."Table Name" are currently out of scope.