Esempio n. 1
0
def test_check_happy_path_existence():
    job = DataValidationJob(
        region_code='US_VA',
        validation=DataValidationCheck(
            validation_type=ValidationCheckType.EXISTENCE,
            view=BigQueryView(
                dataset_id='my_dataset',
                view_id='test_view',
                view_query_template='select * from literally_anything')))
    check_class = check_resolver.checker_for_validation(job)

    assert isinstance(check_class, ExistenceValidationChecker)
Esempio n. 2
0
    def test_check_happy_path_existence(self) -> None:
        job = DataValidationJob(
            region_code="US_VA",
            validation=ExistenceDataValidationCheck(
                validation_type=ValidationCheckType.EXISTENCE,
                view=BigQueryView(
                    dataset_id="my_dataset",
                    view_id="test_view",
                    view_query_template="select * from literally_anything",
                ),
            ),
        )
        check_class = check_resolver.checker_for_validation(job)

        assert isinstance(check_class, ExistenceValidationChecker)
Esempio n. 3
0
def _run_job(job: DataValidationJob) -> DataValidationJobResult:
    validation_checker = checker_for_validation(job)
    return validation_checker.run_check(job)