Hi, I am trying to create a custom connector to co...
# connector-development
a
Hi, I am trying to create a custom connector to connect to an API that return json, and i get following error:
ERROR i.a.w.p.a.DefaultAirbyteStreamFactory(lambda$create$1):70 - Validation failed: {"type":"RECORD","record":{"stream":"sensorhistory","data":
logs and json schema attached for reference. Any idea what's wrong? Thanks :)
o
loading...
a
Hi @Alpana Shukla, you receive number in the
value
field, not string as defined in the schema. Your schema should be something like the following:
Copy code
{
  "$schema": "<http://json-schema.org/draft-04/schema#>",
  "type": "object",
  "properties": {
    "result": {
      "type": "string"
    },
    "table": {
      "type": "string"
    },
    "_start": {
      "type": "string",
      "format": "date-time"
    },
    "_stop": {
      "type": "string",
      "format": "date-time"
    },
    "_time": {
      "type": "string",
      "format": "date-time"
    },
    "_value": {
      "type": "number"
    },
    "_field": {
      "type": "string"
    },
    "_measurement": {
      "type": "string"
    },
    "deviceId": {
      "type": "string"
    },
    "location": {
      "type": "string"
    }
  },
  "required": [
    "result",
    "table",
    "_start",
    "_stop",
    "_time",
    "_value",
    "_field",
    "_measurement",
    "deviceId",
    "location"
  ]
}
a
this schema is also not working :(