-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[2/n][dagster-sling] Move logic to default fns in DagsterSlingTranslator #27140
base: maxime/sling-asset-spec-1
Are you sure you want to change the base?
[2/n][dagster-sling] Move logic to default fns in DagsterSlingTranslator #27140
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b4209ba
to
741906e
Compare
03baef5
to
0dfb519
Compare
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.
makes sense to me!
741906e
to
63ae4eb
Compare
0dfb519
to
a2508f5
Compare
@@ -155,6 +194,32 @@ def get_deps_asset_key(self, stream_name: str) -> AssetKey: | |||
return AssetKey(map[stream_name]) | |||
|
|||
""" | |||
return self._default_deps_fn(stream_definition) | |||
|
|||
def _default_deps_fn(self, stream_definition: Mapping[str, Any]) -> Iterable[AssetKey]: |
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.
The parameter type in the function signature is incorrect. The method accepts stream_definition: Mapping[str, Any]
but the docstring still references stream_name: str
. This should be updated to match the actual implementation and maintain consistency with the other translator methods.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
Summary & Motivation
Move the logic in
DagsterSlingTranslator.get_*
methods toDagsterSlingTranslator._default_*_fn
methodsThis is motivated by two main reasons:
get_asset_spec
implementation as clean as possible in subsequent PR.DagsterSlingTranslator.get_*
methods will be deprecated in a subsequent PR, but it would be great to keep to docstrings in the code after these will be removed, to help users if needed.How I Tested These Changes
Existing tests with BK