Skip to content

feat(cdk): connector builder support for file uploader #503

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 18 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
file-mode-api: run ruff format
  • Loading branch information
aldogonzalez8 committed Apr 23, 2025
commit 3ea1674026016bc50bbcf2e9da52e5445b72c5c7
Original file line number Diff line number Diff line change
Expand Up @@ -3617,7 +3617,9 @@ def create_file_uploader(
requester=requester,
download_target_extractor=download_target_extractor,
config=config,
file_writer=NoopFileWriter() if emit_connector_builder_messages else LocalFileSystemFileWriter(),
file_writer=NoopFileWriter()
if emit_connector_builder_messages
else LocalFileSystemFileWriter(),
parameters=model.parameters or {},
filename_extractor=model.filename_extractor if model.filename_extractor else None,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def upload(self, record: Record) -> None:
)

if self.content_extractor:
raise NotImplementedError("Content extraction is not yet implemented. The content_extractor component is currently not supported.")
raise NotImplementedError(
"Content extraction is not yet implemented. The content_extractor component is currently not supported."
)
else:
files_directory = Path(get_files_directory())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

class NoopFileWriter(FileWriter):
NOOP_FILE_SIZE = -1

def write(self, file_path: Path, content: bytes) -> int:
"""
Noop file writer
Expand Down
1 change: 1 addition & 0 deletions unit_tests/sources/declarative/file/test_file_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from airbyte_cdk.test.state_builder import StateBuilder
from airbyte_cdk.sources.declarative.retrievers.file_uploader.noop_file_writer import NoopFileWriter


class ConfigBuilder:
def build(self) -> Dict[str, Any]:
return {
Expand Down
Loading