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. When I run the Basic Normalization, it doesn't create new tables for the objects inside the array, although I specified the objects. So does anyone of you has an idea of how a schema should look like?
c
Thanks @Akilesh V for your quick response. I had a look at the schema you've sent me and did everything like that, but the normalization doesn't create new tables for the values inside of the arrays. Do you have an idea, why? I could also send the schema
Copy code
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "key": {
      "type": [
        "string",
        "null"
      ]
    },
    "value": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "blockNumber": {
            "type": [
              "integer",
              "null"
            ]
          },
          "blockHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "transactionIndex": {
            "type": [
              "integer",
              "null"
            ]
          },
          "removed": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "data": {
            "type": [
              "string",
              "null"
            ]
          },
          "topics": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "transactionHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "logIndex": {
            "type": [
              "string",
              "null"
            ]
          },
          "parsedEvent": {
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "blockNumber",
          "blockHash",
          "transactionIndex",
          "removed",
          "address",
          "data",
          "topics",
          "transactionHash",
          "logIndex",
          "parsedEvent"
        ]
      }
    }
  },
  "required": [
    "key",
    "value"
  ]
}
a
usually it should create following table 1. parenttable(this name same as stream name) 2. parenttable_value
can share more details on you issue
c
Yeah it does create the two tables, but no separate tables for the elements inside of the arrays. Is this possible?
@Akilesh V
a
please refer this
@Christopher 2nd table parenttable_value should contain all the value in array
c
@Akilesh V Just tried to run normalization with my edited schema after you've sent me the docs, but now I get the following error:
Database Error in model test1_uniswap_value (models/generated/airbyte_tables/public/test1_uniswap_value.sql)
2023-01-27 122714 normalization > column reference "value" is ambiguous 2023-01-27 122714 normalization > LINE 37: and "value" is not null 2023-01-27 122714 normalization > ^
a
@Christopher can you share you source and destination name
c
@Akilesh V Are there some new infos about this thread? Would be very nice
u
Hello Christopher, it's been a while without an update from us. Are you still having problems or did you find a solution?