微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

远大期望:如果没有提供 root_directory,base_directory 必须是绝对路径

如何解决远大期望:如果没有提供 root_directory,base_directory 必须是绝对路径

这是关于 Python 中的 Great Expectations 模块,主要用于数据质量检查(我发现他们的文档不够充分)。所以我一直在尝试在我的笔记本上设置数据上下文(使用本地数据源) - 如:

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

以下是我的代码

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)

这是我得到的错误

base_directory must be an absolute path if root_directory is not provided

我做错了什么?

解决方法

非常感谢您使用远大期望。这是我们最新升级的检查点功能的一个已知问题,该功能已在我们的开发分支上修复。请从开发分支安装或等待我们本周发布的下一个 0.13.9 版本。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。