是否可以将建议的约束保存到文件中,然后将它们加载为 cheks?我能够做到这一点而无需使用下一个代码保存它们
val allConstraints = suggestionResult.constraintSuggestions.flatMap {
case (_, suggestions) =>
suggestions.map {
_.constraint
}
}.toSeq
val generatedCheck = Check(CheckLevel.Error, "generated constraints", allConstraints)
val verificationResult: VerificationResult = {
VerificationSuite()
.onData(tested_df)
.addCheck(generatedCheck)
.run()
}
但是我想将它们保存到文件中并在需要时应用它们?有没有办法做到这一点?