Azure DataBricks - Deequ - 查找检查失败的行
Azure DataBricks - Deequ - Finding Rows that failed on a check
我关注了https://aws.amazon.com/blogs/big-data/test-data-quality-at-scale-with-deequ/
并得到 运行 检查和验证等
但我无法找出我的数据究竟在哪些行上出错。
这是一个非常重要的部分,我需要未通过检查的行。
我试过以下:https://github.com/awslabs/deequ/blob/master/src/test/scala/com/amazon/deequ/schema/RowLevelSchemaValidatorTest.scala
但是,我收到错误数据块,而 运行 来自此 link 的代码:
error: object SparkContextSpec is not a member of package com.amazon.deequ
import com.amazon.deequ.SparkContextSpec
^
command-4342528364312961:24: error: not found: type SparkContextSpec
class RowLevelSchemaValidatorTest extends WordSpec with SparkContextSpec {
^
command-4342528364312961:28: error: not found: value withSparkSession
"correctly enforce null constraints" in withSparkSession { sparkSession =>
^
command-4342528364312961:39: error: not found: value RowLevelSchema
val schema = RowLevelSchema()
^
command-4342528364312961:40: error: not found: value isNullable
.withIntColumn("id", isNullable = false)
这样的例子还在继续。
请帮忙。
谢谢
您遇到的问题可能是由于项目设置不正确造成的。您 运行 是 IDE 的测试吗?如果没有,我建议您确保代码(例如 IntelliJ)可以编译。然后应该可以从那里执行单元测试。
IntelliJ 附带一个允许导入项目的 Maven 插件。
我关注了https://aws.amazon.com/blogs/big-data/test-data-quality-at-scale-with-deequ/ 并得到 运行 检查和验证等
但我无法找出我的数据究竟在哪些行上出错。 这是一个非常重要的部分,我需要未通过检查的行。
我试过以下:https://github.com/awslabs/deequ/blob/master/src/test/scala/com/amazon/deequ/schema/RowLevelSchemaValidatorTest.scala 但是,我收到错误数据块,而 运行 来自此 link 的代码:
error: object SparkContextSpec is not a member of package com.amazon.deequ
import com.amazon.deequ.SparkContextSpec
^
command-4342528364312961:24: error: not found: type SparkContextSpec
class RowLevelSchemaValidatorTest extends WordSpec with SparkContextSpec {
^
command-4342528364312961:28: error: not found: value withSparkSession
"correctly enforce null constraints" in withSparkSession { sparkSession =>
^
command-4342528364312961:39: error: not found: value RowLevelSchema
val schema = RowLevelSchema()
^
command-4342528364312961:40: error: not found: value isNullable
.withIntColumn("id", isNullable = false)
这样的例子还在继续。
请帮忙。
谢谢
您遇到的问题可能是由于项目设置不正确造成的。您 运行 是 IDE 的测试吗?如果没有,我建议您确保代码(例如 IntelliJ)可以编译。然后应该可以从那里执行单元测试。
IntelliJ 附带一个允许导入项目的 Maven 插件。