mert_bakir
05/25/2023, 10:00 PMmeltano invoke tap-mongodb
:
{"type": "SCHEMA", "stream": "activities", "schema": {"type": "object", "properties:{
"activity_date": {"anyOf": [{"type": "string", "format": "date-time"}, {}]},
"source": {"anyOf": [{}]},
"data": {"anyOf": [{}]}}},
"key_properties": ["_id"]}
The errors are caused by the empty dictionaries in anyOf lists. I tried to override this with:
schema:
stream:
_id:
type: [string, null]
format: uuid
activity_date:
type: string
format: date-time
but it doesn't override fully only adds the parts I defined and keeps the rest.
It's able extract data its own but schema looks flawed and throws error on load. last part of the error, called: BrokenPipeError:
2023-05-25T21:43:43.337260Z [info ] return meth(self, **kw) cmd_type=elb consumer=True name=target-postgres producer=False stdio=stderr string_id=target-postgres
2023-05-25T21:43:43.337461Z [info ] File "/home/ubuntu/meltano_project/mongo-test/.meltano/loaders/target-postgres/venv/lib/python3.9/site-packages/sqlalchemy/sql/compiler.py", line 5166, in visit_null cmd_type=elb consumer=True name=target-postgres producer=False stdio=stderr string_id=target-postgres
2023-05-25T21:43:43.337680Z [info ] raise exc.CompileError( cmd_type=elb consumer=True name=target-postgres producer=False stdio=stderr string_id=target-postgres
2023-05-25T21:43:43.337884Z [info ] sqlalchemy.exc.CompileError: Can't generate DDL for NullType(); did you forget to specify a type on this Column? cmd_type=elb consumer=True name=target-postgres producer=False stdio=stderr string_id=target-postgres
2023-05-25T21:43:43.434281Z [error ]