You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Great Expectations能否配置Validation Result Store到Snowflake?求配置方法

配置Great Expectations的Validation Result Store到Snowflake数据库

可以将Great Expectations(GE)的Validation Result Store配置到Snowflake数据库,并且支持自动创建存储验证结果的表。以下是具体配置步骤:

1. 安装必要依赖

确保安装Snowflake Python连接器和GE:

pip install snowflake-connector-python great-expectations

2. 修改Great Expectations配置文件

2.1 配置Validation Result Store

在great_expectations.yml文件中,找到stores节点,添加Snowflake类型的验证结果存储配置:

stores:
  # 保留原有其他store配置(如expectation_store等)
  validation_result_store:
    class_name: ValidationResultStore
    store_backend:
      class_name: DatabaseStoreBackend
      credentials: ${snowflake_credentials}
      table_name: ge_validation_results  # 自定义存储验证结果的表名
      schema_name: YOUR_TARGET_SCHEMA     # Snowflake中目标schema名称
      database_name: YOUR_TARGET_DATABASE # Snowflake中目标database名称
      dialect: snowflake                  # 指定Snowflake方言
      create_table_if_not_exists: true    # 开启自动建表功能

2.2 配置Snowflake连接凭据

在config_variables.yml文件中添加Snowflake的连接信息:

snowflake_credentials:
  account: YOUR_SNOWFLAKE_ACCOUNT  # 格式如xyz12345.us-west-2
  user: YOUR_USERNAME
  password: YOUR_PASSWORD
  warehouse: YOUR_WAREHOUSE_NAME
  role: YOUR_ROLE_NAME             # 需具备目标database/schema的读写及建表权限

3. 验证配置有效性

运行一次Checkpoint验证任务,触发GE生成验证结果:

great_expectations checkpoint run YOUR_CHECKPOINT_NAME

执行完成后,登录Snowflake控制台,检查指定database/schema下的ge_validation_results表是否自动创建,且表中已写入验证结果数据。

注意:确保Snowflake账号拥有目标schema下的CREATE TABLE及INSERT权限,否则自动建表或写入数据会失败。

内容的提问来源于stack exchange,提问作者unkind58

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.28 17:07:11