tap-mongodb icon indicating copy to clipboard operation
tap-mongodb copied to clipboard

TypeError: unsupported operand type(s) for +: 'int' and 'str'

Open rks0nax opened this issue 1 year ago • 0 comments

When using LOG_BASED replication method "replication-method": "LOG_BASED", having a projection that's specified as string raises the following error

TypeError: unsupported operand type(s) for +: 'int' and 'str'

Example:

{
  "streams": [
    {
      ...
      "metadata": [
        {
            ...
            "selected": true,
            "replication-method": "LOG_BASED",
            // This will fail
            "tap-mongodb.projection": "{\"shipType\": \"$ship.type\", \"packSize\": \"$pack.type\"}",
            // This will not
            "tap-mongodb.projection": "{\"shipType\": 1, \"packSize\": 1}"
          }
        }
      ],
      ...
      "schema": {
        "type": "object"
      }
    }
  ]
}

rks0nax avatar Apr 18 '23 20:04 rks0nax