This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/Dockerfile | |
FROM python:3.11-slim | |
WORKDIR /app | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
curl \ | |
software-properties-common \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import yaml, json | |
import matplotlib.pyplot as plt | |
dq_score, dashboards = st.tabs(['Data quality score', 'Dashboards']) | |
with dq_score: | |
st.title(f"""Data quality score""") | |
schema, checks = {}, {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from copy import deepcopy | |
from typing import Dict, Tuple, Any, Optional, Callable, List | |
from great_expectations.core import ExpectationConfiguration | |
from great_expectations.execution_engine import ( | |
ExecutionEngine | |
) | |
from great_expectations.expectations.expectation import TableExpectation | |
from great_expectations.exceptions.exceptions import InvalidExpectationKwargsError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Dict, Tuple, Any | |
from great_expectations.core.batch_spec import PathBatchSpec | |
from great_expectations.execution_engine import ( | |
SparkDFExecutionEngine, | |
PandasExecutionEngine | |
) | |
from great_expectations.expectations.metrics.metric_provider import metric_value | |
from great_expectations.expectations.metrics.table_metric_provider import ( | |
TableMetricProvider, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import Enum, auto | |
from statistics import mean | |
class SupportedComparisonEnum(Enum): | |
"""Enum class with the currently supported comparison type.""" | |
ABSOLUTE = auto() | |
MEAN = auto() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Custom table expectation which checks whether the row count is greater than the row count of other tables. | |
There are different ways to compare the row counts: | |
* With absolute values, if one row count value of the other tables is greater than the current then the validation | |
fails, | |
* With mean values, if the mean of value of the other tables row count is greater than the current row count then | |
the validation fails. | |
""" | |
from copy import deepcopy |