-
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.
Multiple Appended
nth_ever
Relationships (#38)
Fixes #37
- Loading branch information
1 parent
692a4e6
commit eb7f697
Showing
9 changed files
with
69 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{ | ||
dbt_activity_schema.dataset( | ||
ref("input__nth_ever"), | ||
dbt_activity_schema.activity( | ||
dbt_activity_schema.nth_ever(2), | ||
"visit page", | ||
["activity_occurrence"] | ||
), | ||
[ | ||
dbt_activity_schema.activity( | ||
dbt_activity_schema.nth_ever(3), | ||
"visit page", | ||
["activity_occurrence"] | ||
), | ||
dbt_activity_schema.activity( | ||
dbt_activity_schema.nth_ever(4), | ||
"visit page", | ||
["activity_occurrence"] | ||
), | ||
dbt_activity_schema.activity( | ||
dbt_activity_schema.nth_ever(5), | ||
"visit page", | ||
["activity_occurrence"] | ||
), | ||
] | ||
) | ||
}} |
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 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: dataset__nth_ever_1 | ||
|
||
description: A dataset model used to test basic functionality of the `nth_ever` relationship. | ||
tests: | ||
- dbt_utils.equality: | ||
compare_model: ref("output__nth_ever_1") |
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,17 @@ | ||
activity_id,ts,entity_uuid,activity,anonymous_entity_uuid,feature_json,revenue_impact,link,activity_occurrence,activity_repeated_at | ||
1,2022-01-01 22:10:11,1,visit page,,"{""type"": 1}",0,,1,2022-01-03 22:10:11 | ||
2,2022-01-02 22:10:11,1,signed up,,"{""type"": 1}",0,,1, | ||
3,2022-01-03 22:10:11,1,visit page,,"{""type"": 2}",0,,2,2022-01-04 22:10:14 | ||
4,2022-01-04 22:10:12,1,added to cart,,"{""type"": 4}",0,,1,2022-01-04 22:10:13 | ||
5,2022-01-04 22:10:13,1,added to cart,,"{""type"": 4}",0,,2, | ||
6,2022-01-04 22:10:14,1,visit page,,"{""type"": 2}",0,,3,2022-01-06 22:10:16 | ||
7,2022-01-05 22:10:15,1,bought something,,"{""type"": 1}",100,,1, | ||
8,2022-01-06 22:10:16,1,visit page,,"{""type"": 1}",0,,4, | ||
9,2022-01-07 22:10:11,7,visit page,,"{""type"": 1}",0,,1,2022-01-09 22:10:11 | ||
10,2022-01-08 22:10:11,7,signed up,,"{""type"": 1}",0,,1, | ||
11,2022-01-09 22:10:11,7,visit page,,"{""type"": 2}",0,,2,2022-01-10 22:10:14 | ||
12,2022-01-10 22:10:12,7,added to cart,,"{""type"": 4}",0,,1,2022-01-10 22:10:13 | ||
13,2022-01-10 22:10:13,7,added to cart,,"{""type"": 4}",0,,2, | ||
14,2022-01-10 22:10:14,7,visit page,,"{""type"": 2}",0,,3,2022-01-12 22:10:16 | ||
15,2022-01-11 22:10:15,7,bought something,,"{""type"": 1}",100,,1, | ||
16,2022-01-12 22:10:16,7,visit page,,"{""type"": 1}",0,,4, |
3 changes: 3 additions & 0 deletions
3
integration_tests/seeds/nth_ever/output/output__nth_ever_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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
activity_occurrence,nth_ever_3_visit_page_activity_occurrence,nth_ever_4_visit_page_activity_occurrence,nth_ever_5_visit_page_activity_occurrence | ||
2,3.000000,4.000000, | ||
2,3.000000,4.000000, |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "dbt-activity-schema" | ||
version = "0.4.0" | ||
version = "0.4.1" | ||
description = "A dbt package to create models within the Activity Schema data model framework." | ||
authors = ["Teghan Nightengale <[email protected]>", "Bryce Codell <[email protected]>"] | ||
license = "GNU" | ||
|