Save a model
Save a named set of numbers: where the data comes from, its date column, and how each number is calculated.
Sample data
Made-up data. If you have not loaded it yet, ask your assistant:
Load https://gotsimplified.com/samples/shop_orders.csv into my data lake as samples.shop_orders, replacing it if it already exists.
Download: shop_orders.csv
Try this
Save an analytics model named shop_orders from my table samples.shop_orders, keeping all columns. The date column is order_date. Measures: revenue is the sum of amount; units is the sum of units; orders is the count of order_id; buyers is the number of different customer_id; average_order is revenue divided by orders. Set a monthly revenue target of 7000 and mark revenue as the certified measure.
Add two checks to shop_orders: revenue is never below 0, and order_id has no duplicates. Also save a question named monthly_by_region that compares revenue by region.
Your assistant may word its answers differently each time; the numbers come from your tables.
Teach it your numbers
What is it?
A model is a note that says what each number means, such as 'revenue is all the amounts added up'.
How does it work?
You say which table, which column is the date, and how each number is worked out. After that, everyone gets the same answer.
Good to know
Check the formulas. Everything else builds on them.
Before you start
Load the shop sample files below into your data lake first.
Make it yours
Your assistant needs the real names. Replace the table and column names in the prompt above with yours. If you are not sure of them, ask first: "Describe my table called orders."
Then ask
Each question builds on the last answer. Ask follow-ups in plain words.
"Show me what the measures in shop_orders mean."