query-altertable
/query-altertable
Inspects Altertable catalogs and runs controlled DuckDB SQL across managed and external data. Use for exact queries, raw results, schema inspection, federated joins, query validation, plans, or optimization.
- Author
- altertable-ai ↗
- Repository
- skills ↗
- Licence
- MIT
- Last repository change
- 20.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 20.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Inspects Altertable catalogs and runs controlled DuckDB SQL across managed and external data. Use for exact queries, raw results, schema inspection, federated joins, query validation, plans, or optimization.
Original author description
Inspects Altertable catalogs and runs controlled DuckDB SQL across managed and external data. Use for exact queries, raw results, schema inspection, federated joins, query validation, plans, or optimization.
How it works
- Inspect Before Querying
- Execute Deliberately
- Altertable-Specific SQL
SKILL.md preview
--- name: query-altertable compatibility: Requires Altertable MCP server description: "Inspects Altertable catalogs and runs controlled DuckDB SQL across managed and external data. Use for exact queries, raw results, schema inspection, federated joins, query validation, plans, or optimization." metadata: author: Altertable requires: "altertable-mcp" --- # Query the Lakehouse Altertable exposes managed tables and external sources through one governed DuckDB SQL layer. Use this skill when the caller needs direct control over the query or its evidence; use the `ask-altertable` skill for the faster conversational path. ## Inspect Before Querying 1. Call `list_catalogs` to identify the available managed and external catalogs. 2. Call `get_catalog` for candidate schemas and tables. Start with its automatic or overview detail, then request specific tables or columns. 3. Profile only selected tables when sampled null rates, cardinality, ranges, and frequent values will change the query. 4. Prefer verified semantic measures and dimensions when they express the requested business definition. Treat unverified definitions cautiously and do not use excluded models. Never infer a table or column from a plausible name. Fully qualify data as `catalog.schema.table` so environment defaults cannot redirect a query. ## Execute Deliberately 1. Write DuckDB SQL using only inspected identifiers. SELECT only the columns the question named. Do not project anything they did not ask for. 2. Always write `AS` before column and table aliases. DuckDB rejects a bare alias that is a keyword, and common names such as `cost`, `name`, `value`, `type`, `year`, `rows`, `first`, and `last` are keywords. 3. Cast every named parameter explicitly, as in `$member::VARCHAR` and `$org::VARCHAR`. DuckDB cannot always infer their types. Bind them through `query_lakehouse` `params`. 4. Parenthesize `->>` before `=`. `properties->>'x' = $org` is misparsed because `->>` binds next to `=`. Write `(properties->>'x') = $org::VARCHAR`. 5. Add explicit time bounds and a small `LIMIT` during exploration. 6. Use `validate_sql` when binding or syntax is uncertain. 7. Use `explain_sql` before a potentially expensive scan or join. 8. Run the statement with `query_lakehouse`. 9. If the result is truncated, repeat the same statement with the returned offset. Include a deterministic `ORDER BY` before paginating. Do not turn a read request into DDL or data modification. Mutating SQL requires explicit user intent and read-write access. ## Altertable-Specific SQL Altertable extends DuckDB with operators and catalog features for event streams, text retrieval, history, and storage layout: - `MATCH_RECOGNIZE` matches ordered row patterns for funnels, journeys, state transitions, and anomaly shapes. Partition by the entity, order deterministically, describe the pattern, and use `WITHIN` when the sequence has a conversion window. It is beta. - `SESSIONIZE` groups ordered rows when consecutive events are separated by more than an inactivity gap. It can preserve each event with session metadata or return one row per session with measures. It is beta. - Full-text search indexes free-form text with `TNVYX` and queries it with `@@`. Combine it with structured and time predicates to narrow logs, traces, tickets, documents, or event text. - Time travel reads full table state at a snapshot version or timestamp. Data change feeds return row-level inserts, updates, and deletions between bounds; committed transactions create the snapshots shared by both. - Views and macros store reusable query logic. Partitioning and sorted tables shape new writes; `OPTIMIZE TABLE` rewrites existing files to compact them and apply the current layout. Use `search_docs` when you need detailed syntax or semantics, especially for beta operators and persistent catalog changes. Federated SQL can join Altertable catalogs and external connections in one DuckDB statement. Fully qualify each relation and confirm join-key uniqueness before trusting row counts or aggregates.
Versions
The database has no other skills named query-altertable.
Database snapshot: 13.11.2026 · package version 72d54bff86c1 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100use-altertable
Provides Altertable's foundational operating model, environment and catalog concepts, DuckDB conventions, and MCP-versus-CLI choices. Use for platform orientation, setup, tool selection, or any Altertable workflow needing shared context. - 90query-with-chatgpt-data
Use when ChatGPT Work's @Data agent, the ChatGPT Data agent, or a Codex workflow coordinating with @Data needs Altertable as a governed read-only source. Do not use for ordinary Altertable analysis. - 95duckdb-en
DuckDB CLI specialist for SQL analysis, data processing and file conversion. Use for SQL queries, CSV/Parquet/JSON analysis, database queries, or data conversion. Triggers on "duckdb", "sql", "query", "data analysis", "parquet", "convert data". - 100flux-query
Optimize slow database queries — analyze execution plans, add indexes, rewrite queries. Use when asked about "slow query", "optimize SQL", "query performance", or "explain this query". - 100snowflake-query
Run SQL queries against Snowflake through the Managed MCP Server. Use for data retrieval, aggregations, joins, semi-structured data, time travel, and any explicit SQL the user requests. - 100malloy
Malloy is an open-source semantic modeling and query language that compiles to SQL and runs on DuckDB, BigQuery, Snowflake, PostgreSQL, MySQL, Trino, Presto and Databricks. Use when the user wants to write Malloy models, sources, views, joins or nested queries, run .malloy files…