Skip to content

Only write airbyte messages to duckdb on read #38647

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

Merged
merged 2 commits into from
May 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async def _run(
http_dump=await self.http_proxy.retrieve_http_dump() if self.http_proxy else None,
executed_container=executed_container,
)
await execution_result.save_artifacts(self.output_dir, self.duckdb_path)
await execution_result.save_artifacts(self.output_dir, self.duckdb_path if airbyte_command == "read" else None)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a mapping like:

persist_command_to_duck_db = {
"read": True,
"write": True,
"spec": False,
"discover": False
}
Suggested change
await execution_result.save_artifacts(self.output_dir, self.duckdb_path if airbyte_command == "read" else None)
await execution_result.save_artifacts(self.output_dir, self.duckdb_path if persist_command_to_duck_db[airbyte_command] else None)

With a comment saying why we disable persistance on other commands?

return execution_result

async def _log_progress(self) -> None:
Expand Down
Loading