2025-02-17 - Activity Schema Enrichment Rules¶
Release¶
Get More Insights with Enhanced Activity Data!
We’re excited to announce a new feature that makes it even easier to analyze your activity data and gain valuable insights.
The Problem: While our new activity schema tiles and rules are great at collecting data, they weren’t always easy to use for reporting.
The Solution: We’ve introduced a new activity consume template that automatically adds a set of pre-calculated columns to your consume tile. These columns provide you with ready-to-use information, saving you time and effort.
Here’s what you get:
concept_first_seen: The first time a concept was seen in your data.
activity_first_seen: The first time an activity was seen.
activity_last_seen: The last time an activity was seen.
activity_occurrence: The number of times an activity occurred.
activity_repeated_at: The time intervals between activity occurrences.
value_increased: Indicates if the value increased during the activity.
value_decreased: Indicates if the value decreased during the activity.
value_change: The amount of change in value during the activity.
opening_balance: The value at the start of the activity.
closing_balance: The value at the end of the activity.
The Benefits:
Faster Insights: Get answers to your questions quickly with pre-calculated data.
Simplified Reporting: No need to write complex SQL queries.
Enhanced Analysis: Explore your data with a richer set of attributes.
How it Works:
We use our powerful Jinja templating system to automatically generate these columns, making complex SQL features accessible with a simple click.
Start exploring your activity data with these new insights today!
Magician Partner¶
- if(row_number() over (partition by driving_concept order by activity_timestamp asc)=1,true,false) as concept_first_seen,’,
‘if(row_number() over (partition by driving_concept,activity order by activity_timestamp asc)=1,true,false) as activity_first_seen,’, ‘if(row_number() over (partition by driving_concept,activity order by activity_timestamp desc)=1,true,false) as activity_last_seen,’, ‘row_number() over (partition by driving_concept,activity order by activity_timestamp asc) as activity_occurrence,’, ‘lead(activity_timestamp) over (partition by driving_concept,activity order by activity_timestamp asc) as activity_repeated_at,’, ‘if(coalesce(lag(revenue_impact) OVER (PARTITION BY driving_concept,activity ORDER BY activity_timestamp ASC),0) < revenue_impact,TRUE,FALSE) as value_increased,’, ‘if(lag(revenue_impact) OVER (PARTITION BY driving_concept,activity ORDER BY activity_timestamp ASC) > revenue_impact,TRUE,FALSE) as value_decreased,’, ‘revenue_impact - coalesce(lag(revenue_impact) OVER (PARTITION BY driving_concept,activity ORDER BY activity_timestamp ASC),0) as value_change,’, ‘coalesce(sum(coalesce(revenue_impact, 0)) over (partition by driving_concept,activity order by activity_timestamp rows between unbounded preceding and 1 preceding), 0) as opening_balance,’, ‘sum(coalesce(revenue_impact, 0)) over (partition by driving_concept,activity order by activity_timestamp) as closing_balance,’
Last Refreshed¶
Doc Refreshed: 2025-02-16