Skip to content

is_debug

laktory.dlt.is_debug ยค

is_debug()

Debug flag. If True, DLT readers are replaced with laktory functions allowing to run a notebook outside of a pipeline and preview the content of the output dataframe.

RETURNS DESCRIPTION
bool

Debug flag

Source code in laktory/dlt/__init__.py
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
def is_debug() -> bool:
    """
    Debug flag. If `True`, DLT readers are replaced with laktory functions
    allowing to run a notebook outside of a pipeline and preview the content
    of the output dataframe.

    Returns
    -------
    :
        Debug flag
    """
    try:
        import dlt
    except Exception:
        return True
    if spark.conf.get("pipelines.dbrVersion", None) is None:
        return True
    return False