SnowPlow Micro Schema validation (Iglu) Failed

Hi,

We ran into issue after setting up SnowPlow Micro, unable to send any good event with the default iglu schema or with the custom schema
Below are the two scenarios we tried but, failed to post the good event. Please help us to lead to correct scenario where we can post good event .

SnowPlow Micro setup link : https://github.com/snowplow-incubator/snowplow-micro

Scenario 1:
Below is the Schema and Event data we used which lead to bad event.
Default iglu schema : “http”: {iglu schema registry jsonSchema 1-0-0

{
“schema”: “iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-0”,
“data”: {
“cacheSize”: 500,
“repositories”: [
{
“name”: “Iglu Central”,
“priority”: 0,
“vendorPrefixes”: [ “com.snowplowanalytics” ],
“connection”: {

          "uri": "http://iglucentral.com"
        }
      }
    }
  ]
}

}

Event Data:
curl --location --request POST ‘0.0.0.0:9090/com.thedatasherpas/tp2’
–header ‘Content-Type: application/json’
–header ‘Cookie: micro=eb33658b-934c-40dc-a78e-d468d5ce5131’
–data-raw ‘{
“cacheSize”: 24886729,
“repositories”: [
{
“name”: “aliquip sunt minim anim est”,
“priority”: -23656223,
“vendorPrefixes”: [
“eu nostrud proident esse”,
“ipsum”
],
“connection”: {
“embedded”: {
“path”: “id aliqua reprehenderit laborum”
}
}
},
{
“name”: “tempor consectetur adipisicing dolor Duis”,
“priority”: 62819237,
“vendorPrefixes”: [
“esse nulla dolor”,
“dolor ad consectetur minim in”,
“sunt magna nisi Excepteur”
],
“connection”: {
“http”: {
“uri”: “http://LYNtiajYBaGIlJFefZCsz.tixyhE9UjIaPNXUhkztutoT4B9f+VSvIzUWJSTCmmOxFMxo”
}
}
}
]
}’

Scenario2:
Docker failed to start after we configured the custom schema.

schema file : example/iglu.json
{

“$id”: “https://example.com/person.schema.json”,

“$schema”: “http://json-schema.org/draft-07/schema#”,

“title”: “Person”,

“type”: “object”,

“properties”: {

"firstName": {

  "type": "string",

  "description": "The person's first name."

},

"lastName": {

  "type": "string",

  "description": "The person's last name."

},

"age": {

  "description": "Age in years which must be equal to or greater than zero.",

  "type": "integer",

  "minimum": 0

}

}
}

Error:
docker run --mount type=bind,source=$(pwd)/example,destination=/config -p 9090:9090 snowplow/snowplow-micro:1.0.0 --collector-config /config/micro.conf --iglu /config/iglu.json

Exception in thread “main” java.lang.IllegalArgumentException: Error while reading Iglu config file: Schema SchemaKey(dev.amp.snowplow,amp_id,jsonschema,Full(1,0,0)) does not match criterion iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-*.

at com.snowplowanalytics.snowplow.micro.ConfigHelper$.parseConfig(ConfigHelper.scala:88)

at com.snowplowanalytics.snowplow.micro.Main$.main(Main.scala:40)

at com.snowplowanalytics.snowplow.micro.Main.main(Main.scala)

Thanks,

@sandeepkt, as your format appears to be broken it’s hard to read your message. Hopefully, I understood the issue correctly.

Scenario 1

The default Iglu resolver configuration is fine. However, I’m not following what you are trying to send to the Micro’s collector. It is expected to be a valid Snowpow event but you seem to be sending something else. Additionally, the endpoint /com.thedatasherpas/tp2 does not exist by default. If you meant to send POST requests the default endpoint is /com.snowplowanalytics.snowplow/tp2

Here’s an example of the basic Snowpow event (here pageview event)

curl --request POST \
  --url http://127.0.0.1:9090/com.snowplowanalytics.snowplow/tp2 \
  --header 'content-type: application/json' \
  --data '{
    "schema": "iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
    "data": [
        {
            "e": "pv",
            "tv": "curl",
            "p": "srv",
            "url": "https://www.acme.com",
            "page": "Homepage",
            "refr": "https://www.acme.com/smthg"
        }
    ]
}'

Scenario 2

