Hi @karl_jones,
Generally, schema reference looks like this:
iglu:vendor_name/event_name/jsonschema/2-0-0
---- ----------- ---------- ---------- -----
| | | | |- schema version (model-revision-addition)
| | | |- schema format
| | |- event name
| |- vendor of the event
|- schema methodology
On the other hand, the JSON schema describing the event will look like:
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for event_name",
"self": {
"vendor": "vendor_name",
"name": "event_name",
"format": "jsonschema",
"version": "2-0-0"
},
"type": "object",
"properties": {
"productId": {
"type": "string"
},
"category": {
"type": "string"
},
...
},
"minProperties":<<min number>>,
"required": [<<list of required properties>>],
"additionalProperties": <<false/true>>
}
The important part here is the self
section:
"self": {
"vendor": "vendor_name",
"name": "event_name",
"format": "jsonschema",
"version": "2-0-0"
}
Again, note the properties’ values vendor_name/event_name/jsonschema/2-0-0
.
Thus, your JSON schema file is expected to be located at
ddajv0fjp16r7.cloudfront.net/schemas/vendor_name/event_name/jsonschema/2-0-0
Note the folder schemas
containing the same structure vendor_name/event_name/jsonschema/2-0-0
. You might want to host different schemas associated with different vendors.
This also means that your resolver configuration file should look something like
{
"schema": "iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-1",
"data": {
"cacheSize": 500,
"repositories": [
{
"name": "Iglu Central",
"priority": 0,
"vendorPrefixes": [ "com.snowplowanalytics" ],
"connection": {
"http": {
"uri": "http://iglucentral.com"
}
}
},
{
"name": "Your Iglu Server",
"priority": 0,
"vendorPrefixes": [ "vendor_name" ],
"connection": {
"http": {
"uri": "http://ddajv0fjp16r7.cloudfront.net"
}
}
}
]
}
}
Also, ensure you set the appropriate permissions for your JSON schema file to be accessible from the EMR cluster during the enrichment process.
Hopefully, this helps.
–Ihor