Skip to content

Commit

Permalink
Add com.snowplowanalytics.snowplow/gdpr/jsonschema/1-0-0 (closes #965)
Browse files Browse the repository at this point in the history
  • Loading branch information
colmsnowplow authored and alexanderdean committed Jun 29, 2019
1 parent c525943 commit 8a66b4d
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
17 changes: 17 additions & 0 deletions jsonpaths/com.snowplowanalytics.snowplow/gdpr_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"jsonpaths": [
"$.schema.vendor",
"$.schema.name",
"$.schema.format",
"$.schema.version",
"$.hierarchy.rootId",
"$.hierarchy.rootTstamp",
"$.hierarchy.refRoot",
"$.hierarchy.refTree",
"$.hierarchy.refParent",
"$.data.basisForProcessing",
"$.data.documentDescription",
"$.data.documentId",
"$.data.documentVersion"
]
}
35 changes: 35 additions & 0 deletions schemas/com.snowplowanalytics.snowplow/gdpr/jsonschema/1-0-0
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for a web page context",
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "gdpr",
"format": "jsonschema",
"version": "1-0-0"
},

"type": "object",
"properties": {
"basisForProcessing": {
"enum": ["consent", "contract", "legal_obligation", "vital_interests", "public_task", "legitimate_interests"],
"description": "GDPR basis for data collection & processing"
},
"documentId": {
"type": ["string", "null"],
"maxLength": 255,
"description": "ID for document detailing basis for processing"
},
"documentVersion": {
"type": ["string", "null"],
"maxLength": 16,
"description": "Version of document detailing basis for processing"
},
"documentDescription": {
"type": ["string", "null"],
"maxLength": 4096,
"description": "Description of document detailing basis for processing"
}
},
"required": ["basisForProcessing"],
"additionalProperties": false
}
27 changes: 27 additions & 0 deletions sql/com.snowplowanalytics.snowplow/gdpr_1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- AUTO-GENERATED BY igluctl DO NOT EDIT
-- Generator: igluctl 0.6.0
-- Generated: 2019-06-27 09:51 UTC

CREATE SCHEMA IF NOT EXISTS atomic;

CREATE TABLE IF NOT EXISTS atomic.com_snowplowanalytics_snowplow_gdpr_1 (
"schema_vendor" VARCHAR(128) ENCODE ZSTD NOT NULL,
"schema_name" VARCHAR(128) ENCODE ZSTD NOT NULL,
"schema_format" VARCHAR(128) ENCODE ZSTD NOT NULL,
"schema_version" VARCHAR(128) ENCODE ZSTD NOT NULL,
"root_id" CHAR(36) ENCODE RAW NOT NULL,
"root_tstamp" TIMESTAMP ENCODE ZSTD NOT NULL,
"ref_root" VARCHAR(255) ENCODE ZSTD NOT NULL,
"ref_tree" VARCHAR(1500) ENCODE ZSTD NOT NULL,
"ref_parent" VARCHAR(255) ENCODE ZSTD NOT NULL,
"basis_for_processing" VARCHAR(20) ENCODE ZSTD NOT NULL,
"document_description" VARCHAR(4096) ENCODE ZSTD,
"document_id" VARCHAR(255) ENCODE ZSTD,
"document_version" VARCHAR(16) ENCODE ZSTD,
FOREIGN KEY (root_id) REFERENCES atomic.events(event_id)
)
DISTSTYLE KEY
DISTKEY (root_id)
SORTKEY (root_tstamp);

COMMENT ON TABLE atomic.com_snowplowanalytics_snowplow_gdpr_1 IS 'iglu:com.snowplowanalytics.snowplow/gdpr/jsonschema/1-0-0';

0 comments on commit 8a66b4d

Please sign in to comment.