The JSON schema example is not in the correct format. You can find lots of examples in our own Iglu Central. Do note that when testing custom events the corresponding JSON schema has to be hosted in your own Iglu server and your Iglu resolver has to have a record pointing to your own Iglu server (in addition to our Iglu central).

Hi @ihor Thanks for your reply.
Yes, it worked for me in scenario1 and will try to customize the schema further based on the link you provided in Scenario2. Really appreciate your help. Thank you.

Hi @ihor, We are able to post good records but, when we tried to add few more fields in the raw data we end up with exceptions. And also, we tried to figure out the schema validation in iglu scala client however we ended up with no luck, We need your help to know where the schema validation is happening for each fields. We observed that there are certain limitation for each fields as we are getting two different error for same field so, we wanted to know where are the limitations provided

Error 1:
curl1:
curl --request POST
–url http://0.0.0.0:9090/com.snowplowanalytics.snowplow/tp2
–header ‘content-type: application/json’
–data ‘{
“schema”: “iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4”,
“data”: [
{
“e”: “pv”,
“tv”: “curl”,
“p”: “srv”,
“sid”: “123456”,
“aid”: “test_appid”,
“url”: “https://www.acme.com”,
“page”: “Homepage”,
“refr”: “https://www.acme.com/smthg
}
]
}’

“errors”: [
“Error while validating the event”,
"{“schema”:“iglu:com.snowplowanalytics.snowplow.badrows/enrichment_failures/jsonschema/2-0-0”,“data”:{“processor”:{“artifact”:“snowplow-micro”,“version”:“1.0.0”},“failure”:{“timestamp”:“2020-10-10T13:48:49.510Z”,“messages”:[{“enrichment”:null,“message”:{“field”:"sid",“value”:“123456”,“expectation”:“not a valid UUID”}}]},“payload”:{“enriched”:{“app_id”:“test_appid”,“platform”:“srv”,“etl_tstamp”:"2020-10-10 13:48:49

ERROR2:

curl --request POST
–url http://0.0.0.0:9090/com.snowplowanalytics.snowplow/tp2
–header ‘content-type: application/json’
–data ‘{
“schema”: “iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4”,
“data”: [
{
“e”: “pv”,
“tv”: “curl”,
“p”: “srv”,
“res”: “12345”,
“aid”: “test_appid”,
“url”: “https://www.acme.com”,
“page”: “Homepage”,
“refr”: “https://www.acme.com/smthg
}
]
}’

“Error while validating the event”,
"{“schema”:“iglu:com.snowplowanalytics.snowplow.badrows/enrichment_failures/jsonschema/2-0-0”,“data”:{“processor”:{“artifact”:“snowplow-micro”,“version”:“1.0.0”},“failure”:{“timestamp”:“2020-10-10T14:10:12.045Z”,“messages”:[{“enrichment”:null,“message”:{“field”:*“res”,“value”:“12345”,“expectation”:“does not conform to regex (\\d+)x(\\d+)”}}]},*

Hi,
You’ll find all the standard Snowplow Schemas here: http://iglucentral.com/

However, your payload also needs to conform to the Snowplow Tracker Protocol which you’ll find documented here: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/snowplow-tracker-protocol/

If you do get something wrong though, you should find the error messages helpful, such as the one above: “field”:"sid",“value”:“123456”,“expectation”:“not a valid UUID”
This tells you that the sid needs to be a valid UUID e.g. 4e2089f5-0497-46bd-96cb-edd7b806e3c7

Hi @PaulBoocock Thanks for the reply it worked, we are able to send the payload with fields : ‘sid’ and ‘res’.
Now, we tried to run the curl command pointing to different schema(Screen view) which failed but, when we tried to post using schema from one of the payload_data it worked. So, why is it not allowing to use other schemas from iglu center repo. what are the changes we need to do if we wanted to use other schema example Screen view schema.

Screen view Schema command:
curl --request POST
–url http://0.0.0.0:9090/com.snowplowanalytics.snowplow/tp2
–header ‘content-type: application/json’
–data '{
“schema”: “iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0”,
“data”:

  {

“name”: “exercitation sit ea in nulla”,
“id”: “cillum nulla deserunt fugiat”
}
}’

