-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[dagster-airlift][datasets 3/3] dataset filtering #29164
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
Conversation
da21f73
to
63fbddc
Compare
3c88083
to
3812316
Compare
if ( | ||
retrieval_filter.dataset_uri_ilike | ||
and retrieval_filter.dataset_uri_ilike not in dataset.uri | ||
): |
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 current implementation checks for substring presence with retrieval_filter.dataset_uri_ilike not in dataset.uri
, which doesn't accurately simulate SQL's ILIKE operator behavior. For better fidelity with the real implementation, consider using case-insensitive pattern matching (e.g., with regex) or at minimum a case-insensitive substring check. This would more closely match how ILIKE works in the actual SQL queries used by the production code.
if ( | |
retrieval_filter.dataset_uri_ilike | |
and retrieval_filter.dataset_uri_ilike not in dataset.uri | |
): | |
if ( | |
retrieval_filter.dataset_uri_ilike | |
and retrieval_filter.dataset_uri_ilike.lower() not in dataset.uri.lower() | |
): |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
) -> Sequence["Dataset"]: | ||
params: dict[str, Any] = {"limit": limit, "offset": offset} | ||
if retrieval_filter.dataset_uri_ilike: | ||
params["uri_pattern"] = retrieval_filter.dataset_uri_ilike |
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.
would prefer to match the python name to the REST API name, e.g. just rename dataset_uri_ilike
to dataset_uri_pattern
.
63fbddc
to
339f24e
Compare
3812316
to
28ea70e
Compare
339f24e
to
de133c2
Compare
ae9608c
to
730f322
Compare
de133c2
to
d67e1e0
Compare
730f322
to
ccef52b
Compare
d67e1e0
to
2b29b96
Compare
ccef52b
to
fb6bb06
Compare
2b29b96
to
54e61fb
Compare
fb6bb06
to
c375273
Compare
54e61fb
to
0eeaed4
Compare
c375273
to
4f62ded
Compare
0eeaed4
to
0cbd753
Compare
4f62ded
to
c1b22dd
Compare
…de path; other refactors (#29206) ## Summary & Motivation Right now we're separately coercing specs to assets definitions across many different code paths. Instead consolidate into a single code path. Additionally, get rid of the build_defs method on the state loader. We're not using it, we're instead pulling state out of thin air using get_or_fetch_state. ## How I Tested These Changes Existing tests
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 4e0e816. |
Summary & Motivation
Adds filtering properties for datasets.
How I Tested These Changes
Additional tests.
Changelog