Skip to content

Warehouse ToolsΒΆ

project_scanΒΆ

Scan the entire data engineering environment in one call. Detects dbt projects, warehouse connections, Docker databases, installed tools, and configuration files. Used by the /discover command.

> /discover

# Environment Scan

## Git Repository
βœ“ Git repo on branch `main` (origin: github.com/org/analytics)

## dbt Project
βœ“ Project "analytics" (profile: snowflake_prod)
  Models: 47, Sources: 12, Tests: 89
  βœ“ packages.yml found

## Warehouse Connections

### Already Configured
Name            | Type      | Database
prod-snowflake  | snowflake | ANALYTICS

### From dbt profiles.yml
Name                  | Type      | Source
dbt_snowflake_dev     | snowflake | dbt-profile

### From Docker
Container      | Type     | Host:Port
local-postgres | postgres | localhost:5432

### From Environment Variables
Name          | Type     | Signal
env_bigquery  | bigquery | GOOGLE_APPLICATION_CREDENTIALS

## Installed Data Tools
βœ“ dbt v1.8.4
βœ“ sqlfluff v3.1.0
βœ— airflow (not found)

## Config Files
βœ“ .altimate-code/altimate-code.json
βœ“ .sqlfluff
βœ— .pre-commit-config.yaml (not found)

What it detectsΒΆ

Category Detection method
Git git commands (branch, remote)
dbt project Walks up directories for dbt_project.yml, reads name/profile
dbt manifest Parses target/manifest.json for model/source/test counts
dbt profiles Searches for profiles.yml: DBT_PROFILES_DIR env var β†’ project root β†’ <home>/.dbt/profiles.yml
Docker DBs Bridge call to discover running PostgreSQL/MySQL/MariaDB/MSSQL/Oracle/ClickHouse/Trino containers
Existing connections Bridge call to list already-configured warehouses
Environment variables Scans process.env for warehouse signals (see table below)
Schema cache Bridge call for indexed warehouse status
Data tools Spawns tool --version for 9 common tools
Config files Checks for .altimate-code/, .sqlfluff, .pre-commit-config.yaml

Environment variable detectionΒΆ

Warehouse Signal (any one triggers detection)
Snowflake SNOWFLAKE_ACCOUNT
BigQuery GOOGLE_APPLICATION_CREDENTIALS, BIGQUERY_PROJECT, GCP_PROJECT
Databricks DATABRICKS_HOST, DATABRICKS_SERVER_HOSTNAME
PostgreSQL PGHOST, PGDATABASE, DATABASE_URL
MySQL MYSQL_HOST, MYSQL_DATABASE
MongoDB MONGODB_URI, MONGO_URL
Redshift REDSHIFT_HOST
ClickHouse CLICKHOUSE_HOST, CLICKHOUSE_URL
Trino TRINO_HOST, TRINO_SERVER, TRINO_URL, DATABASE_URL

ParametersΒΆ

Parameter Type Description
skip_docker boolean Skip Docker container discovery (faster)
skip_tools boolean Skip installed tool detection (faster)

warehouse_listΒΆ

List all configured warehouse connections.

> warehouse_list

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Name            β”‚ Type      β”‚ Database   β”‚ Status      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ prod-snowflake  β”‚ snowflake β”‚ ANALYTICS  β”‚ configured  β”‚
β”‚ dev-duckdb      β”‚ duckdb    β”‚ dev.duckdb β”‚ configured  β”‚
β”‚ bigquery-prod   β”‚ bigquery  β”‚ my-project β”‚ configured  β”‚
β”‚ databricks-prod β”‚ databricksβ”‚ main       β”‚ configured  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

warehouse_testΒΆ

Test a warehouse connection.

> warehouse_test prod-snowflake

Testing connection to prod-snowflake (snowflake)...
  βœ“ Connected successfully
  Account: xy12345.us-east-1
  User: analytics_user
  Role: ANALYST_ROLE
  Warehouse: COMPUTE_WH
  Database: ANALYTICS
> warehouse_test bigquery-prod

Testing connection to bigquery-prod (bigquery)...
  βœ“ Connected successfully
  Project: my-gcp-project
  Dataset: analytics
  Auth: Service Account (svc-altimate@my-gcp-project.iam.gserviceaccount.com)

Connection troubleshootingΒΆ

Error Cause Fix
Authentication failed Wrong credentials Check password/token in config
Connection refused Network/firewall Verify host/port, check VPN
Object does not exist Wrong database/schema Verify database name in config
Role not authorized Insufficient privileges Use a role with USAGE on warehouse
Timeout Network latency Increase connection timeout

warehouse_addΒΆ

Add a new warehouse connection by providing a name and configuration.

> warehouse_add my-postgres {"type": "postgres", "host": "localhost", "port": 5432, "database": "analytics", "user": "analyst", "password": "secret"}

βœ“ Added warehouse 'my-postgres' (postgres)

warehouse_removeΒΆ

Remove an existing warehouse connection.

> warehouse_remove my-postgres

βœ“ Removed warehouse 'my-postgres'

warehouse_discoverΒΆ

Discover database containers running in Docker. Detects PostgreSQL, MySQL/MariaDB, SQL Server, Trino, and ClickHouse containers with their connection details.

> warehouse_discover

Container      | Type     | Host:Port       | User     | Database | Status
local-postgres | postgres | localhost:5432  | postgres | postgres | running
mysql-dev      | mysql    | localhost:3306  | root     | mydb     | running

Use warehouse_add to save any of these as a connection.