Great Expectations: base_directory must be an absolute path if root_directory is not provided

Viewed 1560

This is about Great Expectations module in python primarily used for data quality checks (I found their documentation to be inadequate). So I've been trying to set up the data context on my notebook (using a local datasource) - as mentioned in:

https://docs.greatexpectations.io/en/latest/guides/how_to_guides/configuring_data_contexts/how_to_instantiate_a_data_context_without_a_yml_file.html#how-to-guides-configuring-data-contexts-how-to-instantiate-a-data-context-without-a-yml-file

Following is my code :

from great_expectations.data_context.types.base import DataContextConfig
from great_expectations.data_context.types.base import DatasourceConfig
from great_expectations.data_context.types.base import FilesystemStoreBackendDefaults
from great_expectations.data_context import BaseDataContext

data_context_config = DataContextConfig(
    datasources={
        "debaprc_test": DatasourceConfig(
            class_name="PandasDatasource",
            batch_kwargs_generators={
                "subdir_reader": {
                    "class_name": "SubdirReaderBatchKwargsGenerator",
                    "base_directory": "/Users/debaprc/Downloads"              
                }
            },
        )
    },
    store_backend_defaults=FilesystemStoreBackendDefaults(root_directory="/Users/debaprc/GE_Test/New/")
)

context = BaseDataContext(project_config=data_context_config)

And this is the error I get:

base_directory must be an absolute path if root_directory is not provided

What am I doing wrong?

1 Answers

Thank you so much for using Great Expectations. That is a known issue with our latest upgrade of the Checkpoints feature, which was fixed on our develop branch. Please install from the develop branch or wait until our next release 0.13.9 coming this week.

Related