-
Notifications
You must be signed in to change notification settings - Fork 24
fix(connector-builder): fix property chunking in connector builder #567
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
aldogonzalez8
merged 11 commits into
main
from
ac8/fix-property-chinking-in-connector-builder
Jun 2, 2025
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a53540d
Add property additional_query_properties param to SimpleRetrieverTest…
aldogonzalez8 925dc88
ruff format
aldogonzalez8 d0e7c7d
make SimpleRetrieverTestReadDecorator when no read enabled mode required
aldogonzalez8 335981e
remove SimpleRetrieverTestReadDecorator and use StreamSlicerTestReadD…
aldogonzalez8 ca07d1a
enhance unit tests
aldogonzalez8 c1435f5
make decorated instance can pass is_instance check as wrapped object
aldogonzalez8 ee498b1
minor fix to test
aldogonzalez8 b052a89
make StreamSlicerTestReadDecorator a child class of base StreamSlicer
aldogonzalez8 3372590
fix wrong check
aldogonzalez8 8aba62e
minor refactor to tests and add test for limit slices
aldogonzalez8 fa5e35f
more testing for StreamSlicerTestReadDecorator
aldogonzalez8 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
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
airbyte_cdk/sources/declarative/stream_slicers/stream_slicer_test_read_decorator.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Copyright (c) 2025 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
from dataclasses import dataclass | ||
from itertools import islice | ||
from typing import Any, Iterable, Mapping, Optional, Union | ||
|
||
from airbyte_cdk.sources.streams.concurrent.partitions.stream_slicer import StreamSlicer | ||
from airbyte_cdk.sources.types import StreamSlice, StreamState | ||
|
||
|
||
@dataclass | ||
class StreamSlicerTestReadDecorator(StreamSlicer): | ||
""" | ||
In some cases, we want to limit the number of requests that are made to the backend source. This class allows for limiting the number of | ||
slices that are queried throughout a read command. | ||
""" | ||
|
||
wrapped_slicer: StreamSlicer | ||
maximum_number_of_slices: int = 5 | ||
|
||
def stream_slices(self) -> Iterable[StreamSlice]: | ||
return islice(self.wrapped_slicer.stream_slices(), self.maximum_number_of_slices) | ||
|
||
def __getattr__(self, name: str) -> Any: | ||
# Delegate everything else to the wrapped object | ||
return getattr(self.wrapped_slicer, name) |
24 changes: 21 additions & 3 deletions
24
airbyte_cdk/sources/streams/concurrent/partitions/stream_slicer.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.