@mike can you please tell me what does path look like ?
@mike I tested with snowplow and getting this error:
root:{
2 items
schema:
string"iglu:com.snowplowanalytics.snowplow.badrows/schema_violations/jsonschema/2-0-1"
data:{
3 items
processor:{
2 items
artifact:
string"snowplow-micro"
version:
string"2.1.3"
}
failure:{
2 items
timestamp:
string"2025-01-27T07:58:25.521904Z"
messages:[
1 item
0:{
2 items
schemaKey:
string"iglu:com.relevancestudio/request-event/jsonschema/1-0-1"
error:{
2 items
error:
string"ResolutionError"
lookupHistory:[
3 items
0:{
...
}
4 items
1:{
...
}
4 items
2:{
...
}
4 items
]
}
}
]
https://discourse.snowplow.io/u/mike
}
There is some information missing in this JSON (the formatter you are using has collapsed the arrays) but this error means that this schema hasn’t been found by the enrichment process. How have you published the schema so that Micro can read it?
@mike Yes, it is giving me a NotFound error.
[
{
"repository": "Custom (http://snowplow-iglu-lb-6b13e842-3cd6-7a6a-65bc-3166334c27c1.canadacentral.cloudapp.azure.com/api/schemas/1-0-1)",
"errors": [
{
"error": "NotFound"
}
]
}
]
But I am using this command:
export MICRO_IGLU_REGISTRY_URL=http://snowplow-iglu-lb-6b13e842-3cd6-7a6a-65bc-3166334c27c1.canadacentral.cloudapp.azure.com/api/schemas/1-0-1
export MICRO_IGLU_API_KEY=apikey
docker run -p 9090:9090 \
-e MICRO_IGLU_REGISTRY_URL \
-e MICRO_IGLU_API_KEY \
snowplow/snowplow-micro:2.1.3
I understand that this error means the schema is not found by Snowplow Micro. However, when I use the following curl
command, I can see my schemas are present:
curl -X GET http://snowplow-iglu-lb-6b13e842-3cd6-7a6a-65bc-3166334c27c1.canadacentral.cloudapp.azure.com/api/schemas -H "apikey: 'apikey' "
This returns:
[
"iglu:com.relevancestudio/request-event/jsonschema/1-0-0",
"iglu:com.relevancestudio/request-event/jsonschema/1-0-1"
]
Then why is Snowplow Micro giving me the NotFound error?
Am i missing some step ?
This looks like the incorrect URL for your Iglu Server as per the docs it should be in the form of http://snowplow-iglu-lb-6b13e842-3cd6-7a6a-65bc-3166334c27c1.canadacentral.cloudapp.azure.com/api
in your case.
@mike Tried this url:
http://snowplow-iglu-lb-6b13e842-3cd6-7a6a-65bc-3166334c27c1.canadacentral.cloudapp.azure.com/api
stilll getting same error:
failure:{
2 items
timestamp:
string"2025-01-28T09:40:31.883222Z"
messages:[
1 item
0:{
2 items
schemaKey:
string"iglu:com.relevancestudio/request-event/jsonschema/1-0-1"
error:{
2 items
error:
string"ResolutionError"
lookupHistory:[
4 items
0:{
4 items
repository:
string"Custom (http://snowplow-iglu-lb-6b13e842-3cd6-7a6a-65bc-3166334c27c1.canadacentral.cloudapp.azure.com/api)"
errors:[
1 item
0:{
1 item
error:
string"NotFound"
}
]
attempts:
int1
lastAttempt:
string"2025-01-28T09:40:28.945Z"
}
It isn’t finding the schema but it is hard to tell what the issue is without being able to test Iglu Server unfortunately.
@mike Do you know the reasons why this error is occurring ?
@mike I am tracking events for my APIs and want to know if I can use multiple schemas based on the API payload and response. Is it possible to switch schemas depending on the data structure, or am I required to use a single schema for all cases?
You can switch schemas (in your tracking code) based on the data structure you want to track - you don’t (and ideally shouldn’t) have one schema for every event.
@mike Let’s assume my schema is invalid. How can I check if it is valid or invalid, such as if the payload is incorrect or something is missing?
If you send data to Micro for example (good for iterative testing where you may need to change a schema) each event will either end up being returned by either the /good
endpoint or the /bad
endpoint depending on if it has failed validation or not. Good events will contain the full enriched event, bad events will contain the original failed event as well as the reason it has failed.