Query product events
Agent Skills for Altertable
npx -y skills add altertable-ai/skills --skill query-product-eventsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Queries and analyzes Altertable product events and identities. Use for event counts, properties, user activity, identity traits, behavioral trends, or validating incoming instrumentation.
SKILL.md
4.4 KB, as published. Nobody here has run it
Query Product Events
Use this skill with the Altertable MCP server.
Quick Start
- Call
initializebefore any other Altertable MCP tool. - Use
list_catalogs, then inspect theproduct_analyticscatalog withget_catalog. Do not assume schemas, views, or columns. - Choose the identity-resolved event view for user-level analysis and the raw ingestion table only when inspecting payload delivery.
- Validate SQL with
validate_sql, then execute it withquery_lakehouse. - State the time range, environment, identity semantics, and any data-quality limitations with the result.
Read the canonical Product Analytics overview and query guide for the current data model and supported analysis paths.
When to Use This Skill
- Counting or listing tracked product events
- Inspecting event properties or recent user activity
- Joining events to resolved identities or traits
- Investigating whether new instrumentation is arriving
- Analyzing product behavior with SQL
- Comparing event activity across time, environment, plan, or another dimension
Use instrument-product-analytics when the task changes application code or sends new events. Prefer:
analyze-funnelsfor ordered conversion and drop-offanalyze-web-trafficfor pageviews, sessions, referrers, UTM, device, or countrybuild-segmentsfor defining or comparing cohortsquery-lakehousefor generic or cross-catalog SQL
Query Workflow
1. Establish Context
Call initialize first. Confirm the organization and environment before inspecting data.
Clarify:
- the event or behavior being measured
- the requested time range and timezone
- whether the metric counts events, sessions, or distinct people
- which environment is in scope
- whether anonymous and aliased identities should be resolved
2. Discover the Current Schema
Use list_catalogs and get_catalog to discover the actual product_analytics schemas, tables, views, columns, and semantic definitions.
Do not copy a table path from an old query without checking it. Product Analytics commonly exposes both raw ingestion data and identity-resolved analytical views; choose based on the question rather than convenience.
When a field is stored in event properties, inspect its observed shape before casting or aggregating it.
3. Build a Bounded Query
- Fully qualify tables as
catalog.schema.table. - Add an explicit time filter.
- Use
LIMITwhile inspecting rows or property shapes. - Use deterministic
ORDER BYwhen results may be paginated. - Define whether counts are raw events or distinct resolved users.
- Guard casts and ratios against malformed values, nulls, and division by zero.
Validate with validate_sql. Use explain_sql before a complex or expensive query, then run query_lakehouse.
4. Check the Result
Before drawing a conclusion:
- compare the result with total volume or a nearby time range
- check null and unknown identity rates when analyzing users
- look for duplicated retries or abrupt ingestion gaps
- distinguish missing events from genuine zero activity
- mention incomplete recent data if ingestion may still be processing
When validating new instrumentation, confirm the event name, environment, expected properties, and identity context. Do not expose a user's sensitive properties in the response.
5. Present the Answer
Report:
- the metric and unit
- exact time range and timezone
- event-count versus distinct-user semantics
- filters and environment
- important data-quality caveats
Offer SQL or a rendered insight when useful, but do not save an insight unless the user asks.
Common Pitfalls
- Querying before
initialize - Assuming a table or column name instead of inspecting the catalog
- Mixing raw and identity-resolved events in one metric
- Treating event count as user count
- Omitting the time range or environment
- Casting arbitrary property values without checking their shape
- Interpreting an ingestion outage as a behavioral drop
- Returning sensitive traits or event properties unnecessarily