https://github.com/great-expectations/great_expectations/blob/develop/great_expectations/expectations/core/expect_column_values_to_be_of_type.py
ExpectColumnValuesToBeOfType - is not returning expected result format described in the https://greatexpectations.io/expectations/expect_column_values_to_be_of_type/
On the success/failure case Result format should contain - element_count,unexpected_count etc fields,
Rather it is having only ObservedType in the output.
"exception_info": {
"raised_exception": false,
"exception_traceback": null,
"exception_message": null
},
"result": {
"element_count": 3,
"unexpected_count": 0,
"unexpected_percent": 0.0,
"partial_unexpected_list": [],
"missing_count": 0,
"missing_percent": 0.0,
"unexpected_percent_total": 0.0,
"unexpected_percent_nonmissing": 0.0
},
"meta": {},
"success": true
}
- Operating System: Windows
- Great Expectations Version: 0.18
- Data Source: Databricks/Spark
- Cloud environment: Databricks
The sample code, I have got from data quality rule - expect_column_values_to_be_null.py
from https://github.com/great-expectations/great_expectations/blob/develop/great_expectations/expectations/core/expect_column_values_to_be_null.py
Result_format is not defined as similar to above data quality rule for expect_column_values_to_be_of_type
from great_expectations.expectations.expectation_configuration import (
parse_result_format,
)
return _format_map_output(
result_format=parse_result_format(result_format),
success=success,
element_count=metrics.get("table.row_count"),
nonnull_count=nonnull_count,
unexpected_count=metrics.get(
f"{self.map_metric}.{SummarizationMetricNameSuffixes.UNEXPECTED_COUNT.value}"
),
unexpected_list=metrics.get(
f"{self.map_metric}.{SummarizationMetricNameSuffixes.UNEXPECTED_VALUES.value}"
),
unexpected_index_list=metrics.get(
f"{self.map_metric}.{SummarizationMetricNameSuffixes.UNEXPECTED_INDEX_LIST.value}"
),
unexpected_index_query=metrics.get(
f"{self.map_metric}.{SummarizationMetricNameSuffixes.UNEXPECTED_INDEX_QUERY.value}"
)
https://github.com/great-expectations/great_expectations/blob/develop/great_expectations/expectations/core/expect_column_values_to_be_of_type.py
ExpectColumnValuesToBeOfType - is not returning expected result format described in the https://greatexpectations.io/expectations/expect_column_values_to_be_of_type/
On the success/failure case Result format should contain - element_count,unexpected_count etc fields,
Rather it is having only ObservedType in the output.
"exception_info": {
"raised_exception": false,
"exception_traceback": null,
"exception_message": null
},
"result": {
"element_count": 3,
"unexpected_count": 0,
"unexpected_percent": 0.0,
"partial_unexpected_list": [],
"missing_count": 0,
"missing_percent": 0.0,
"unexpected_percent_total": 0.0,
"unexpected_percent_nonmissing": 0.0
},
"meta": {},
"success": true
}
The sample code, I have got from data quality rule - expect_column_values_to_be_null.py
from https://github.com/great-expectations/great_expectations/blob/develop/great_expectations/expectations/core/expect_column_values_to_be_null.py
Result_format is not defined as similar to above data quality rule for expect_column_values_to_be_of_type
from great_expectations.expectations.expectation_configuration import (
parse_result_format,
)
return _format_map_output(
result_format=parse_result_format(result_format),
success=success,
element_count=metrics.get("table.row_count"),
nonnull_count=nonnull_count,
unexpected_count=metrics.get(
f"{self.map_metric}.{SummarizationMetricNameSuffixes.UNEXPECTED_COUNT.value}"
),
unexpected_list=metrics.get(
f"{self.map_metric}.{SummarizationMetricNameSuffixes.UNEXPECTED_VALUES.value}"
),
unexpected_index_list=metrics.get(
f"{self.map_metric}.{SummarizationMetricNameSuffixes.UNEXPECTED_INDEX_LIST.value}"
),
unexpected_index_query=metrics.get(
f"{self.map_metric}.{SummarizationMetricNameSuffixes.UNEXPECTED_INDEX_QUERY.value}"
)