I have a Postgres to Snowflake pipeline that's fai...
# troubleshooting
j
I have a Postgres to Snowflake pipeline that's failing on a table where I've specified a column should be of type
variant
, in the postgres database the
object
and
object_changes
columns contains either
null
or a
JSONB
value. here's my tap configuration:
Copy code
- name: tap-postgres-arc-full-refresh
    inherit_from: tap-postgres
    variant: meltanolabs
    pip_url: git+<https://github.com/MeltanoLabs/tap-postgres.git@v0.0.9>
    config:
      host: ${ARC_DB_HOST}
      user: ${ARC_DB_USER}
      port: ${ARC_DB_PORT}
      password: ${ARC_DB_PASSWORD}
      database: ${ARC_DB_NAME}
      default_replication_method: FULL_TABLE
      filter_schemas:
      - public
      ssl_enable: true
      ssl_mode: require
      ssl_certificate_authority: .secrets/root.crl
      dates_as_string: true

    select:
    - public-versions.*

    schema:
      public-versions:
        object:
          type: [variant, {}]
          format: variant
        object_changes:
          type: [variant, {}]
          format: variant
And I'm getting this error:
Copy code
2024-04-09T09:21:29.650895Z [info     ] sqlalchemy.exc.ProgrammingError: (snowflake.connector.errors.ProgrammingError) 002108 (22000): 01b38cf1-0002-4b95-0042-68070031e832: SQL compilation error: cannot change column OBJECT from type VARIANT to VARCHAR(16777216) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T09:21:29.650986Z [info     ]                                cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T09:21:29.651127Z [info     ] [SQL: ALTER TABLE SOURCE_MELTANO_DEV.ARC_POSTGRES.VERSIONS ALTER COLUMN object SET DATA TYPE VARCHAR] cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
This pipeline loads about 5k row and correctly creates the columns in Snowflake as VARIANTs before failing with the above error message. Why is Meltano trying to convert this column to
VARCHAR(16777216)
?
v
The column
object
seems to be changing types? Or at least snowflake is interpreting that. I'd take a peak at the output of tap-postgres 's raw output ie
meltano invoke tap-postgres-arc-full-refresh
and see if there's multiple schema messages for the same table, and is the schema for that table changing (it shouldn't be but it seems like it is here?) My best guess is that snowflake is interpreting something as a column type change that it shouldn't be, but I'd have to dive into those messages and send them to target-snowflake to be sure
j
I had a similar hunch that somehow multiple schema outputs could be getting created. when I run
meltano invoke tap-postgres-arc-full-refresh > versions.json
locally the versions.json file ends up being 438k lines long with only this 1 schema output:
Copy code
{
  "type": "SCHEMA",
  "stream": "public-versions",
  "schema": {
    "properties": {
      "item_type": {
        "type": [
          "string",
          "null"
        ]
      },
      "event": {
        "type": [
          "string",
          "null"
        ]
      },
      "whodunnit": {
        "type": [
          "string",
          "null"
        ]
      },
      "object": {
        "format": "VARIANT",
        "type": [
          "VARIANT",
          {}
        ]
      },
      "object_changes": {
        "format": "VARIANT",
        "type": [
          "VARIANT",
          {}
        ]
      },
      "created_at": {
        "format": "date-time",
        "type": [
          "string",
          "null"
        ]
      },
      "id": {
        "type": [
          "string"
        ]
      },
      "item_id": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "type": "object",
    "required": [
      "id"
    ]
  },
  "key_properties": [
    "id"
  ]
}
v
Then there's something in target-snowflake triggering a column type change based on the values of the data instead of schema messages
j
Hmm. Here's the loader definition
Copy code
loaders:
  - name: target-snowflake-arc-postgres
    inherit_from: target-snowflake
    variant: meltanolabs
    pip_url: meltanolabs-target-snowflake
    config:
      account: ${DBT_SNOWFLAKE_ACCOUNT}
      user: ${MELTANO_SNOWFLAKE_USER}
      password: ${MELTANO_SNOWFLAKE_PASSWORD}
      warehouse: MELTANO
      default_target_schema: arc_postgres
not sure if this helps, but here's the Snowflake table definition
v
Again, that's my best guess but I'd dive in and figure out what causes it and then it'd be clear 🤷
e
@visch correct if I'm wrong but this override doesn't look like a valid json schema:
Copy code
type: [variant, {}]
Should it rather be something like
Copy code
type: [object, {}]
unless I'm missing how target-snowflake interprets those types
j
You're right @Edgar Ramírez (Arch.dev), I didn't notice until I dropped the table in Snowflake entirely then reran the sync and got some error about how "variant" is an unrecognized type. I now have this in my meltano.yml file:
Copy code
schema:
      public-versions:
        object:
          type: [object, {}]
        object_changes:
          type: [object, {}]
but am unfortunately getting this error message now:
Copy code
2024-04-09T18:26:53.243221Z [info     ] Traceback (most recent call last): cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.243494Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/bin/target-snowflake", line 8, in <module> cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.243749Z [info     ]     sys.exit(TargetSnowflake.cli()) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.243907Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__ cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.244263Z [info     ]     return self.main(*args, **kwargs) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.244470Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/click/core.py", line 1078, in main cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.244710Z [info     ]     rv = self.invoke(ctx)      cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.244862Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.245089Z [info     ]     return ctx.invoke(self.callback, **ctx.params) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.245248Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.245387Z [info     ]     return __callback(*args, **kwargs) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.245527Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/target_base.py", line 550, in invoke cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.245737Z [info     ]     target.listen(file_input)  cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.245879Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/io_base.py", line 34, in listen cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.246072Z [info     ]     self._process_lines(file_input) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.246224Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/target_base.py", line 291, in _process_lines cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.246346Z [info     ]     counter = super()._process_lines(file_input) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.246463Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/io_base.py", line 93, in _process_lines cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.246580Z [info     ]     self._process_record_message(line_dict) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.246695Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/target_base.py", line 341, in _process_record_message cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.246893Z [info     ]     sink._validate_and_parse(transformed_record) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.247276Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/sinks/core.py", line 317, in _validate_and_parse cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.247494Z [info     ]     self._validator.validate(record) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.247658Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/validators.py", line 437, in validate cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.247840Z [info     ]     for error in self.iter_errors(*args, **kwargs): cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.248137Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/validators.py", line 371, in iter_errors cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.248627Z [info     ]     for error in errors:       cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.248772Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/_keywords.py", line 296, in properties cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.249131Z [info     ]     yield from validator.descend( cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.249445Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/validators.py", line 419, in descend cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.249590Z [info     ]     for error in errors:       cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.249758Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/_keywords.py", line 285, in type cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.249949Z [info     ]     if not any(validator.is_type(instance, type) for type in types): cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.250080Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/_keywords.py", line 285, in <genexpr> cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.250201Z [info     ]     if not any(validator.is_type(instance, type) for type in types): cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.250325Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/validators.py", line 442, in is_type cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.250443Z [info     ]     return self.TYPE_CHECKER.is_type(instance, type) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.250568Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/_types.py", line 110, in is_type cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.250693Z [info     ]     fn = self._type_checkers[type] cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.250811Z [info     ] TypeError: argument 'key': unhashable type: 'dict' cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.328176Z [info     ] 2024-04-09 20:26:53,327 | INFO     | snowflake.connector.connection | closed cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.328376Z [info     ] 2024-04-09 20:26:53,327 | INFO     | snowflake.connector.connection | No async queries seem to be running, deleting session cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:26:53.407359Z [error    ] [Errno 32] Broken pipe
Here's the important part i think:
Copy code
TypeError: argument 'key': unhashable type: 'dict'
but this isn't an immediate obvious error message 🤔
e
Ah, I think it should be
Copy code
type: [object, null]
j
Hmm, I think I tried that too without success. Ok, I'm rerunning again with this config 🏃 🏃
Copy code
schema:
      public-versions:
        object:
          type: [object, null]
        object_changes:
          type: [object, null]
so I now get this error message
Copy code
jsonschema.exceptions.UnknownType: Unknown type None for validator with schema:
     {'type': ['object', None]}
While checking instance:
     None
full message:
Copy code
2024-04-09T18:47:04.368026Z [info     ] Traceback (most recent call last): cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.368154Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/bin/target-snowflake", line 8, in <module> cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.368303Z [info     ]     sys.exit(TargetSnowflake.cli()) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.368429Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__ cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.368696Z [info     ]     return self.main(*args, **kwargs) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.368811Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/click/core.py", line 1078, in main cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.368954Z [info     ]     rv = self.invoke(ctx)      cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369032Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369137Z [info     ]     return ctx.invoke(self.callback, **ctx.params) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369230Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369309Z [info     ]     return __callback(*args, **kwargs) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369380Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/target_base.py", line 550, in invoke cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369499Z [info     ]     target.listen(file_input)  cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369571Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/io_base.py", line 34, in listen cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369699Z [info     ]     self._process_lines(file_input) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369784Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/target_base.py", line 291, in _process_lines cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369897Z [info     ]     counter = super()._process_lines(file_input) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.369969Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/io_base.py", line 93, in _process_lines cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370034Z [info     ]     self._process_record_message(line_dict) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370098Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/target_base.py", line 341, in _process_record_message cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370179Z [info     ]     sink._validate_and_parse(transformed_record) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370241Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/singer_sdk/sinks/core.py", line 317, in _validate_and_parse cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370343Z [info     ]     self._validator.validate(record) cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370412Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/validators.py", line 437, in validate cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370476Z [info     ]     for error in self.iter_errors(*args, **kwargs): cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370537Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/validators.py", line 371, in iter_errors cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370603Z [info     ]     for error in errors:       cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370664Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/_keywords.py", line 296, in properties cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370771Z [info     ]     yield from validator.descend( cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370846Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/validators.py", line 419, in descend cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370922Z [info     ]     for error in errors:       cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.370988Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/_keywords.py", line 285, in type cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.371056Z [info     ]     if not any(validator.is_type(instance, type) for type in types): cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.371123Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/_keywords.py", line 285, in <genexpr> cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.371184Z [info     ]     if not any(validator.is_type(instance, type) for type in types): cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.371253Z [info     ]   File "/Users/jacob/code/pairteam/analytics-etl/.meltano/loaders/target-snowflake/venv/lib/python3.10/site-packages/jsonschema/validators.py", line 445, in is_type cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.371315Z [info     ]     raise exc from None        cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.371420Z [info     ] jsonschema.exceptions.UnknownType: Unknown type None for validator with schema: cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.371489Z [info     ]     {'type': ['object', None]} cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.371552Z [info     ]                                cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.371613Z [info     ] While checking instance:       cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.371673Z [info     ]     None                       cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.443576Z [info     ] 2024-04-09 20:47:04,441 | INFO     | snowflake.connector.connection | closed cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
2024-04-09T18:47:04.444121Z [info     ] 2024-04-09 20:47:04,441 | INFO     | snowflake.connector.connection | No async queries seem to be running, deleting session cmd_type=elb consumer=True name=target-snowflake-arc-postgres producer=False stdio=stderr string_id=target-snowflake-arc-postgres
e
This is far from the first time I have to correct myself after suggesting it 😅. Sorry, try
Copy code
type: [object, "null"]
(ie with quotes)
j
i'm correcting myself alll day🤞we got this
Copy code
schema:
      public-versions:
        object:
          type: [object, "null"]
        object_changes:
          type: [object, "null"]
👀 1
...The sync is running and usually fails very quickly. Looking good so far 🙂
that worked 🎉
🙌 1
v
So the issue was the type's were made up
Copy code
public-versions:
        object:
          type: [variant, {}]
target-snowflake saw these and picked string as the data type and caused issues, right?
e
That seems to be the case. Worth reporting in the target repo imo.
1