Hey guys, I'm currently working on a schema, which...
# replication-troubleshooting
c
Hey guys, I'm currently working on a schema, which has an array of objects, which also could be empty. When I run the Basic Normalization, it doesn't create new tables for the objects inside the array (which is the behaviour I expect), although I specified the objects. So does anyone of you has an idea of how a schema should look like? This is my schema:
Copy code
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "key": {
      "type": "integer"
    },
    "value": {
      "type": "array",
      "contains": {
        "type": "object",
        "properties": {
          "blockNumber": {
            "type": "integer"
          },
          "blockHash": {
            "type": "string"
          },
          "transactionIndex": {
            "type": "integer"
          },
          "removed": {
            "type": "boolean"
          },
          "address": {
            "type": "string"
          },
          "data": {
            "type": "string"
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "transactionHash": {
            "type": "string"
          },
          "logIndex": {
            "type": "integer"
          },
          "parsedEvent": {
            "type": "object"
          }
        },
        "required": [
          "blockNumber",
          "blockHash",
          "transactionIndex",
          "removed",
          "address",
          "data",
          "topics",
          "transactionHash",
          "logIndex",
          "parsedEvent"
        ]
      }
    }
  },
  "required": [
    "key",
    "value"
  ]
}
n
Hi, Christopher! That looks good to me, but I would run it through a validator and also look through the repository and look at other connector schemas.
c
Thanks for the reply @Nataly Merezhuk (Airbyte). I've already had a look at other connector schemas and they look exactly the same like mine is. Is there any other possibility to get some support advices?
n
Could you rephrase your question? If it does what you're expecting it to do, what problem are you having?
c
@Nataly Merezhuk (Airbyte) It isn't doing what I'm expected to do. During the normalisation process, I want to get a separate table for the array
value
. Since now, the data of the array has just shown up as a JSON inside of the value column.