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

Fix CopyIncrementally with no data #54

Merged
merged 3 commits into from
Mar 8, 2021
Merged

Conversation

jankatins
Copy link
Member

Main thing is the last commit which handled the case that the last modification comparison query does not return any value but still succeeds (=would load no data). In that case we now succeed the copy task but don't actually attempt to load data.

This also adjusts the printed messages from Copy to be more readable (I hope) and adds imports and asserts to make my IDE happy...

We have that for partitioned tables where the time based query does not find any data for several hours.
@@ -163,7 +165,7 @@ def target_db_alias(self):
return self._target_db_alias or config.default_db_alias()

def file_path(self) -> pathlib.Path:
return self.parent.parent.base_path() / self.file_name
return self.parent.parent.base_path() / self.sql_file_name
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have error'd -> not used?

@martin-loetzsch martin-loetzsch merged commit a65151f into master Mar 8, 2021
@martin-loetzsch martin-loetzsch deleted the fix_copy_with_no_data branch March 8, 2021 22:39
martin-loetzsch added a commit that referenced this pull request Mar 8, 2021
- Fix CopyIncrementally with no data (#54)
- Add ability to specify modification value type in CopyIncrementally (#53)	66e7dc1	Jan Katins <jan.katins@zenjob.com>	4. Mar 2021 at 22:06
- Fix read stderr during command execution (#47)
- Use echo_queries from mara_db.config.default_echo_queries (#58)
- Include all versioned package files in wheel
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 this pull request may close these issues.

2 participants