For future reference, here’s the code for getting the Expectations with the mostly
parameter:
from inspect import signature
import great_expectations.expectations as gxe
from great_expectations.expectations import *
# Prints out all the Expectations and some more
# Manually copy over all the expectations
dir(gxe)
all_expectations = [
ExpectColumnDistinctValuesToBeInSet,
ExpectColumnDistinctValuesToContainSet,
ExpectColumnDistinctValuesToEqualSet,
ExpectColumnKLDivergenceToBeLessThan,
ExpectColumnMaxToBeBetween,
ExpectColumnMeanToBeBetween,
ExpectColumnMedianToBeBetween,
ExpectColumnMinToBeBetween,
ExpectColumnMostCommonValueToBeInSet,
ExpectColumnPairValuesAToBeGreaterThanB,
ExpectColumnPairValuesToBeEqual,
ExpectColumnPairValuesToBeInSet,
ExpectColumnProportionOfUniqueValuesToBeBetween,
ExpectColumnQuantileValuesToBeBetween,
ExpectColumnStdevToBeBetween,
ExpectColumnSumToBeBetween,
ExpectColumnToExist,
ExpectColumnUniqueValueCountToBeBetween,
ExpectColumnValueLengthsToBeBetween,
ExpectColumnValueLengthsToEqual,
ExpectColumnValueZScoresToBeLessThan,
ExpectColumnValuesToBeBetween,
ExpectColumnValuesToBeDateutilParseable,
ExpectColumnValuesToBeDecreasing,
ExpectColumnValuesToBeInSet,
ExpectColumnValuesToBeInTypeList,
ExpectColumnValuesToBeIncreasing,
ExpectColumnValuesToBeJsonParseable,
ExpectColumnValuesToBeNull,
ExpectColumnValuesToBeOfType,
ExpectColumnValuesToBeUnique,
ExpectColumnValuesToMatchJsonSchema,
ExpectColumnValuesToMatchLikePattern,
ExpectColumnValuesToMatchLikePatternList,
ExpectColumnValuesToMatchRegex,
ExpectColumnValuesToMatchRegexList,
ExpectColumnValuesToMatchStrftimeFormat,
ExpectColumnValuesToNotBeInSet,
ExpectColumnValuesToNotBeNull,
ExpectColumnValuesToNotMatchLikePattern,
ExpectColumnValuesToNotMatchLikePatternList,
ExpectColumnValuesToNotMatchRegex,
ExpectColumnValuesToNotMatchRegexList,
ExpectCompoundColumnsToBeUnique,
ExpectMulticolumnSumToEqual,
ExpectMulticolumnValuesToBeUnique,
ExpectSelectColumnValuesToBeUniqueWithinRecord,
ExpectTableColumnCountToBeBetween,
ExpectTableColumnCountToEqual,
ExpectTableColumnsToMatchOrderedList,
ExpectTableColumnsToMatchSet,
ExpectTableRowCountToBeBetween,
ExpectTableRowCountToEqual,
ExpectTableRowCountToEqualOtherTable,
]
expectations_with_mostly_parameter = [str(expectation).rsplit(".")[-1].split("'")[0] for expectation in all_expectations if "mostly" in signature(expectation).parameters]
for expectation in expectations_with_mostly_parameter:
print(expectation)
expectations_without_mostly_parameter = [str(expectation).rsplit(".")[-1].split("'")[0] for expectation in all_expectations if "mostly" not in signature(expectation).parameters]
for expectation in expectations_without_mostly_parameter:
print(expectation)