TomasB
01/29/2025, 3:47 PMtap-postgres
(meltanolabs
variant) and target-bigquery
(youcruit
variant) . Having an issue when the column datatype from postgres side is date
. Getting the below error
joblib.externals.loky.process_executor._RemoteTraceback:
Traceback (most recent call last):
File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.10/site-packages/joblib/_utils.py", line 72, in __call__
return self.func(**kwargs)
File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.10/site-packages/joblib/parallel.py", line 598, in __call__
return [func(*args, **kwargs)
File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.10/site-packages/joblib/parallel.py", line 598, in <listcomp>
return [func(*args, **kwargs)
File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.10/site-packages/singer_sdk/target_base.py", line 470, in _drain_sink
self.drain_one(sink)
File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.10/site-packages/singer_sdk/target_base.py", line 460, in drain_one
sink.process_batch(draining_status)
File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.10/site-packages/target_bigquery/sinks.py", line 354, in process_batch
writer(tempfile, self.parsed_schema, avro_records)
File "fastavro/_write.pyx", line 796, in fastavro._write.writer
File "fastavro/_write.pyx", line 738, in fastavro._write.Writer.write
File "fastavro/_write.pyx", line 465, in fastavro._write.write_data
File "fastavro/_write.pyx", line 409, in fastavro._write.write_record
File "fastavro/_write.pyx", line 463, in fastavro._write.write_data
File "fastavro/_write.pyx", line 343, in fastavro._write.write_union
ValueError: datetime.datetime(2024, 12, 17, 0, 0) (type <class 'datetime.datetime'>) do not match ['null', 'string'] on field <column_name>
and fails the sync. Is it possible to overwrite the datatype on bigquery side?Edgar Ramírez (Arch.dev)
01/29/2025, 10:50 PMschema
for the tap to override that field to be a type: string
.
https://docs.meltano.com/concepts/plugins/#schema-extraTomasB
01/29/2025, 10:52 PMTomasB
01/31/2025, 9:51 PMjsonschema.exceptions.ValidationError: None is not of type 'string'
Failed validating 'type' in schema['properties']['column_name']
On instance['column_name']:
None
Would there be any work around besides not having "NULL" values in the column?Edgar Ramírez (Arch.dev)
01/31/2025, 9:56 PMtype: [string, "null"]
(notice the quotes)TomasB
02/03/2025, 9:15 PM