Comments (1)
Hey Gustav. Each activity only holds data specifically about that activity.
For example, a 'completed_order' event would have a total amount paid, but not necessarily the state it was purchased in.
To track the exact list of items purchased you could make a 'purchased_item' activity for each individual item in the order. That activity could have item sku, item name, item category (i.e. grocery).
It helps to also think about who is the customer for the activity stream too. In your case the customer could be a store instead of a person.
So the 'completed_order' event's 'customer' would be store_123. The store would have metadata saying its country / state. So from that you have all the pieces to put together the queries you mentioned.
Let me know if that makes sense!
from activityschema.
Related Issues (9)
- Example SQL Schema HOT 1
- Proposal: Add Support for `between_before` Temporal Join
- How to model v2 JSON in Redshift
- BigQuery supports clustered tables
- Proposal: rename `feature_json` to `attributes`
- [question] can we use this in traditional RDBMS? HOT 2
- Clarification to the activity_occurrence column HOT 1
- How to deal with changes in Customer identifier (email)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from activityschema.