Skip to content

Commit

Permalink
Merge pull request #105 from snowplow/release/mobile/snowflake/1.1.0
Browse files Browse the repository at this point in the history
Release/mobile/snowflake/1.1.0
  • Loading branch information
bill-warner authored Jun 16, 2021
2 parents ead84ed + 2859a42 commit a0e2f32
Show file tree
Hide file tree
Showing 34 changed files with 54 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@
],
"meta": {
"versions": {
"test_suite_version": "1.0.3",
"test_suite_version": "1.0.4",
"bigquery_model_version": "1.1.0",
"snowflake_model_version": "1.0.0"
"snowflake_model_version": "1.1.0"
},
"great_expectations.__version__": "0.12.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
],
"meta": {
"versions": {
"test_suite_version": "1.0.3",
"test_suite_version": "1.0.4",
"redshift_model_version": "1.1.0"
},
"great_expectations.__version__": "0.12.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@
],
"meta": {
"versions": {
"test_suite_version": "1.0.3",
"test_suite_version": "1.0.4",
"redshift_model_version": "1.1.0",
"bigquery_model_version": "1.1.0",
"snowflake_model_version": "1.0.0"
"snowflake_model_version": "1.1.0"
},
"great_expectations.__version__": "0.12.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
],
"meta": {
"versions": {
"test_suite_version": "1.0.3",
"test_suite_version": "1.0.4",
"redshift_model_version": "1.1.0",
"bigquery_model_version": "1.1.0",
"snowflake_model_version": "1.0.0"
"snowflake_model_version": "1.1.0"
},
"great_expectations.__version__": "0.12.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@
],
"meta": {
"versions": {
"test_suite_version": "1.0.3",
"test_suite_version": "1.0.4",
"redshift_model_version": "1.1.0",
"bigquery_model_version": "1.1.0",
"snowflake_model_version": "1.0.0"
"snowflake_model_version": "1.1.0"
},
"great_expectations.__version__": "0.12.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@
],
"meta": {
"versions": {
"test_suite_version": "1.0.3",
"test_suite_version": "1.0.4",
"redshift_model_version": "1.1.0",
"bigquery_model_version": "1.1.0",
"snowflake_model_version": "1.0.0"
"snowflake_model_version": "1.1.0"
},
"great_expectations.__version__": "0.12.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@
"meta": {
"great_expectations.__version__": "0.12.0",
"versions": {
"test_suite_version": "1.0.3",
"test_suite_version": "1.0.4",
"redshift_model_version": "1.1.0",
"bigquery_model_version": "1.1.0",
"snowflake_model_version": "1.0.0"
"snowflake_model_version": "1.1.0"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@
],
"meta": {
"versions": {
"test_suite_version": "1.0.3",
"test_suite_version": "1.0.4",
"redshift_model_version": "1.1.0",
"bigquery_model_version": "1.1.0",
"snowflake_model_version": "1.0.0"
"snowflake_model_version": "1.1.0"
},
"great_expectations.__version__": "0.12.0"
}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Snowflake Mobile Version 1.1.0 (2021-06-16)
---------------------------------------
Snowflake Mobile: Update update_manifest to throw error message (Close #104)
Snowflake Mobile: Update commit_table procedure to throw error messages (Close #103)
Snowflake Mobile: Fix column order in events_this_run to allow for events_staged table migration (Close #102)

BigQuery Mobile Version 1.1.0 (2021-06-15)
---------------------------------------
BigQuery Mobile: Add mobile_staging_reconcilition to temp tables validation config (Close #100)
Expand Down
6 changes: 6 additions & 0 deletions mobile/v1/snowflake/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 1.1.0 (2021-06-16)
--------------------------
Snowflake Mobile: Update update_manifest to throw error message (Close #104)
Snowflake Mobile: Update commit_table procedure to throw error messages (Close #103)
Snowflake Mobile: Fix column order in events_this_run to allow for events_staged table migration (Close #102)

Version 1.0.0 (2021-05-06)
--------------------------
Add Snowflake mobile model v1 (Close #85)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:scratch_schema: scratch
:entropy: ""
:steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:input_schema: atomic
:scratch_schema: scratch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:username:
:password:
:variables:
:model_version: snowflake/mobile/1.0.0
:model_version: snowflake/mobile/1.1.0
:model: mobile
:scratch_schema: scratch
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ CREATE OR REPLACE PROCEDURE {{.output_schema}}.update_manifest(MODULE VARCHAR)
dmls = [users_manifest_delete, users_manifest_insert, users_manifest_truncate];
}
else {
return "No manifest updated. Pass either 'base' or 'users' to update the manifests within that module";
throw "No manifest updated. Pass either 'base' or 'users' to update the manifests within that module";
}

snowflake.createStatement({sqlText: `BEGIN;`}).execute();
Expand Down Expand Up @@ -257,10 +257,10 @@ CREATE OR REPLACE PROCEDURE {{.output_schema}}.commit_table(SOURCE_SCHEMA VARCHA
[missing_in_source, missing_in_target, columns_to_add] = cols_checker_array.getColumnValue(1);

if (missing_in_source > 0) {
return "ERROR: Source table is missing column(s) which exist in target table."
throw "ERROR: Source table is missing column(s) which exist in target table.";
}
else if (missing_in_target > 0 && !AUTOMIGRATE) {
return "ERROR: Target table is missing column(s), but automigrate is disabled."
throw "ERROR: Target table is missing column(s), but automigrate is disabled.";
}
else if (missing_in_target > 0 && AUTOMIGRATE) {
/* Alter table if AUTOMIGRATE enabled */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ AS (
)

SELECT
{{if eq .model "mobile"}} ROW_NUMBER() OVER(PARTITION BY d.session_id ORDER BY d.derived_tstamp) AS event_index_in_session, {{end}}
d.*
{{if eq .model "mobile"}} , ROW_NUMBER() OVER(PARTITION BY d.session_id ORDER BY d.derived_tstamp) AS event_index_in_session {{end}}


FROM
deduped_events d
Expand Down

0 comments on commit a0e2f32

Please sign in to comment.