farid
02/07/2023, 9:01 AMpsycopg2.errors.DatetimeFieldOverflow: date/time field value out of range: "0000-00-00 00:00:00"
I tried to infer schema like but did not work
meltano invoke tap-mysql --properties target-tables-config.json | meltano invoke target-postgres
cat target-tables-config.json
{
"streams": [
{
"tap_stream_id": "harri3_beta-job_setting",
"stream": "users",
"schema": {
"type": ["null", "object"],
"additionalProperties": false,
"properties": {
"publish_date": { "type": [ "null", "string"]},
...
"public_on": { "type": [ "null", "string"]},
...
"updated": { "type": [ "null", "string"]}
}
}
}
]
}
I tried to follow this but no luck yet https://github.com/singer-io/getting-started/blob/ca5c56f16e67e0c2da49e9bb94d6f52fb19c9de6/docs/DISCOVERY_MODE.md#schemas
https://docs.meltano.com/concepts/plugins#schema-extraanthony_g
02/07/2023, 1:02 PMthomas_briggs
02/07/2023, 1:41 PMfarid
02/07/2023, 2:02 PMfarid
02/07/2023, 2:49 PMplugins:
extractors:
- name: tap-mysql
variant: transferwise
pip_url: pipelinewise-tap-mysql
config:
...
metadata:
'*':
replication-method: INCREMENTAL
replication-key: updated
select:
- '!!(h_beta-job_setting.*).*'
- h_beta-job_setting.*
loaders:
- name: target-postgres
variant: transferwise
pip_url: pipelinewise-target-postgres
config:
...
mappers:
- name: transform-field
variant: transferwise
pip_url: pipelinewise-transform-field
mappings:
- name: transform-field-set-null
config:
transformations:
- tap_stream_name: h_beta-job_setting
field_id: public_on
type: SET-NULL
when:
- column: public_on
equals: "0000-00-00 00:00:00"
anthony_g
02/07/2023, 3:10 PManthony_g
02/07/2023, 3:11 PMmeltano run tap-mysql transform-field-set-null target-postgres
farid
02/07/2023, 3:18 PMfarid
02/07/2023, 3:30 PMfarid
02/07/2023, 3:37 PMmappings:
- name: transform-field-set-null
config:
transformations:
- tap_stream_name: h_beta-job_setting
field_id: public_on
type: SET-NULL
when:
- column: public_on
equals: '0000-00-00 00:00:00'
- tap_stream_name: h_beta-job_setting
field_id: switch_date
type: SET-NULL
when:
- column: switch_date
equals: '0000-00-00 00:00:00'
aaronsteers
02/07/2023, 6:21 PM'0000-00-00 00:00:00'
to be exported as NULL?farid
02/07/2023, 8:23 PMchristoph
02/07/2023, 8:55 PMIs it worth opening an issue on the tap to request timestamps ofThat sounds like the correct thing to do. There also is this entry 😁 https://github.com/MeltanoLabs/Singer-Most-Wanted/issues/73to be exported as NULL?'0000-00-00 00:00:00'
bubba
02/11/2023, 11:26 PM