Example #1
0
 def from_fixed_length_tuple(cls, tuple_):
     if len(tuple_) != 4:
         raise GreatExpectationsError(
             "ValidationMetricIdentifier fixed length tuple must have exactly four "
             "components."
         )
     return cls(
         run_id=tuple_[0],
         expectation_suite_identifier=ExpectationSuiteIdentifier.from_fixed_length_tuple(
             tuple((tuple_[1],))
         ),
         metric_name=tuple_[2],
         metric_kwargs_id=tuple_[3],
     )
Example #2
0
 def from_fixed_length_tuple(cls, tuple_):
     if len(tuple_) != 6:
         raise GreatExpectationsError(
             "ValidationMetricIdentifier fixed length tuple must have exactly six "
             "components."
         )
     if tuple_[2] == "__":
         tuple_data_asset_name = None
     else:
         tuple_data_asset_name = tuple_[2]
     metric_id = MetricIdentifier.from_tuple(tuple_[-2:])
     return cls(
         run_id=RunIdentifier.from_fixed_length_tuple((tuple_[0], tuple_[1])),
         data_asset_name=tuple_data_asset_name,
         expectation_suite_identifier=ExpectationSuiteIdentifier.from_fixed_length_tuple(
             tuple((tuple_[3],))
         ),
         metric_name=metric_id.metric_name,
         metric_kwargs_id=metric_id.metric_kwargs_id,
     )