-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description - Fixes a bug whereby all relationships operating on columns using min/max aggregations, would not select the correct field. - Some other house keeping things including: - Replaces the `stream(i)` macro for generating an alias name with the constants `appended()` and `primary()` for clarity and simplicity. - The `appended()` and `primary()` macros should now be used directly in the `additional_join_condition` arg to an activity.
- Loading branch information
1 parent
b8e4ec8
commit eb5f6bf
Showing
36 changed files
with
255 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
integration_tests/models/last_in_between/dataset__last_in_between_3.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{ | ||
dbt_activity_schema.dataset( | ||
ref("input__last_in_between"), | ||
dbt_activity_schema.activity(dbt_activity_schema.all_ever(), "visit page"), | ||
[ | ||
dbt_activity_schema.activity( | ||
dbt_activity_schema.last_in_between(), | ||
"bought something", | ||
["activity_id", "revenue_impact"] | ||
) | ||
] | ||
) | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 14 additions & 12 deletions
26
integration_tests/seeds/first_in_between/input__first_in_between.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
activity_id,ts,entity_uuid,activity,anonymous_entity_uuid,feature_json,revenue_impact,link,activity_occurrence,activity_repeated_at | ||
2,2022-01-01 22:10:11,1,visit page,,"{""type"": 1}",0,,1,2022-01-03 22:10:11 | ||
3,2022-01-02 22:10:11,1,signed up,,"{""type"": 1}",0,,1, | ||
4,2022-01-03 22:10:11,1,visit page,,"{""type"": 2}",0,,2,2022-01-04 22:10:11 | ||
5,2022-01-04 22:10:11,1,visit page,,"{""type"": 2}",0,,3,2022-01-06 22:10:11 | ||
6,2022-01-05 22:10:11,1,bought something,,"{""type"": 1}",100,,1, | ||
7,2022-01-06 22:10:11,1,visit page,,"{""type"": 1}",0,,4, | ||
8,2022-01-07 22:10:11,7,visit page,,"{""type"": 1}",0,,1,2022-01-09 22:10:11 | ||
9,2022-01-08 22:10:11,7,signed up,,"{""type"": 1}",0,,1, | ||
10,2022-01-09 22:10:11,7,visit page,,"{""type"": 2}",0,,2,2022-01-10 22:10:11 | ||
11,2022-01-10 22:10:11,7,visit page,,"{""type"": 2}",0,,3,2022-01-12 22:10:11 | ||
12,2022-01-11 22:10:11,7,bought something,,"{""type"": 1}",100,,1, | ||
13,2022-01-12 22:10:11,7,visit page,,"{""type"": 1}",0,,4, | ||
11,2022-01-01 22:10:11,1,visit page,,"{""type"": 1}",0,,1,2022-01-03 22:10:11 | ||
22,2022-01-02 22:10:11,1,signed up,,"{""type"": 1}",0,,1, | ||
33,2022-01-03 22:10:11,1,visit page,,"{""type"": 2}",0,,2,2022-01-04 22:10:11 | ||
44,2022-01-04 22:10:11,1,visit page,,"{""type"": 2}",0,,3,2022-01-06 22:10:11 | ||
55,2022-01-05 22:10:11,1,bought something,,"{""type"": 1}",100,,1,2022-01-05 22:10:12 | ||
66,2022-01-05 22:10:12,1,bought something,,"{""type"": 2}",99,,2, | ||
77,2022-01-06 22:10:11,1,visit page,,"{""type"": 1}",0,,4, | ||
88,2022-01-07 22:10:11,7,visit page,,"{""type"": 1}",0,,1,2022-01-09 22:10:11 | ||
99,2022-01-08 22:10:11,7,signed up,,"{""type"": 1}",0,,1, | ||
1010,2022-01-09 22:10:11,7,visit page,,"{""type"": 2}",0,,2,2022-01-10 22:10:11 | ||
1111,2022-01-10 22:10:11,7,visit page,,"{""type"": 2}",0,,3,2022-01-12 22:10:11 | ||
1212,2022-01-11 22:10:11,7,bought something,,"{""type"": 1}",100,,1,2022-01-11 22:10:12 | ||
1313,2022-01-11 22:10:12,7,bought something,,"{""type"": 2}",99,,2, | ||
1414,2022-01-12 22:10:11,7,visit page,,"{""type"": 1}",0,,4, |
6 changes: 3 additions & 3 deletions
6
integration_tests/seeds/first_in_between/output/output__first_in_between_1.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
activity_id,entity_uuid,ts,activity,anonymous_entity_uuid,feature_json,revenue_impact,link,activity_occurrence,activity_repeated_at,first_in_between_bought_something_feature_json,first_in_between_bought_something_ts | ||
3,1,2022-01-02 22:10:11,signed up,,"{""type"": 1}",0,,1,,"{""type"": 1}",2022-01-05 22:10:11 | ||
9,7,2022-01-08 22:10:11,signed up,,"{""type"": 1}",0,,1,,"{""type"": 1}",2022-01-11 22:10:11 | ||
activity_id,entity_uuid,ts,revenue_impact,first_in_between_bought_something_feature_json,first_in_between_bought_something_ts,first_in_between_bought_something_revenue_impact | ||
22,1,2022-01-02 22:10:11,0,"{""type"": 1}",2022-01-05 22:10:11,100.000000 | ||
99,7,2022-01-08 22:10:11,0,"{""type"": 1}",2022-01-11 22:10:11,100.000000 |
18 changes: 9 additions & 9 deletions
18
integration_tests/seeds/first_in_between/output/output__first_in_between_2.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
activity_id,entity_uuid,ts,activity,anonymous_entity_uuid,feature_json,revenue_impact,link,activity_occurrence,activity_repeated_at,first_in_between_bought_something_feature_json,first_in_between_bought_something_ts | ||
5,1,2022-01-04 22:10:11,visit page,,"{""type"": 2}",0,,3,2022-01-06 22:10:11,"{""type"": 1}",2022-01-05 22:10:11 | ||
11,7,2022-01-10 22:10:11,visit page,,"{""type"": 2}",0,,3,2022-01-12 22:10:11,"{""type"": 1}",2022-01-11 22:10:11 | ||
2,1,2022-01-01 22:10:11,visit page,,"{""type"": 1}",0,,1,2022-01-03 22:10:11,, | ||
4,1,2022-01-03 22:10:11,visit page,,"{""type"": 2}",0,,2,2022-01-04 22:10:11,, | ||
7,1,2022-01-06 22:10:11,visit page,,"{""type"": 1}",0,,4,,, | ||
8,7,2022-01-07 22:10:11,visit page,,"{""type"": 1}",0,,1,2022-01-09 22:10:11,, | ||
10,7,2022-01-09 22:10:11,visit page,,"{""type"": 2}",0,,2,2022-01-10 22:10:11,, | ||
13,7,2022-01-12 22:10:11,visit page,,"{""type"": 1}",0,,4,,, | ||
activity_id,entity_uuid,ts,revenue_impact,first_in_between_bought_something_feature_json,first_in_between_bought_something_ts,first_in_between_bought_something_revenue_impact | ||
11,1,2022-01-01 22:10:11,0,,, | ||
33,1,2022-01-03 22:10:11,0,,, | ||
44,1,2022-01-04 22:10:11,0,"{""type"": 1}",2022-01-05 22:10:11,100.000000 | ||
77,1,2022-01-06 22:10:11,0,,, | ||
88,7,2022-01-07 22:10:11,0,,, | ||
1010,7,2022-01-09 22:10:11,0,,, | ||
1111,7,2022-01-10 22:10:11,0,"{""type"": 1}",2022-01-11 22:10:11,100.000000 | ||
1414,7,2022-01-12 22:10:11,0,,, |
6 changes: 3 additions & 3 deletions
6
integration_tests/seeds/first_in_between/output/output__first_in_between_3.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
activity_id,entity_uuid,ts,revenue_impact,feature_json,first_in_between_visit_page_feature_json,first_in_between_visit_page_activity_occurrence,first_in_between_visit_page_ts,first_in_between_bought_something_activity_id,first_in_between_bought_something_ts | ||
3,1,2022-01-02 22:10:11,0,"{""type"": 1}","{""type"": 1}",4,2022-01-06 22:10:11,6,2022-01-05 22:10:11 | ||
9,7,2022-01-08 22:10:11,0,"{""type"": 1}","{""type"": 1}",4,2022-01-12 22:10:11,12,2022-01-11 22:10:11 | ||
activity_id,entity_uuid,ts,revenue_impact,feature_json,first_in_between_visit_page_feature_json,first_in_between_visit_page_activity_occurrence,first_in_between_visit_page_ts,first_in_between_bought_something_revenue_impact,first_in_between_bought_something_activity_id,first_in_between_bought_something_ts | ||
22,1,2022-01-02 22:10:11,0,"{""type"": 1}","{""type"": 1}",4.000000,2022-01-06 22:10:11,100.000000,55,2022-01-05 22:10:11 | ||
99,7,2022-01-08 22:10:11,0,"{""type"": 1}","{""type"": 1}",4.000000,2022-01-12 22:10:11,100.000000,1212,2022-01-11 22:10:11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
integration_tests/seeds/last_in_between/output/output__last_in_between_3.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
activity_id,entity_uuid,ts,revenue_impact,last_in_between_bought_something_activity_id,last_in_between_bought_something_revenue_impact | ||
2,1,2022-01-01 22:10:11,0,, | ||
4,1,2022-01-03 22:10:11,0,, | ||
5,1,2022-01-04 22:10:11,0,61,100.000000 | ||
7,1,2022-01-06 22:10:11,0,, | ||
8,7,2022-01-07 22:10:11,0,, | ||
10,7,2022-01-09 22:10:11,0,, | ||
11,7,2022-01-10 22:10:11,0,121,100.000000 | ||
13,7,2022-01-12 22:10:11,0,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.