dan
09/30/2023, 1:14 PMdan
09/30/2023, 1:21 PMedgar_ramirez_mondragon
09/30/2023, 3:08 PM'[]'
string for that field, either directly from the API or though some post processing in the tap.
Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from jsonschema import Draft7Validator
>>> schema = {
... "items": {
... "properties": {
... "color": {"type": ["integer", "null"]},
... "id": {"type": ["integer", "null"]},
... "rank": {"type": ["integer", "null"]},
... "text": {"type": ["string", "null"]},
... },
... "type": "object",
... },
... "type": "array",
... }
>>> validator = Draft7Validator(schema)
>>> validator.validate([])
>>> validator.validate('[]')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/meltano/sdk/.venv/lib/python3.11/site-packages/jsonschema/validators.py", line 314, in validate
raise error
jsonschema.exceptions.ValidationError: '[]' is not of type 'array'
Failed validating 'type' in schema:
{'items': {'properties': {'color': {'type': ['integer', 'null']},
'id': {'type': ['integer', 'null']},
'rank': {'type': ['integer', 'null']},
'text': {'type': ['string', 'null']}},
'type': 'object'},
'type': 'array'}
On instance:
'[]'
Try disabling any stream maps or flattening, if you have enabled any, and checking the raw Singer output of the tap to confirm.dan
09/30/2023, 3:53 PM