Redy Rozzaag
08/06/2024, 6:57 AM08:30:00
Then I got this error
time=2024-08-06 13:30:42 name=singer level=INFO message=METRIC: {"type": "timer", "metric": "job_duration", "value": 0.06214737892150879, "tags": {"job_type": "sync_table", "database": "", "table": "", "status": "succeeded"}} cmd_type=elb consumer=False job_name=dev:tap-mysql-to-target-postgres name=tap-mysql producer=True run_id=e3d8d66d-433b-4aef-a710-36b824334e4b stdio=stderr string_id=tap-mysql
2024-08-06T06:30:42.225210Z [info ] date_val = time_fromisoformat(date_val) cmd_type=elb consumer=True job_name=dev:tap-mysql-to-target-postgres name=target-postgres producer=False run_id=e3d8d66d-433b-4aef-a710-36b824334e4b stdio=stderr string_id=target-postgres
2024-08-06T06:30:42.225210Z [info ] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cmd_type=elb consumer=True job_name=dev:tap-mysql-to-target-postgres name=target-postgres producer=False run_id=e3d8d66d-433b-4aef-a710-36b824334e4b stdio=stderr string_id=target-postgres
2024-08-06T06:30:42.225210Z [info ] ValueError: Invalid isoformat string: '8:30:00' cmd_type=elb consumer=True job_name=dev:tap-mysql-to-target-postgres name=target-postgres producer=False run_id=e3d8d66d-433b-4aef-a710-36b824334e4b stdio=stderr string_id=target-postgres
It reads 8:30:00
, singer related, have any of you guys face and solve this one?Redy Rozzaag
08/06/2024, 7:52 AM\my-meltano-project\.meltano\loaders\target-postgres\venv\Lib\site-packages\singer_sdk\sinks\core.py
And added this code on line 556
date_val = '0' + date_val if len(date_val) == 7 else date_val
But I think the change should be done on the root cause, not this hackEdgar Ramírez (Arch.dev)
08/06/2024, 5:20 PM8:30:00
is indeed not a valid isoformat time by looking at https://datatracker.ietf.org/doc/html/rfc3339#section-5.6.
So, in my opinion it'd be the tap job to fix that but I'm open to make the targets more resilient by handling these cases: https://github.com/meltano/sdk/issues/2591.
Just curious, which variant of tap-mysql is this?Redy Rozzaag
08/07/2024, 1:59 AMJust curious, which variant of tap-mysql is this?This tap @Edgar Ramírez (Arch.dev)
- name: tap-mysql
variant: transferwise
pip_url: pipelinewise-tap-mysql
So, in my opinion it'd be the tap job to fix that but I'm open to make the targets more resilient by handling these cases:Sorry couldn't provide better solution, was in the middle of POC for next month project, so I'm currently doing quick trial for my data stack, previously trying Airbyte but I find Meltano is more controllable for me
Edgar Ramírez (Arch.dev)
08/07/2024, 2:08 AMI find Meltano is more controllable for meThat's nice to hear! Ok, I think I've identified the root cause in the tap: https://github.com/transferwise/pipelinewise-tap-mysql/blob/b86a4c11394535d277368583b52010cedff24dd3/tap_mysql/sync_strategies/common.py#L106 There's even a comment there, but the result is the contrary:
>>> import datetime
>>> str(datetime.timedelta(hours=8, minutes=30))
'8:30:00'
Edgar Ramírez (Arch.dev)
08/07/2024, 2:30 AMEdgar Ramírez (Arch.dev)
08/07/2024, 3:52 AMRedy Rozzaag
08/07/2024, 6:10 AMEdgar Ramírez (Arch.dev)
08/07/2024, 4:49 PMbut at least that branch in my PR should work.Would you like giving it a try?
plugins:
extractors:
- name: tap-mysql
pip_url: git+<https://github.com/edgarrmondragon/pipelinewise-tap-mysql.git@patch-1>
should do the trick 🙂Redy Rozzaag
08/09/2024, 4:05 AM