-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Source Greenhouse: unpin CDK #35988
Source Greenhouse: unpin CDK #35988
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@@ -17,7 +17,7 @@ include = "source_greenhouse" | |||
|
|||
[tool.poetry.dependencies] | |||
python = "^3.9,<3.12" | |||
airbyte-cdk = "==0.63.2" | |||
airbyte-cdk = "^0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to use ">=0.63.2", but not blocking on this one.
@@ -109,11 +110,14 @@ def stream_slices(self) -> Iterable[StreamSlice]: | |||
sync_mode=SyncMode.full_refresh, cursor_field=None, stream_slice=parent_stream_slice, stream_state=None | |||
): | |||
parent_state_value = parent_record.get(self.parent_key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there is no parent_state_value
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took another look, and now realizing the variable name is a bit misleading. This is set to the value of the current parent record's primary key, so we can assume it always exists. I've updated the variable name to parent_primary_key
for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nits. In particular please get rid of the extra print statement before merging. But don't need to block on approval
@@ -25,7 +25,8 @@ def __post_init__(self, parameters: Mapping[str, Any]): | |||
self._state = {} | |||
|
|||
def stream_slices(self) -> Iterable[StreamSlice]: | |||
yield {self.request_cursor_field: self._state.get(self.cursor_field, self.START_DATETIME)} | |||
slice = StreamSlice(partition={}, cursor_slice={self.request_cursor_field: self._state.get(self.cursor_field, self.START_DATETIME)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if we're only yielding one slice in the subsequent line, can we just do this in one line instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
parent_primary_key = parent_record.get(self.parent_key) | ||
|
||
partition = {self.stream_slice_field: parent_primary_key} | ||
print(self.stream_slice_field) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra print statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh whoops! Thanks for catching, removed
What
Unpinning CDK version for source Greenhouse.
How