【发布时间】:2022-06-13 12:24:26
【问题描述】:
我有这样的数据:
[ {
"name": "Apple",
"price": 1,
"type": "Food"
},
{
"name": "Apple",
"price": 0.90,
"type": "Food"
},
{
"name": "Apple",
"price": 1000,
"type": "Computer"
},
{
"name": "Apple",
"price": 900,
"type": "Computer"
}
]
使用 Great Expectations 自动配置文件,price 的有效范围是 0.90 到 1,000。是否有可能让它在type 维度上切片,所以食物会是0.90 到1,而计算机会是900 到1000?还是我需要先使用 dbt 转换数据?我知道将创建维度的列,但我不知道具体的值。
另外,关于行之间差异的相同问题。就像他们有一个时间戳,而不是 900 到 1000,它会验证 -100 的值变化。
【问题讨论】:
-
您需要按多少种类型进行分组? 2,10,100?
-
您已标记 dbt;你是在 Python 中使用 Great Expectations,还是使用 dbt 端口 github.com/calogica/dbt-expectations?
-
@tconbeer ge 在 python 中。 dbt 是 DAG 的一部分
-
@sgdata 我不知道。它来自我定期轮询的提要,我正在寻找重大变化。也许最好做更多的转换,并创建一个百分比变化表。