From 68575f29cf5166e44d6c3c0170d295d30f10f79f Mon Sep 17 00:00:00 2001 From: Peter Kosztolanyi Date: Mon, 4 Nov 2019 15:37:19 +0000 Subject: [PATCH] Update flushed_state only if state received from tap (#42) --- target_snowflake/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target_snowflake/__init__.py b/target_snowflake/__init__.py index 4f6eab9b..e3f43bb4 100644 --- a/target_snowflake/__init__.py +++ b/target_snowflake/__init__.py @@ -325,7 +325,7 @@ def flush_streams( # Update flushed streams if filter_streams: # update flushed_state position if we have state information for the stream - if stream in state.get('bookmarks', {}): + if state is not None and stream in state.get('bookmarks', {}): # Create bookmark key if not exists if 'bookmarks' not in flushed_state: flushed_state['bookmarks'] = {}