Skip to content
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

[CONTRIB] ExpectColumnValuesToBePresentInOtherTable - Wording update #9151

Merged
merged 6 commits into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _prescriptive_renderer(

template_dict = configuration.kwargs.get("template_dict")

template_str = "All values in column $foreign_key_column are present in column $primary_key_column_in_foreign_table of table $foreign_table. (Observed Value is the number of missing values)."
template_str = "All values in column $foreign_key_column are present in column $primary_key_column_in_foreign_table of table $foreign_table."

params = {
"foreign_key_column": template_dict["foreign_key_column"],
Expand Down Expand Up @@ -163,7 +163,10 @@ def _validate(
self._validate_template_dict(configuration)
final_value = metrics.get("query.template_values")[0]["COUNT(1)"]
return ExpectationValidationResult(
success=(final_value == 0), result={"observed_value": final_value}
success=(final_value == 0),
result={
"observed_value": f"{final_value} missing item{'s' if final_value != 1 else ''}"
},
)

examples = [
Expand Down