简体   繁体   中英

schema: does not match the regex pattern

We use an unstruct_event but it always results in this failure. I do not understand what goes wrong here. What schema field is going wrong here, the schema field of the unstruct_event or the schema field of the data object within the unstruct_event ? It would be extremely valuable to have the actual failing value in the error message here...

"failure": {
  "timestamp": "2021-01-20T08:03:51.128Z",
  "messages": [
    {
      "schemaKey": "iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",
      "error": {
        "error": "ValidationError",
        "dataReports": [
          {
            "message": "$.schema: does not match the regex pattern ^iglu:[a-zA-Z0-9-_.]+/[a-zA-Z0-9-_]+/[a-zA-Z0-9-_]+/[0-9]+-[0-9]+-[0-9]+$",
            "path": "$.schema",
            "keyword": "pattern",
            "targets": [
              "^iglu:[a-zA-Z0-9-_.]+/[a-zA-Z0-9-_]+/[a-zA-Z0-9-_]+/[0-9]+-[0-9]+-[0-9]+$"
            ]
          }
        ]
      }
    }
  ]
}

This is the unstruct_event field from the payload:

    "unstruct_event": "{\"schema\":\"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0\",\"data\":{\"schema\":\"https://thijsbucket-dev.s3-eu-west-1.amazonaws.com/schemas/com.thijslearning/thijs-event/jsonschema/1-0-1.json\",\"data\":{\"event\":\"clicks\",\"action\":\"Feed rename item\",\"label\":\"2 Metadata\",\"CD_thijs_id\":\"5424\",\"CD_role\":\"thijser\",\"CD_method_name\":\"0 Thijs Manual MR\",\"CD_language\":\"en\",\"CD_window_size\":\"1024x768\",\"CD_demo_yn\":false}}}",
   

The error was that I added .json to the schema value in the event and it should be without .json so ending with 1-0-1 in the schema value as well is in the schema repository (S3 in my case).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM