Explore Data
Quick Start
To explore available data:
- Call
initialize before any other Altertable MCP tool
- Use
list_catalogs to see available Altertable databases and external catalogs
- Use
get_catalog for schemas, tables, columns, semantic measures, and dimensions
- Narrow
get_catalog with schemas or tables when a catalog is large
When to Use This Skill
- User asks "what data do I have?"
- User wants to understand table structure
- Before writing queries to understand available columns
- When onboarding a new data source
- User asks about available catalogs, connections, or databases
- User needs to find semantic models, measures, dimensions, or table descriptions
Core Workflow
Step 1: Initialize Context
Call initialize first. It returns the current organization, environment, and relevant knowledge-entry context. Do not inspect or query data before initialization.
Step 2: List Available Catalogs
Call list_catalogs. Each entry includes:
catalog_name to pass into get_catalog
- display name and engine
- optional description
Catalogs can be Altertable-managed databases or external data sources such as Snowflake, BigQuery, Redshift, Postgres, MySQL, MariaDB, object-storage tables, and product analytics.
Step 3: Get Catalog Schema
Call get_catalog for the catalog of interest:
- Schemas and tables
- Column names, data types, and nullability
- Semantic endorsement labels (
draft, verified, excluded)
- Semantic dimensions, measures, and relations when available
- Note the catalog and schema names for query qualification (
catalog.schema.table)
Use level: overview for broad discovery, level: columns for table shape, and level: full for semantic details. For wide catalogs, pass specific schemas or tables.
Step 4: Explore Semantic Models
Semantic model details are included in get_catalog. Use them to discover pre-defined business logic:
- Dimensions (categorical attributes for grouping)
- Measures (aggregations like count, sum, average)
- Relations (join paths between sources)
Connection Types
Data Warehouses
| Engine |
Description |
| Snowflake |
Cloud data warehouse with catalogs and schemas |
| BigQuery |
Google's serverless data warehouse |
| Redshift |
AWS data warehouse |
Databases
| Engine |
Description |
| PostgreSQL |
Open-source relational database |
| MySQL / MariaDB |
Popular relational databases |
| Clickhouse |
Column-oriented OLAP database |
Built-in Catalogs
| Name |
Purpose |
product_analytics |
Product events, identities, web sessions, and pageviews when Product Analytics is enabled |
opentelemetry |
Logs and traces when OpenTelemetry is enabled |
| User-created catalogs |
Managed lakehouse tables and connected external sources |
Understanding Schemas
Table Qualification
Tables are referenced using three-part names:
catalog.schema.table
Example:
SELECT * FROM my_warehouse.public.users LIMIT 10
Column Data Types
Common types across engines:
VARCHAR, TEXT, STRING - Text data
INTEGER, BIGINT, INT64 - Whole numbers
FLOAT, DOUBLE, NUMERIC - Decimal numbers
BOOLEAN - True/false values
TIMESTAMP, DATETIME - Date and time
DATE - Date only
JSON, VARIANT - Semi-structured data
Product Analytics Semantic Sources
The product_analytics catalog can include pre-defined semantic sources:
| Source |
Description |
events |
Product analytics events with properties |
identities |
User identity information |
pageviews |
Web page view events |
sessions |
Web session aggregations |
identity-overrides |
Identity resolution rules |
Common Patterns
Discovering Table Purpose
Look for clues in:
- Table names (e.g.,
users, orders, events)
- Column names (e.g.,
created_at, user_id, amount)
- Data types (timestamps indicate time-series data)
Identifying Primary Keys
Look for columns named:
id, uuid, pk
{table_name}_id (e.g., user_id in users table)
Finding Relationships
Look for foreign key patterns:
{other_table}_id columns
- Matching column names across tables
- Semantic model relations
Common Pitfalls
- Assuming table names without checking the schema first
- Forgetting to qualify tables with catalog.schema
- Missing that some tables may be views or materialized views
- Querying tables marked
excluded from the semantic model
- Not checking semantic measures and dimensions that may already define the metrics needed
Reference Files
- Connection types detail
- Schema patterns
1---2name: explore-data3description: Inspects catalogs, schemas, tables, columns, semantic models, measures, and dimensions. Use to find what data exists or a table's columns. Reads metadata, runs no query.4---56# Explore Data78## Quick Start910To explore available data:111. Call `initialize` before any other Altertable MCP tool122. Use `list_catalogs` to see available Altertable databases and external catalogs133. Use `get_catalog` for schemas, tables, columns, semantic measures, and dimensions144. Narrow `get_catalog` with `schemas` or `tables` when a catalog is large1516## When to Use This Skill1718- User asks "what data do I have?"19- User wants to understand table structure20- Before writing queries to understand available columns21- When onboarding a new data source22- User asks about available catalogs, connections, or databases23- User needs to find semantic models, measures, dimensions, or table descriptions2425## Core Workflow2627### Step 1: Initialize Context2829Call `initialize` first. It returns the current organization, environment, and relevant knowledge-entry context. Do not inspect or query data before initialization.3031### Step 2: List Available Catalogs3233Call `list_catalogs`. Each entry includes:3435- `catalog_name` to pass into `get_catalog`36- display name and engine37- optional description3839Catalogs can be Altertable-managed databases or external data sources such as Snowflake, BigQuery, Redshift, Postgres, MySQL, MariaDB, object-storage tables, and product analytics.4041### Step 3: Get Catalog Schema4243Call `get_catalog` for the catalog of interest:4445- Schemas and tables46- Column names, data types, and nullability47- Semantic endorsement labels (`draft`, `verified`, `excluded`)48- Semantic dimensions, measures, and relations when available49- Note the catalog and schema names for query qualification (`catalog.schema.table`)5051Use `level: overview` for broad discovery, `level: columns` for table shape, and `level: full` for semantic details. For wide catalogs, pass specific `schemas` or `tables`.5253### Step 4: Explore Semantic Models5455Semantic model details are included in `get_catalog`. Use them to discover pre-defined business logic:5657- Dimensions (categorical attributes for grouping)58- Measures (aggregations like count, sum, average)59- Relations (join paths between sources)6061## Connection Types6263### Data Warehouses6465| Engine | Description |66|--------|-------------|67| Snowflake | Cloud data warehouse with catalogs and schemas |68| BigQuery | Google's serverless data warehouse |69| Redshift | AWS data warehouse |7071### Databases7273| Engine | Description |74|--------|-------------|75| PostgreSQL | Open-source relational database |76| MySQL / MariaDB | Popular relational databases |77| Clickhouse | Column-oriented OLAP database |7879### Built-in Catalogs8081| Name | Purpose |82|------|---------|83| `product_analytics` | Product events, identities, web sessions, and pageviews when Product Analytics is enabled |84| `opentelemetry` | Logs and traces when OpenTelemetry is enabled |85| User-created catalogs | Managed lakehouse tables and connected external sources |8687## Understanding Schemas8889### Table Qualification9091Tables are referenced using three-part names:92```93catalog.schema.table94```9596Example:97```sql98SELECT * FROM my_warehouse.public.users LIMIT 1099```100101### Column Data Types102103Common types across engines:104- `VARCHAR`, `TEXT`, `STRING` - Text data105- `INTEGER`, `BIGINT`, `INT64` - Whole numbers106- `FLOAT`, `DOUBLE`, `NUMERIC` - Decimal numbers107- `BOOLEAN` - True/false values108- `TIMESTAMP`, `DATETIME` - Date and time109- `DATE` - Date only110- `JSON`, `VARIANT` - Semi-structured data111112## Product Analytics Semantic Sources113114The `product_analytics` catalog can include pre-defined semantic sources:115116| Source | Description |117|--------|-------------|118| `events` | Product analytics events with properties |119| `identities` | User identity information |120| `pageviews` | Web page view events |121| `sessions` | Web session aggregations |122| `identity-overrides` | Identity resolution rules |123124## Common Patterns125126### Discovering Table Purpose127128Look for clues in:129- Table names (e.g., `users`, `orders`, `events`)130- Column names (e.g., `created_at`, `user_id`, `amount`)131- Data types (timestamps indicate time-series data)132133### Identifying Primary Keys134135Look for columns named:136- `id`, `uuid`, `pk`137- `{table_name}_id` (e.g., `user_id` in `users` table)138139### Finding Relationships140141Look for foreign key patterns:142- `{other_table}_id` columns143- Matching column names across tables144- Semantic model relations145146## Common Pitfalls147148- Assuming table names without checking the schema first149- Forgetting to qualify tables with catalog.schema150- Missing that some tables may be views or materialized views151- Querying tables marked `excluded` from the semantic model152- Not checking semantic measures and dimensions that may already define the metrics needed153154## Reference Files155156- [Connection types detail](references/connection-types.md)157- [Schema patterns](references/schema-patterns.md)