Skip to content

Instantly share code, notes, and snippets.

@a-chumagin
a-chumagin / Dockerfile
Last active October 13, 2022 13:46
GX quick check result
FROM python:3.7-slim-bullseye
RUN pip install great-expectations==0.15.26
COPY ./*.py /
ENTRYPOINT ["/usr/local/bin/python", "check.py"]
import great_expectations as gx
from great_expectations.data_context.types.base import DataContextConfig, FilesystemStoreBackendDefaults
import os
import logging
logging.basicConfig()
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
context_dir = os.path.abspath("./mysql-context")
@a-chumagin
a-chumagin / test-taxi-datasource.py
Created April 4, 2023 20:29
GX: checkpoint in parallel
import great_expectations as gx
from great_expectations.data_context.types.base import DataContextConfig, FilesystemStoreBackendDefaults
import os
from great_expectations.core.batch import RuntimeBatchRequest
import pytest
@pytest.fixture
def create_context():
context_dir = os.path.abspath("./tripdata")
@a-chumagin
a-chumagin / my_suite.json
Last active June 26, 2023 07:15
Params in test
{
"data_asset_type": null,
"expectation_suite_name": "my_suite",
"expectations": [
{
"expectation_type": "expect_column_values_to_be_between",
"kwargs": {
"column": {
"$PARAMETER": "column_name"
},