Error:
“errors”: [
“Error while extracting event(s) from collector payload and validating it/them.”,
“TrackerProtocolViolations(Processor(snowplow-micro,1.0.0),TrackerProtocolViolations(2020-10-10T20:10:29.995Z,com.snowplowanalytics.snowplow,tp2,NonEmptyList(CriterionMismatch(SchemaKey(com.snowplowanalytics.snowplow,screen_view,jsonschema,Full(1,0,0)),SchemaCriterion(com.snowplowanalytics.snowplow,payload_data,jsonschema,Some(1),Some(0),None)))),CollectorPayload(com.snowplowanalytics.snowplow,tp2,List(),Some(application/json),Some({\n “schema”: “iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0”,\n “data”: \n \n {\n “name”: “exercitation sit ea in nulla”,\n “id”: “cillum nulla deserunt fugiat”\n}\n}),ssc-1.0.1-stdout$,UTF-8,Some(0.0.0.0),Some(2020-10-10T20:10:29.392Z),Some(172.17.0.1),Some(curl/7.64.1),None,List(Timeout-Access: , Host: 0.0.0.0:9090, User-Agent: curl/7.64.1, Accept: /, application/json),Some(a2d4ceab-bea3-4b9b-a1fc-dacf88a45aa4)))”

Hi @sandeepkt - just to zoom up a level for a moment, is there a reason why you can’t use one of the many Snowplow trackers to send valid events to your Snowplow Micro? There’s a full list here:

There’s even a Tracking CLI app you can use quickly at the command line:

$ snowplowtrk --collector={{COLLECTOR_DOMAIN}} --appid={{APP_ID}} --method=[POST|GET] --sdjson={{SELF_DESC_JSON}}

1 Like

Hey @sandeepkt, as Alex pointed out you would typically use one of the trackers that will send valid Snowplow events (conforming to Snowplow Tracker Protocol as Paul pointed out). If you do not want to get destructed by this protocol and concentrate on your custom data only you can utilise Iglu webhook adaptor of the collector.

Below are the examples of using POST endpoint and Iglu webhook adaptor with curl for your example. Do note that when you use the appropriate Snowplow tracker you have a dedicated method for the schema you picked (screen_view) and so on. For example,

POST endpoint

curl --request POST \
  --url http://127.0.0.1:9090/com.snowplowanalytics.snowplow/tp2 \
  --header 'content-type: application/json' \
  --data '{
	"schema": "iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
	"data": [
		{
			"e": "ue",
			"tv": "curl",
			"p": "srv",
			"ue_pr": "{\"schema\":\"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0\",\"data\":{\"schema\":\"iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0\",\"data\":{\"name\":\"exercitation sit ea in nulla\",\"id\":\"cillum nulla deserunt fugiat\"}}}"
		}
	]
}'

Note "e": "ue" which indicates it is a custom self-describing (unstruct) event you are sending and your custom data is the value to ue_pr (unencoded value) according to the Snowplow Tracker Protocol.

Iglu Webhook

curl --request POST \
  --url http://127.0.0.1:9090/com.snowplowanalytics.iglu/v1 \
  --header 'content-type: application/json' \
  --data '{
  "schema": "iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0",
  "data": {
    "name": "exercitation sit ea in nulla",
    "id": "cillum nulla deserunt fugiat"
  }
}'

Note the endpoint for Iglu webhook is /com.snowplowanalytics.iglu/v1.

Hopefully, the above examples help you understand Snowplow events better.

1 Like

Hi,

We are now trying to setup iglu repository for our custom schema hosted in our own repository.We followed the steps iglu server configured the static repo created json schema in our git repository and skipped the static server on AWS for now and moved on to iglu client configuration and created JSON schema for one remote repository with pointing url to git repository but, while executing POST still getting as bad record please correct us did we missed anything while configuring JSON file or git schema repository and do we really need static server to make it work?

Git Repository Schema:
https://github.com/thedatasherpas/repositories-2/blob/maste/static-registry/schemas/com.thedatasherpas/myschema/jsonschema/1-0-1

{
“$schema”: “http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#”,
“description”: “A template for a self-describing JSON Schema for use with Iglu”,
“self”: {
“vendor”: “com.myvendor”,
“name”: “myschema”,
“format”: “jsonschema”,
“version”: “1-0-1”
},

"type": "object",

"properties": {

	"id": {
		"type": "string"			
	},

	"name": {
		"type": "string"
	},

            "department": {
                    "type": "string"
            },
},

"required": ["id", "name", "department"],
"additionalProperties": false

}

