-
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
[BUGFIX] Show FDS Asset name in DataDocs #9950
Conversation
batch_kwargs = validation_results.meta.get("batch_kwargs", {}) | ||
batch_spec = validation_results.meta.get("batch_spec", {}) |
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.
One of both of these may be going away in V1 but active_batch_definition
will still be present.
def _resolve_asset_name(validation_results: ExpectationValidationResult) -> str | None: | ||
""" | ||
Resolve the asset name from the validation results meta data. | ||
FDS does not store data_asset_name in batch_kwargs or batch_spec and it must be | ||
pulled from the active batch definition. | ||
""" |
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.
@morphatic Thanks so much for the detailed issue description.
I ended up using exactly what you suggested.
Would you like me to make you a CoAuthor on this PR?
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.
Glad it helped! I would not complain about being listed as a co-author. Thank you for asking!
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.
Thank you!
@@ -4832,7 +4839,7 @@ def get_validation_result( # noqa: PLR0913 | |||
# run_id_set = set([key.run_id for key in filtered_key_list]) | |||
if len(filtered_key_list) == 0: | |||
logger.warning("No valid run_id values found.") | |||
return {} | |||
return {} # type: ignore[return-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.
Maybe make the return type a union with a dict so you don't have to ignore this here? This may cause you to assert at the call sites though.
Co-authored-by: morphatic <morphatic@users.noreply.github.com>
Fix missing
Asset Name
for Fluent Datasources in the Datadocs Home/index page.See issue below for detailed description of the problem.
Also updates some related type annotations.
Before
After