Replies: 7 comments 5 replies
-
|
Some thoughts -
|
Beta Was this translation helpful? Give feedback.
-
Table structureThe definition JSON field represents the cohorts enums. For example, a cohort defined as: Will be written as a map to the DB Why write it like this? It makes matching enums a lookup in a map and lets us append the jsonlogic to an existing context or amend it after evaluation in contexts without jsonlogic. API Design
|
Beta Was this translation helpful? Give feedback.
-
|
Our discussion so far: Cohorts can be a type of dimension, and stored as a dimension with a column to differentiate between a cohort dimension and regular dimension. The cohort dimensions will have the following:
The evaluation happens as follows, taking an example: Assume the application is querying with the context -> user_id == 'a'
Some questions still left
|
Beta Was this translation helpful? Give feedback.
-
|
After some more discussion on point 1:
the following concept was reached - Cohorts consist of two kinds:
Hypothesis - A dimension never depends on another dimension, it always depends on a cohort (local or remote). A dependency implies membership in a cohort - a dimension A depending on another dimension B means that dimension B is a cohort. Example - There are relationships between entities in a data model that show us that they have a STRONG DEPENDENCY which means the dependency dimension is a cohort or should be modeled as such. If the relationship is a weak dependency, the choice is up to the user. Action items:
|
Beta Was this translation helpful? Give feedback.
-
|
JSONSchema value for the dimensions: clientId client_group UI default for schema: backend verifies if all the values mentioned in the |
Beta Was this translation helpful? Give feedback.
-
|
dimension type ADT: columns needed for this in DB:
columns to remove:
dimension type in API to probably go ahead with externally tagged ser-de |
Beta Was this translation helpful? Give feedback.
-
|
Further additional discussions around cohort dimensions: The core problem revolves around managing cohort definitions and associations, particularly concerning data duplication, maintenance overhead, and inconsistencies when relationships change. The current implementation often requires recording both a cohort and its "based on" dimension, leading to several issues:
Solutions and Their Pros and Cons
Final Action Items |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem statement
Superposition has moved towards strict equality in contexts to support completely unambiguous resolution while performing operations. This removes the operator flexibility that was earlier available in constructing context expressions. This flexibility allowed users to construct context expressions like
dimension1 in ['val1' , 'va2']. As mentioned earlier, this flexibility causes ambiguous resolution behaviour as Superposition does not yet assign priority to operators (it does only for dimensions).So the problem statement at hand is how to bring back this feature while retaining the unambiguous resolution semantics.
Proposed Solution
To solve this problem, we introduce a concept called Cohort Dimensions. Cohort Dimensions are dimensions which are derived out of existing dimensions (we will refer to the existing dimensions as Primary Dimensions going forward.). Cohort dimensions have the following characteristics:
Technical implementation
Beta Was this translation helpful? Give feedback.
All reactions