Anyone familiar with `target-redshift` from Pipeli...
# plugins-general
d
Anyone familiar with
target-redshift
from Pipelinewise (link)? I seem to be encountering a bug and not sure if others have also run into it. In the function
persist_lines
we set
state = None
(link), but then pass it without modification to
flush_streams
.
flush_streams
then thinks it's a dictionary and calls get on it, which is an error. I have been using this target for a while and somehow only just now hit this error. I suppose we could set it to an empty dictionary instead but I'm not sure if this is the right fix.
e
Hi @daniel! Seems to be a known issue unfortunately: https://github.com/transferwise/pipelinewise-target-redshift/issues/69
this target fails if the tap does not issue a state.
The issue description suggests this happens when the tap doesn't emit a state, so I'm curious which tap caused your problem.
d
It almost seems worse than what that issue says. Am I reading the code wrong or can this line literally never succeed when we call
flush_streams
as we do here because
state
is always
None
?
e
Yeah, that line would never succeed, but that block seems to only be executed if the
flush_all_streams
setting is set to true: https://github.com/transferwise/pipelinewise-target-redshift/blob/80796b6c6e4647a85ddc9492e343547a027258e4/target_redshift/__init__.py#L330, so maybe that's a workaround?