Hi everyone! I am using meltano to extract some da...
# getting-started
a
Hi everyone! I am using meltano to extract some data from a MySQL database, but for some reason loaders fail to validate table columns that are of JSON type: the column type in the catalog is
['null', 'object']
, but the json payload is sent to the loader as a string instead of a python dictionary and the validation fails:
jsonschema.exceptions.ValidationError: '{"content_types": ["formal"]}' is not of type 'null', 'object'
Is there a way to overcome this problem? I was trying to use the
_schema
extra to override the type of this field to string, but loaders seem to ignore this setting. Is there anything I'm doing wrong?
d
I'm guessing you are using target-bigquery as a loader here?
a
No, I've actually tried csv and jsonl (I'm still testing meltano locally). I have also opened an issue here about this problem (I've been using meltano since 24 hours, so I hope I am not doing any errors on my end). As a temporary workaround I've tried using the
meltano-map-transformer
to convert these columns to strings on their way to the loader, but this is not a great solution, especially because the mapper doesn't support wildcards in the stream id. If I have 3000 schemas - which I have - I can't create a rule like
*-table.column
, but I should create one rule for each schema, which is not sustainable. Finally, I have also tried changing the
_schema
extra, but it only changes the column type in the catalog, not in the actual records being sent.