Skip to content

Commit

Permalink
Merge pull request #132 from snowplow/release/web/redshift/1.3.0
Browse files Browse the repository at this point in the history
Release/web/redshift/1.3.0
  • Loading branch information
colmsnowplow authored Jun 7, 2022
2 parents eaeb04a + d0ce9ec commit d052d65
Show file tree
Hide file tree
Showing 34 changed files with 131 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
"meta": {
"versions": {
"test_suite_version": "1.1.1",
"redshift_model_version": "1.2.0"
"redshift_model_version": "1.3.0"
},
"great_expectations.__version__": "0.12.0"
}
Expand Down
2 changes: 1 addition & 1 deletion .test/great_expectations/expectations/web/v1/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"meta": {
"versions": {
"test_suite_version": "1.1.1",
"redshift_model_version": "1.2.0",
"redshift_model_version": "1.3.0",
"bigquery_model_version": "1.0.3",
"snowflake_model_version": "1.0.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"meta": {
"versions": {
"test_suite_version": "1.1.1",
"redshift_model_version": "1.2.0",
"redshift_model_version": "1.3.0",
"bigquery_model_version": "1.0.3",
"snowflake_model_version": "1.0.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"meta": {
"versions": {
"test_suite_version": "1.1.1",
"redshift_model_version": "1.2.0",
"redshift_model_version": "1.3.0",
"bigquery_model_version": "1.0.3",
"snowflake_model_version": "1.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion .test/great_expectations/expectations/web/v1/sessions.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"meta": {
"versions": {
"test_suite_version": "1.1.1",
"redshift_model_version": "1.2.0",
"redshift_model_version": "1.3.0",
"bigquery_model_version": "1.0.3",
"snowflake_model_version": "1.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion .test/great_expectations/expectations/web/v1/users.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"meta": {
"versions": {
"test_suite_version": "1.1.1",
"redshift_model_version": "1.2.0",
"redshift_model_version": "1.3.0",
"bigquery_model_version": "1.0.3",
"snowflake_model_version": "1.0.1"
},
Expand Down
53 changes: 29 additions & 24 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,42 +1,47 @@
Redshift Web Version 1.3.0 (2022-06-06)
--------------------------
Redshift web: Change SORTKEY encoding to RAW (#129) (thanks @mark-walle!)
Redshift Web: Fix column lengths in manifest tables (#131)

Snowflake Web Version 1.0.1 (2022-02-24)
---------------------------------------
Snowflake Web: Update column check stored procedure (Close #125)
Snowflake Web: Fix varchar length for pseudonymized fields (Close #122)
Snowflake Web: Remove start_date variable from users module (Close #123)
Snowflake Web: Update copyright notices (Close #124)
Snowflake Web: Fix logic in users_sessions_this_run to account for sparse data (Close #120)
Snowflake Web: Fix varchar length for yauaa columns (Close #97)
Snowflake Web: Fix se_label column length in events_staged (Close #109)
Snowflake Web: Update column check stored procedure (#125)
Snowflake Web: Fix varchar length for pseudonymized fields (#122)
Snowflake Web: Remove start_date variable from users module (#123)
Snowflake Web: Update copyright notices (#124)
Snowflake Web: Fix logic in users_sessions_this_run to account for sparse data (#120)
Snowflake Web: Fix varchar length for yauaa columns (#97)
Snowflake Web: Fix se_label column length in events_staged (#109)

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)
Snowflake Mobile: Update update_manifest to throw error message (#104)
Snowflake Mobile: Update commit_table procedure to throw error messages (#103)
Snowflake Mobile: Fix column order in events_this_run to allow for events_staged table migration (#102)

BigQuery Mobile Version 1.1.0 (2021-06-15)
---------------------------------------
BigQuery Mobile: Add mobile_staging_reconcilition to temp tables validation config (Close #100)
BigQuery Mobile: Fix column order in events_this_run to allow for events_staged table migration (Close #99)
BigQuery Mobile: Add mobile_staging_reconcilition to temp tables validation config (#100)
BigQuery Mobile: Fix column order in events_this_run to allow for events_staged table migration (#99)

Redshift Mobile Version 1.1.0 (2021-05-17)
---------------------------------------
Redshift Mobile: Increase session_id character limit in manifest (Close #93)
Redshift Mobile: Add simplified configs (Close #89)
Redshift Mobile: Set app errors module to disabled by default (Close #88)
Redshift Mobile: Add model_tstamp to derived tables (Close #82)
Redshift Mobile: Move app errors columns to end of table (Close #83)
Redshift Mobile: Remove CTE from user-aggs (Close #80)
Redshift Mobile: Increase session_id character limit in manifest (#93)
Redshift Mobile: Add simplified configs (#89)
Redshift Mobile: Set app errors module to disabled by default (#88)
Redshift Mobile: Add model_tstamp to derived tables (#82)
Redshift Mobile: Move app errors columns to end of table (#83)
Redshift Mobile: Remove CTE from user-aggs (#80)

Snowflake Mobile Version 1.0.0 (2021-05-06)
---------------------------------------
Add Snowflake mobile model v1 (Close #85)
Add Snowflake mobile model v1 (#85)

BigQuery Mobile Version 1.0.0 (2021-04-26)
---------------------------------------
Update licence (Close #79)
Fix credential loading in scripts (close #72)
Mobile: Add BigQuery mobile model v1 (close #73)
Update licence (#79)
Fix credential loading in scripts (#72)
Mobile: Add BigQuery mobile model v1 (#73)

Redshift Mobile Version 1.0.0 (2021-03-25)
---------------------------------------
Expand All @@ -51,8 +56,8 @@ Update Architecture diagram to match snowplow/snowplow (#62)

BigQuery Web Version 1.0.2 (2021-03-11)
---------------------------------------
BigQuery: Handle schema evolution in core contexts (close #52)
Update SQL Runner download link to point to Github releases (close #51)
BigQuery: Handle schema evolution in core contexts (#52)
Update SQL Runner download link to point to Github releases (#51)

BigQuery Web Version 1.0.1 (2021-02-24)
---------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions web/v1/redshift/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 1.3.0 (2022-06-06)
--------------------------
Redshift web: Change SORTKEY encoding to RAW (#129) (thanks @mark-walle!)
Redshift Web: Fix column lengths in manifest tables (#131)

Version 1.2.0 (2021-01-25)
---------------------------
Redshift: Add config (#12)
Expand Down
2 changes: 1 addition & 1 deletion web/v1/redshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Detail on configuring the users module's playbook can be found [in the relevant

## A note on duplicates

This version of the model (1.2.0) excludes duplicated event_ids and page_view_ids. Ideally in the future it will provide standard options for handling them, however because customisations of this model involve queries on federated atomic tables, the safest option for a first version is to exclude them.
This version of the model (>1.1.0) excludes duplicated event_ids and page_view_ids. Ideally in the future it will provide standard options for handling them, however because customisations of this model involve queries on federated atomic tables, the safest option for a first version is to exclude them.

If there is a need to handle duplicates, this can be done by adding a custom module to the base level of aggregation - take good care to manage the possibility of introducing duplicates downstream if doing so.

Expand Down
17 changes: 17 additions & 0 deletions web/v1/redshift/sql-runner/configs/migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"schema": "iglu:com.snowplowanalytics.datamodeling/config/jsonschema/1-0-0",
"data": {
"enabled": true,
"storage": "Default",
"playbooks": [
{
"playbook": "standard/99-migrations/1.3.0-migration",
"dependsOn": []
}
],
"lockType": "hard",
"owners": [
]
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:input_schema: atomic
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:input_schema: atomic
:scratch_schema: scratch
:output_schema: derived
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:password:
:ssl:
:variables:
:model_version: redshift/web/1.2.0
:model_version: redshift/web/1.3.0
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
:targets:
- :name:
:type: redshift
:host:
:database:
:port:
:username:
:password:
:ssl:
:variables:
:scratch_schema: scratch
:output_schema: derived
:entropy: ""
:steps:
- :name: 1.3.0-migration
:queries:
- :name: base-session-id-manifest
:file: standard/99-migrations/1.3.0-migration/base-session-id-manifest.sql
:template: true
- :name: 1.3.0-migration
:queries:
- :name: sessions-userid-manifest
:file: standard/99-migrations/1.3.0-migration/sessions-userid-manifest.sql
:template: true
- :name: 1.3.0-migration
:queries:
- :name: users-manifest
:file: standard/99-migrations/1.3.0-migration/users-manifest.sql
:template: true
- :name: 1.3.0-migration
:queries:
- :name: sortkey-encoding
:file: standard/99-migrations/1.3.0-migration/sortkey-encoding.sql
:template: true
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ INSERT INTO {{.output_schema}}.base_event_id_manifest{{.entropy}} (
);

CREATE TABLE IF NOT EXISTS {{.output_schema}}.base_session_id_manifest{{.entropy}} (
session_id VARCHAR(36),
session_id VARCHAR(128),
min_tstamp TIMESTAMP
)
DISTSTYLE KEY
Expand All @@ -117,7 +117,7 @@ SORTKEY (min_tstamp);

INSERT INTO {{.output_schema}}.base_session_id_manifest{{.entropy}} (
SELECT
'seed'::VARCHAR(36),
'seed'::VARCHAR(128),
'{{.start_date}}'::TIMESTAMP

WHERE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ CREATE TABLE IF NOT EXISTS {{.output_schema}}.page_views{{.entropy}} (
dvce_created_tstamp TIMESTAMP ENCODE ZSTD,
collector_tstamp TIMESTAMP ENCODE ZSTD,
derived_tstamp TIMESTAMP ENCODE ZSTD,
start_tstamp TIMESTAMP ENCODE ZSTD,
start_tstamp TIMESTAMP ENCODE RAW,
end_tstamp TIMESTAMP ENCODE ZSTD,

engaged_time_in_s INT ENCODE ZSTD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ CREATE TABLE IF NOT EXISTS {{.output_schema}}.sessions{{.entropy}} (
domain_sessionid VARCHAR(128) ENCODE ZSTD,
domain_sessionidx INT ENCODE ZSTD,

start_tstamp TIMESTAMP ENCODE ZSTD,
start_tstamp TIMESTAMP ENCODE RAW,
end_tstamp TIMESTAMP ENCODE ZSTD,

-- user fields
Expand Down Expand Up @@ -220,7 +220,7 @@ SORTKEY (start_tstamp);

-- Staged manifest table as input to users step
CREATE TABLE IF NOT EXISTS {{.scratch_schema}}.sessions_userid_manifest_staged{{.entropy}} (
domain_userid VARCHAR(36),
domain_userid VARCHAR(128),
start_tstamp TIMESTAMP
)
DISTSTYLE KEY
Expand Down
Loading

0 comments on commit d052d65

Please sign in to comment.