nick_hamlin
03/23/2021, 2:19 PMpipelinewise-target-redshift
where a pipeline will run just fine for quite a while, then fail because of an apparent issue reading a bookmark out of the state. Here’s a snippet of the logs:
pipelinewise-target-redshift | if stream in state.get('bookmarks', {}):
pipelinewise-target-redshift | AttributeError: 'NoneType' object has no attribute 'get'
meltano | [Errno 32] Broken pipe
Has anyone else run into this? So far I’ve only seen it happen with tap-mailchimp
, but it seems to be inconsistent. I’ll load a particular table and it’ll run fine, but may fail on a subsequent reload.nick_hamlin
03/23/2021, 2:20 PMgunnar
03/23/2021, 2:22 PMnick_hamlin
03/23/2021, 3:13 PMdouwe_maan
03/23/2021, 3:14 PMSTATE
message (which would result in the state
variable never getting a value other than None
), but tap-mailchimp does write state under various circumstances, e.g. https://github.com/singer-io/tap-mailchimp/blob/af00aa1a421221e8df536dfbb4f8f87b01e1ef85/tap_mailchimp/sync.py#L142. But perhaps when you're seeing the error, it's not. You could confirm this by running the pipeline with meltano --log-level=debug elt
which will show you any STATE message that the tap (doesn't) emit.
It looks like enabling the flush_all_streams
setting on the target would work around the offending code path: https://github.com/transferwise/pipelinewise-target-redshift/blob/12f79884f4d5947e7c1647b87a555bfeff625771/target_redshift/__init__.py#L182
Either way I'd consider this a bug in the target that you may want to fix; it shouldn't fail when the tap doesn't output state.nick_hamlin
03/23/2021, 3:16 PMnick_hamlin
03/25/2021, 3:54 PMflush_all_streams
did appear to solve this problem, and that I didn’t notice any of the potential performance issues they warn about in the docs (that’s not to say there weren’t any, but they weren’t material)