Model MotherDuck data with AI
Define the grain, keys and relationships behind a reporting model. Verify a few source records and calculations before sharing a view with analysts.
To model MotherDuck data with AI, give motherduck-model-data a reporting question and the tables behind it. Suppose the team wants sales by product category. Joining one order total to three order lines can turn a perfectly good sale into three times its actual value. The first design decision is what one row represents.
The workflow checks keys and joins against that grain. It can separate transactions from descriptive attributes and identify a choice about history: if a product changes category, should an earlier sale use the old category or the current one? Validate a small set of known orders before giving other analysts the resulting table or view.
What it does
- Define what a row in the analytical model represents.
- Identify join keys and expected relationships.
- Separate events from descriptive attributes.
- Check the effect of missing or repeated keys.
- Validate measures against familiar source records.
Install and use
- Install the skill in a compatible agent. A supplied schema can support planning; live inspection or schema changes need the relevant MotherDuck access.
- Ask “Model sales by category from orders and order lines. Check that the join does not repeat an order total.”
- Review the definition and a few known examples before creating or exposing the final model.
FAQ
Source
Made by MotherDuck. Original skill: motherduck-model-data, published on GitHub under the MIT licence.
View on GitHub