Skip to content

Commit

Permalink
Add com.mandrill/message_opened/jsonschema/1-0-1 (closes #750)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFradet committed Apr 6, 2018
1 parent 46891b5 commit 29471ec
Show file tree
Hide file tree
Showing 3 changed files with 238 additions and 0 deletions.
1 change: 1 addition & 0 deletions jsonpaths/com.mandrill/message_opened_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"$.data.msg.resends",
"$.data.msg.smtp_events",
"$.data.msg.template",
"$.data.msg.subaccount",
"$.data.user_agent_parsed.mobile",
"$.data.user_agent_parsed.os_company_url",
"$.data.user_agent_parsed.os_company",
Expand Down
236 changes: 236 additions & 0 deletions schemas/com.mandrill/message_opened/jsonschema/1-0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for a Mandrill message opened event",
"self": {
"vendor": "com.mandrill",
"name": "message_opened",
"format": "jsonschema",
"version": "1-0-1"
},

"type": "object",
"properties": {
"_id": {
"type": "string"
},
"ip": {
"type": "string"
},
"location": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"country_short": {
"type": "string"
},
"country": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"postal_code": {
"type": "string"
},
"region": {
"type": "string"
},
"timezone": {
"type": "string"
}
},
"additionalProperties": false
},
"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"
},
"ip": {
"type": "string"
},
"location": {
"type": "string"
},
"ua": {
"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"
},
"ip": {
"type": "string"
},
"location": {
"type": ["string", "null"]
},
"ua": {
"type": "string"
}
},
"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"
},
"resends": {
"type": "array"
},
"smtp_events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ts": {
"type": "string",
"format": "date-time"
},
"type": {
"type": "string"
},
"diag": {
"type": "string"
},
"source_ip": {
"type": "string"
},
"destination_ip": {
"type": "string"
},
"size": {
"type": "integer"
}
},
"additionalProperties": true
}
},
"template": {
"type": ["string", "null"]
}
},
"additionalProperties": false
},
"ts": {
"type": "string",
"format": "date-time"
},
"user_agent_parsed": {
"type": "object",
"properties": {
"mobile": {
"type": "boolean"
},
"os_company_url": {
"type": ["string", "null"]
},
"os_company": {
"type": ["string", "null"]
},
"os_family": {
"type": ["string", "null"]
},
"os_icon": {
"type": ["string", "null"]
},
"os_name": {
"type": ["string", "null"]
},
"os_url": {
"type": ["string", "null"]
},
"type": {
"type": ["string", "null"]
},
"ua_company_url": {
"type": ["string", "null"]
},
"ua_company": {
"type": ["string", "null"]
},
"ua_family": {
"type": ["string", "null"]
},
"ua_icon": {
"type": ["string", "null"]
},
"ua_name": {
"type": ["string", "null"]
},
"ua_url": {
"type": ["string", "null"]
},
"ua_version": {
"type": ["string", "null"]
}
},
"additionalProperties": false
},
"user_agent": {
"type": "string"
}
},
"additionalProperties": false
}
1 change: 1 addition & 0 deletions sql/com.mandrill/message_opened_1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ CREATE TABLE atomic.com_mandrill_message_opened_1 (
"msg.resends" varchar(5000) encode runlength, -- Holds a JSON array
"msg.smtp_events" varchar(5000) encode runlength, -- Holds a JSON array
"msg.template" varchar(255) encode raw,
"msg.subaccount" varchar(255) encode raw,
"user_agent_parsed.mobile" varchar(255) encode raw,
"user_agent_parsed.os_company_url" varchar(255) encode raw,
"user_agent_parsed.os_company" varchar(255) encode raw,
Expand Down

0 comments on commit 29471ec

Please sign in to comment.