I wrote a <custom tap> with the SDK and I’m having...
# troubleshooting
m
I wrote a custom tap with the SDK and I’m having some weird behavior when it writes to the transferwise
tap-postgres
. Basically, it’s writing all
Integer
types as
Numeric
. The catalog (and in debug mode) are emitting a schema of type
integer
but the result is
numeric
. I’m not sure if I’m missing something obvious here, but I’m not seeing it. Here’s an example of a schema:
Copy code
{
  "type": "SCHEMA",
  "stream": "assignments",
  "schema": {
    "properties": {
      "id": {
        "type": [
          "integer",
          "null"
        ]
      },
      "description": {
        "type": [
          "string",
          "null"
        ]
      },
      "due_at": {
        "format": "date-time",
        "type": [
          "string",
          "null"
        ]
      },
      "points_possible": {
        "type": [
          "number",
          "null"
        ]
      },
      "grading_type": {
        "type": [
          "string",
          "null"
        ]
      },
      "assignment_group_id": {
        "type": [
          "integer",
          "null"
        ]
      },
      "grading_standard_id": {
        "type": [
          "integer",
          "null"
        ]
      },
      "created_at": {
        "format": "date-time",
        "type": [
          "string",
          "null"
        ]
      },
      "updated_at": {
        "format": "date-time",
        "type": [
          "string",
          "null"
        ]
      },
      "course_id": {
        "type": [
          "integer",
          "null"
        ]
      },
      "name": {
        "type": [
          "string",
          "null"
        ]
      },
      "rubric": {
        "type": [
          "string",
          "null"
        ]
      },
      "published": {
        "type": [
          "boolean",
          "null"
        ]
      }
    },
    "type": "object"
  },
  "key_properties": [
    "id"
  ]
}
Nevermind. I found it. The schema needs a “maximum” in the properties or it defaults to
numeric
(link)
a
Hi @matt_cooley - we had a similar discovery recently and are contemplating a fix / improvement to the types. I'd like to sponsor the promotion of this target into meltano labs, but for now forked and raised an issue on our own repo: https://github.com/Matatika/pipelinewise-target-postgres/issues/2