-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add com.mandrill/message_marked_as_spam/jsonschema/1-0-1 (closes #749)
- Loading branch information
Showing
3 changed files
with
153 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
{ | ||
"jsonpaths": [ | ||
|
||
"$.schema.vendor", | ||
"$.schema.name", | ||
"$.schema.format", | ||
"$.schema.version", | ||
|
||
"$.hierarchy.rootId", | ||
"$.hierarchy.rootTstamp", | ||
"$.hierarchy.refRoot", | ||
"$.hierarchy.refTree", | ||
"$.hierarchy.refParent", | ||
|
||
"$.data._id", | ||
"$.data.ts", | ||
"$.data.msg._id", | ||
"$.data.msg._version", | ||
"$.data.msg.clicks", | ||
"$.data.msg.email", | ||
"$.data.msg.metadata.user_id", | ||
"$.data.msg.opens", | ||
"$.data.msg.sender", | ||
"$.data.msg.state", | ||
"$.data.msg.subject", | ||
"$.data.msg.tags", | ||
"$.data.msg.ts" | ||
"jsonpaths": [ | ||
"$.schema.vendor", | ||
"$.schema.name", | ||
"$.schema.format", | ||
"$.schema.version", | ||
"$.hierarchy.rootId", | ||
"$.hierarchy.rootTstamp", | ||
"$.hierarchy.refRoot", | ||
"$.hierarchy.refTree", | ||
"$.hierarchy.refParent", | ||
"$.data._id", | ||
"$.data.msg._id", | ||
"$.data.msg._version", | ||
"$.data.msg.clicks", | ||
"$.data.msg.email", | ||
"$.data.msg.metadata.user_id", | ||
"$.data.msg.opens", | ||
"$.data.msg.sender", | ||
"$.data.msg.state", | ||
"$.data.msg.subject", | ||
"$.data.msg.tags", | ||
"$.data.msg.ts", | ||
"$.data.ts", | ||
"$.data.msg.subaccount" | ||
] | ||
} |
97 changes: 97 additions & 0 deletions
97
schemas/com.mandrill/message_marked_as_spam/jsonschema/1-0-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,97 @@ | ||
{ | ||
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", | ||
"description": "Schema for a Mandrill message marked as spam event", | ||
"self": { | ||
"vendor": "com.mandrill", | ||
"name": "message_marked_as_spam", | ||
"format": "jsonschema", | ||
"version": "1-0-1" | ||
}, | ||
|
||
"type": "object", | ||
"properties": { | ||
"_id": { | ||
"type": "string" | ||
}, | ||
"msg": { | ||
"type": "object", | ||
"properties": { | ||
"_id": { | ||
"type": "string" | ||
}, | ||
"_version": { | ||
"type": "string" | ||
}, | ||
"clicks": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"ts": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"url": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": true | ||
} | ||
}, | ||
"email": { | ||
"type": "string" | ||
}, | ||
"metadata": { | ||
"type": "object", | ||
"properties": { | ||
"user_id": { | ||
"type": "number" | ||
} | ||
}, | ||
"additionalProperties": true | ||
}, | ||
"opens": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"ts": { | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
}, | ||
"additionalProperties": true | ||
} | ||
}, | ||
"sender": { | ||
"type": "string" | ||
}, | ||
"state": { | ||
"type": "string" | ||
}, | ||
"subaccount": { | ||
"type": ["string", "null"] | ||
}, | ||
"subject": { | ||
"type": "string" | ||
}, | ||
"tags": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"ts": { | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"ts": { | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} |
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,49 +1,37 @@ | ||
-- Copyright (c) 2014 Snowplow Analytics Ltd. All rights reserved. | ||
-- | ||
-- This program is licensed to you under the Apache License Version 2.0, | ||
-- and you may not use this file except in compliance with the Apache License Version 2.0. | ||
-- You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, | ||
-- software distributed under the Apache License Version 2.0 is distributed on an | ||
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
-- | ||
-- Authors: Joshua Beemster | ||
-- Copyright: Copyright (c) 2014 Snowplow Analytics Ltd | ||
-- License: Apache License Version 2.0 | ||
-- | ||
-- Compatibility: iglu:com.mandrill/message_marked_as_spam/jsonschema/1-0-0 | ||
-- AUTO-GENERATED BY igluctl DO NOT EDIT | ||
-- Generator: igluctl 0.4.0 | ||
-- Generated: 2018-04-06 09:11 UTC | ||
|
||
CREATE TABLE atomic.com_mandrill_message_marked_as_spam_1 ( | ||
-- Schema of this type | ||
schema_vendor varchar(128) encode runlength not null, | ||
schema_name varchar(128) encode runlength not null, | ||
schema_format varchar(128) encode runlength not null, | ||
schema_version varchar(128) encode runlength not null, | ||
-- Parentage of this type | ||
root_id char(36) encode raw not null, | ||
root_tstamp timestamp encode raw not null, | ||
ref_root varchar(255) encode runlength not null, | ||
ref_tree varchar(1500) encode runlength not null, | ||
ref_parent varchar(255) encode runlength not null, | ||
-- Properties of this type | ||
_id varchar(255) encode raw, | ||
ts timestamp encode raw, | ||
"msg._id" varchar(255) encode raw, | ||
"msg._version" varchar(255) encode raw, | ||
"msg.clicks" varchar(2048) encode runlength, -- Holds a JSON array | ||
"msg.email" varchar(255) encode raw, | ||
"msg.metadata.user_id" varchar(255) encode raw, | ||
"msg.opens" varchar(2048) encode runlength, -- Holds a JSON array | ||
"msg.sender" varchar(255) encode raw, | ||
"msg.state" varchar(255) encode raw, | ||
"msg.subject" varchar(255) encode raw, | ||
"msg.tags" varchar(2048) encode runlength, -- Holds a JSON array | ||
"msg.ts" timestamp encode raw, | ||
FOREIGN KEY(root_id) REFERENCES atomic.events(event_id) | ||
CREATE SCHEMA IF NOT EXISTS atomic; | ||
|
||
CREATE TABLE IF NOT EXISTS atomic.com_mandrill_message_marked_as_spam_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, | ||
"_id" VARCHAR(4096) ENCODE ZSTD, | ||
"msg._id" VARCHAR(4096) ENCODE ZSTD, | ||
"msg._version" VARCHAR(4096) ENCODE ZSTD, | ||
"msg.clicks" VARCHAR(5000) ENCODE ZSTD, | ||
"msg.email" VARCHAR(4096) ENCODE ZSTD, | ||
"msg.metadata.user_id" DOUBLE PRECISION ENCODE RAW, | ||
"msg.opens" VARCHAR(5000) ENCODE ZSTD, | ||
"msg.sender" VARCHAR(4096) ENCODE ZSTD, | ||
"msg.state" VARCHAR(4096) ENCODE ZSTD, | ||
"msg.subject" VARCHAR(4096) ENCODE ZSTD, | ||
"msg.tags" VARCHAR(5000) ENCODE ZSTD, | ||
"msg.ts" TIMESTAMP ENCODE ZSTD, | ||
"ts" TIMESTAMP ENCODE ZSTD, | ||
"msg.subaccount" VARCHAR(4096) ENCODE ZSTD, | ||
FOREIGN KEY (root_id) REFERENCES atomic.events(event_id) | ||
) | ||
DISTSTYLE KEY | ||
-- Optimized join to atomic.events | ||
DISTKEY (root_id) | ||
SORTKEY (root_tstamp); | ||
|
||
COMMENT ON TABLE atomic.com_mandrill_message_marked_as_spam_1 IS 'iglu:com.mandrill/message_marked_as_spam/jsonschema/1-0-1'; |