Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target overwrites state if no state message is sent #52

Closed
shopmatfournier opened this issue Jun 5, 2023 · 0 comments · Fixed by #53
Closed

target overwrites state if no state message is sent #52

shopmatfournier opened this issue Jun 5, 2023 · 0 comments · Fixed by #53

Comments

@shopmatfournier
Copy link
Contributor

shopmatfournier commented Jun 5, 2023

The target does not check whether or not the state object exists when it writes out the state here: https://github.com/z3z1ma/target-bigquery/blob/main/target_bigquery/target.py#L529 . If no state message is processed, the target will write out the empty dictionary as the updated state, overwriting any existing state.

Suggested fix: before writing state, check if the state exists. If it does not exist, do not write an empty state message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant