|
| 1 | +{ |
| 2 | + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", |
| 3 | + "description": "Message with batch metadata, passed from Shredder to Loader", |
| 4 | + "self": { |
| 5 | + "vendor": "com.snowplowanalytics.snowplow.storage", |
| 6 | + "name": "shredding_complete", |
| 7 | + "format": "jsonschema", |
| 8 | + "version": "2-0-1" |
| 9 | + }, |
| 10 | + "type": "object", |
| 11 | + "properties": { |
| 12 | + "base": { |
| 13 | + "description": "Blob storage path to the root of the batch", |
| 14 | + "type": "string", |
| 15 | + "format": "uri", |
| 16 | + "maxLength": 1024 |
| 17 | + }, |
| 18 | + "compression": { |
| 19 | + "description": "File compression type", |
| 20 | + "enum": ["GZIP", "NONE"] |
| 21 | + }, |
| 22 | + "typesInfo": { |
| 23 | + "description": "Info about schemas used in events and output formats in the respective batch", |
| 24 | + "type": "object", |
| 25 | + "oneOf": [ |
| 26 | + { |
| 27 | + "properties": { |
| 28 | + "transformation": { |
| 29 | + "description": "Type of the transformation", |
| 30 | + "enum": ["SHREDDED"] |
| 31 | + }, |
| 32 | + "types": { |
| 33 | + "description": "Set of Iglu URIs and the format they were shredded into", |
| 34 | + "type": "array", |
| 35 | + "items": { |
| 36 | + "properties": { |
| 37 | + "schemaKey": { |
| 38 | + "description": "Iglu URI", |
| 39 | + "type": "string", |
| 40 | + "maxLength": 256 |
| 41 | + }, |
| 42 | + "format": { |
| 43 | + "description": "File format into which the entities were shredded", |
| 44 | + "enum": ["TSV", "JSON"] |
| 45 | + }, |
| 46 | + "snowplowEntity": { |
| 47 | + "description": "Type of the self-describing JSONs in the event", |
| 48 | + "enum": ["SELF_DESCRIBING_EVENT", "CONTEXT"] |
| 49 | + } |
| 50 | + }, |
| 51 | + "required": ["schemaKey", "format", "snowplowEntity"], |
| 52 | + "additionalProperties": false |
| 53 | + } |
| 54 | + } |
| 55 | + }, |
| 56 | + "required": ["transformation", "types"], |
| 57 | + "additionalProperties": false |
| 58 | + }, |
| 59 | + { |
| 60 | + "properties": { |
| 61 | + "transformation": { |
| 62 | + "description": "Type of the transformation", |
| 63 | + "enum": ["WIDEROW"] |
| 64 | + }, |
| 65 | + "fileFormat": { |
| 66 | + "description": "Output file format", |
| 67 | + "enum": ["JSON", "PARQUET"] |
| 68 | + }, |
| 69 | + "types": { |
| 70 | + "description": "Set of Iglu URIs and the format they were shredded into", |
| 71 | + "type": "array", |
| 72 | + "items": { |
| 73 | + "properties": { |
| 74 | + "schemaKey": { |
| 75 | + "description": "Iglu URI", |
| 76 | + "type": "string", |
| 77 | + "maxLength": 256 |
| 78 | + }, |
| 79 | + "snowplowEntity": { |
| 80 | + "description": "Type of the self-describing JSONs in the event", |
| 81 | + "enum": ["SELF_DESCRIBING_EVENT", "CONTEXT"] |
| 82 | + } |
| 83 | + }, |
| 84 | + "required": ["schemaKey", "snowplowEntity"], |
| 85 | + "additionalProperties": false |
| 86 | + } |
| 87 | + } |
| 88 | + }, |
| 89 | + "required": ["transformation", "fileFormat", "types"], |
| 90 | + "additionalProperties": false |
| 91 | + } |
| 92 | + ] |
| 93 | + }, |
| 94 | + "timestamps": { |
| 95 | + "description": "Set of timestampts associated with the batch", |
| 96 | + "type": "object", |
| 97 | + "properties": { |
| 98 | + "jobStarted": { |
| 99 | + "description": "Time when the batch started being shredded", |
| 100 | + "type": "string", |
| 101 | + "format": "date-time" |
| 102 | + }, |
| 103 | + "jobCompleted": { |
| 104 | + "description": "Time when the batch shredding has been finished (and the message being prepared)", |
| 105 | + "type": "string", |
| 106 | + "format": "date-time" |
| 107 | + }, |
| 108 | + "min": { |
| 109 | + "description": "The earliest collector_stamp available in the batch", |
| 110 | + "type": ["string", "null"], |
| 111 | + "format": "date-time" |
| 112 | + }, |
| 113 | + "max": { |
| 114 | + "description": "The latest collector_tstamp available in the batch", |
| 115 | + "type": ["string", "null"], |
| 116 | + "format": "date-time" |
| 117 | + } |
| 118 | + }, |
| 119 | + "required": ["jobStarted", "jobCompleted", "min", "max"] |
| 120 | + }, |
| 121 | + "processor": { |
| 122 | + "description": "Identificator of a shredder sent the message", |
| 123 | + "type": "object", |
| 124 | + "properties": { |
| 125 | + "artifact": { |
| 126 | + "description": "Name of the artifact", |
| 127 | + "type": "string", |
| 128 | + "maxLength": 64 |
| 129 | + }, |
| 130 | + "version": { |
| 131 | + "description": "Semantic Version of the artifact", |
| 132 | + "type": "string", |
| 133 | + "maxLength": 16 |
| 134 | + } |
| 135 | + }, |
| 136 | + "required": ["artifact", "version"] |
| 137 | + }, |
| 138 | + "count": { |
| 139 | + "description": "Count of events in the batch, null means the count could not be calculated", |
| 140 | + "type": ["object", "null"], |
| 141 | + "properties": { |
| 142 | + "good": { |
| 143 | + "description": "Amount of good events in the batch", |
| 144 | + "type": "integer", |
| 145 | + "minimum": 0 |
| 146 | + }, |
| 147 | + "bad": { |
| 148 | + "description": "Amount of bad events in the batch", |
| 149 | + "type": "integer", |
| 150 | + "minimum": 0 |
| 151 | + } |
| 152 | + } |
| 153 | + } |
| 154 | + }, |
| 155 | + "required": ["base", "compression", "typesInfo", "timestamps", "processor"], |
| 156 | + "additionalProperties": false |
| 157 | +} |
0 commit comments