JSON file:
{
“schema”: “iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-1”,
“data”: {
“cacheSize”: 1000,
“repositories”: [
{
“name”: “datasherpas center”,
“priority”: 0,
“vendorPrefixes”: [“com.thedatasherpas”],
“connection”: {
“http”: {
“uri”: “https://github.com/thedatasherpas/repositories-2/tree/master/static-registry/schemas
}
}
}]
}
}

Curl Command:
curl --request POST
–url http://0.0.0.0:9090/com.snowplowanalytics.snowplow/tp2
–header ‘content-type: application/json’
–data ‘{
“schema”: “iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4”,
“data”: [
{
“e”: “ue”,
“tv”: “curl”,
“p”: “srv”,
“ue_pr”: "{“schema”:“iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0”,“data”:{“schema”:“iglu:com.thedatasherpas/myschema/jsonschema/1-0-1\”,\”data”:{“name”:“exercitation sit ea in nulla”,“id”:"cillum nulla deserunt fugiat\”,\”department\”:\”snowplow\”}}}”
}
]
}’

ERROR:
“Error while extracting event(s) from collector payload and validating it/them.”,
“TrackerProtocolViolations(Processor(snowplow-micro,1.0.0),TrackerProtocolViolations(2020-10-12T21:08:59.202Z,com.snowplowanalytics.snowplow,tp2,NonEmptyList(NotJson(body,Some({\n\t"schema”: “iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4”,\n\t"data": [\n\t\t{\n\t\t\t"e": “ue”,\n\t\t\t"tv": “curl”,\n\t\t\t"p": “srv”,\n\t\t\t"ue_pr": “{\“schema\”:\“iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0\”,\“data\”:{\“schema\”:\“iglu:com.thedatasherpas/myschema/jsonschema/1-0-1\”,\”data\”:{\“name\”:\“exercitation sit ea in nulla\”,\“id\”:\“cillum nulla deserunt fugiat\”,\”department\”:\”snowplow\”}}}”\n\t\t}\n\t]\n}),invalid json: illegal escape sequence (\”) got ‘\…’ (line 8, column 170)))),CollectorPayload(com.snowplowanalytics.snowplow,tp2,List(),Some(application/json),Some({\n\t"schema”: “iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4”,\n\t"data”: [\n\t\t{\n\t\t\t"e": “ue”,\n\t\t\t"tv": “curl”,

Hi @sandeepkt,

It looks like that’s the same error you posted before - your curl request isn’t sending the right format. I would recommend following Alex’s advice. Use the tracking CLI, or one of the trackers to avoid that problem.

@sandeepkt, in addition to the wrong (broken) JSON format Colm pointed out to (at least it looks broken in this post - non-escaped " used) your reference to the custom Iglu server does not appear to be right either. Perhaps it’s not publically available but it has to be available to your Snowplow Micro instance via HTTP and the folder schemas is expected to be a root folder of the Iglu server. That is if your static Iglu server is accessible via https://com.acme/api, for example, (the reference in the Iglu resolver) then the path to your JSON schemas has to be in the form /schemas/<vendor>/<name>/jsonschema/<version>. You seem to include schemas in the URI itself.

Hi
We have configured our local schema in AWS static server on S3 and we are able to point to it and able to get good event. But we are trying to change the protocol (tp2) vendor name from com.snowplowanalytics to com.thedatasherpas we got below error. Please suggest me to correct configuration where we can change the vendor name

“rawEvent”: null,
“errors”: [
“Error while extracting event(s) from collector payload and validating it/them.”,
“AdapterFailures(Processor(snowplow-micro,1.0.0),AdapterFailures(2020-10-20T19:12:07.286Z,com.thedatasherpas,tp2,NonEmptyList(InputData(vendor/version,Some(com.thedatasherpas/tp2),vendor/version combination is not supported))),CollectorPayload(com.thedatasherpas,tp2,List(),Some(application/json),Some({\n\t"schema”: “iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4”,\n\t"data": [\n\t\t{\n\t\t\t"e": “ue”,\n\t\t\t"tv": “curl”,\n\t\t\t"p": “srv”,\n\t\t\t"ue_pr": “{\“schema\”:\“iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0\”,\“data\”:{\“schema\”:\“iglu:com.thedatasherpas/myschema/jsonschema/1-0-7\”,\“data\”:{\“account_id\”:\“exercitation sit ea in nulla\”,\“partner_id\”:\“exercitation sit ea in nulla\”,\“app_ver\”:\“exercitation sit ea in nulla\”,\“device_id\”:\“exercitation sit ea in nulla\”,\“name\”:\“exercitation sit ea in nulla\”,\“id\”:\“cillum nulla deserunt fugiat\”}}}”\n\t\t}\n\t]\n}\n),ssc-1.0.1-stdout$,UTF-8,Some(localhost),Some(2020-10-20T19:12:07.281Z),Some(172.17.0.1),Some(PostmanRuntime/7.26.5),None,List(Timeout-Access: , User-Agent: PostmanRuntime/7.26.5, Accept: /, Postman-Token: 266d5a96-801e-4f61-8920-0629713b0bf7, Host: localhost:9090, Accept-Encoding: gzip, deflate, br, Connection: keep-alive, Cookie: micro=201857bb-7424-44d4-a117-eea33f57f2e9, application/json),Some(201857bb-7424-44d4-a117-eea33f57f2e9)))"
]
},
{
“collectorPayload”: {
“api”: {
“vendor”: “com.snowplowanalytics.com”,
“version”: “tp2”
},
“querystring”: ,
“contentType”: “application/json”,
“body”: “{\n\t"schema”: “iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4”,\n\t"data": [\n\t\t{\n\t\t\t"e": “ue”,\n\t\t\t"tv": “curl”,\n\t\t\t"p": “srv”,\n\t\t\t"ue_pr": “{\“schema\”:\“iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0\”,\“data\”:{\“schema\”:\“iglu:com.thedatasherpas/myschema/jsonschema/1-0-7\”,\“data\”:{\“account_id\”:\“exercitation sit ea in nulla\”,\“partner_id\”:\“exercitation sit ea in nulla\”,\“app_ver\”:\“exercitation sit ea in nulla\”,\“device_id\”:\“exercitation sit ea in nulla\”,\“name\”:\“exercitation sit ea in nulla\”,\“id\”:\“cillum nulla deserunt fugiat\”}}}”\n\t\t}\n\t]\n}\n",
“source”: {
“name”: “ssc-1.0.1-stdout$”,
“encoding”: “UTF-8”,
“hostname”: “localhost”
3:13

3:13
[
{
“collectorPayload”: {
“api”: {
“vendor”: “com.thedatasherpas”,
“version”: “tp2”
},
“querystring”: ,
“contentType”: “application/json”,
“body”: “{\n\t"schema”: “iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4”,\n\t"data": [\n\t\t{\n\t\t\t"e": “ue”,\n\t\t\t"tv": “curl”,\n\t\t\t"p": “srv”,\n\t\t\t"ue_pr": “{\“schema\”:\“iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0\”,\“data\”:{\“schema\”:\“iglu:com.thedatasherpas/myschema/jsonschema/1-0-7\”,\“data\”:{\“account_id\”:\“exercitation sit ea in nulla\”,\“partner_id\”:\“exercitation sit ea in nulla\”,\“app_ver\”:\“exercitation sit ea in nulla\”,\“device_id\”:\“exercitation sit ea in nulla\”,\“name\”:\“exercitation sit ea in nulla\”,\“id\”:\“cillum nulla deserunt fugiat\”}}}”\n\t\t}\n\t]\n}\n",
“source”: {
“name”: “ssc-1.0.1-stdout$”,
“encoding”: “UTF-8”,
“hostname”: “localhost”
},
“context”: {
“timestamp”: “2020-10-20T19:12:07.281Z”,
“ipAddress”: “172.17.0.1”,
“useragent”: “PostmanRuntime/7.26.5”,
“refererUri”: null,
“headers”: [
“Timeout-Access: “,
“User-Agent: PostmanRuntime/7.26.5”,
“Accept: /”,
“Postman-Token: 266d5a96-801e-4f61-8920-0629713b0bf7”,
“Host: localhost:9090”,
“Accept-Encoding: gzip, deflate, br”,
“Connection: keep-alive”,
“Cookie: micro=201857bb-7424-44d4-a117-eea33f57f2e9”,
“application/json”
],
“userId”: “201857bb-7424-44d4-a117-eea33f57f2e9”
}
},
“rawEvent”: null,
“errors”: [
“Error while extracting event(s) from collector payload and validating it/them.”,
“AdapterFailures(Processor(snowplow-micro,1.0.0),AdapterFailures(2020-10-20T19:12:07.286Z,com.thedatasherpas,tp2,NonEmptyList(InputData(vendor/version,Some(com.thedatasherpas/tp2),vendor/version combination is not supported))),CollectorPayload(com.thedatasherpas,tp2,List(),Some(application/json),Some({\n\t"schema”: “iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4”,\n\t"data”: [\n\t\t{\n\t\t\t"e”: “ue”,\n\t\t\t"tv": “curl”,\n\t\t\t"p": “srv”,\n\t\t\t"ue_pr": “{\“schema\”:\“iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0\”,\“data\”:{\“schema\”:\“iglu:com.thedatasherpas/myschema/jsonschema/1-0-7\”,\“data\”:{\“account_id\”:\“exercitation sit ea in nulla\”,\“partner_id\”:\“exercitation sit ea in nulla\”,\“app_ver\”:\“exercitation sit ea in nulla\”,\“device_id\”:\“exercitation sit ea in nulla\”,\“name\”:\“exercitation sit ea in nulla\”,\“id\”:\“cillum nulla deserunt fugiat\”}}}”\n\t\t}\n\t]\n}\n),ssc-1.0.1-stdout$,UTF-8,Some(localhost),Some(2020-10-20T19:12:07.281Z),Some(172.17.0.1),Some(PostmanRuntime/7.26.5),None,List(Timeout-Access: , User-Agent: PostmanRuntime/7.26.5, Accept: /, Postman-Token: 266d5a96-801e-4f61-8920-0629713b0bf7, Host: localhost:9090, Accept-Encoding: gzip, deflate, br, Connection: keep-alive, Cookie: micro=201857bb-7424-44d4-a117-eea33f57f2e9, application/json),Some(201857bb-7424-44d4-a117-eea33f57f2e9)))"
]
}

iglu.json file:
{
“schema”: “iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-0",
“data”: {
“cacheSize”: 500,
“repositories”: [
{
“name”: “Iglu Central”,
“priority”: 0,
“vendorPrefixes”: [ “com.thedatasherpas” ],
“connection”: {
“http”: {
“uri”: “http://thedatasherpasiglu.com
}
}
}
]
}
}

Attached the CURL command as well for reference.

curl --location --request POST ‘localhost:9090/com.thedatasherpas/tp2’
–header ‘Content-Type: application/json’
–header ‘Cookie: micro=201857bb-7424-44d4-a117-eea33f57f2e9’
–data-raw '{
“schema”: “iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4”,
“data”: [
{
“e”: “ue”,
“tv”: “curl”,
“p”: “srv”,
“ue_pr”: “{“schema”:“iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0”,“data”:{“schema”:“iglu:com.thedatasherpas/myschema/jsonschema/1-0-7”,“data”:{“account_id”:“exercitation sit ea in nulla”,“partner_id”:“exercitation sit ea in nulla”,“app_ver”:“exercitation sit ea in nulla”,“device_id”:“exercitation sit ea in nulla”,“name”:“exercitation sit ea in nulla”,“id”:“cillum nulla deserunt fugiat”}}}”
}
]
}

tp2 refers to the Snowplow ‘tracker protocol’, for which the vendor is com.snowplowanalytics.snowplow. The reference here is to the format of the payload itself, not the vendor for the event.

The vendor defined in the self portion of your schema is referred to via the value of schema in your self-describing JSON. In your case, you already have referred to the correct vendor name:

{“schema”:“iglu:com.thedatasherpas/myschema/jsonschema/1-0-7”,
“data”:{“account_id”:“exercitation sit ea in nulla”,“partner_id”:“exercitation sit ea in nulla”,“app_ver”:“exercitation sit ea in nulla”,“device_id”:“exercitation sit ea in nulla”,“name”:“exercitation sit ea in nulla”,“id”:“cillum nulla deserunt fugiat”}}

@sandeepkt, it is possible to change the collector endpoint so that your curl events are sent to the custom path of the collector. This is achieved by overriding the collector default value /com.snowplowanalytics.snowplow/tp2 to that of your choosing in the format /custom_string_1/custom_string_2. This collector feature is described here.

Note that if you are to use a tracker as opposed to something like curl command then the tracker needs to be configured to use the custom endpoint as explained here for Javascript tracker.