Last active
January 27, 2021 07:50
-
-
Save velotiotech/fdac31b374024041672780f77bedf5d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val constraintResult = { ConstraintSuggestionRunner() | |
.onData(data) | |
.addConstraintRules(Rules.DEFAULT) | |
.run() | |
} | |
val suggestionsDF = constraintResult.constraintSuggestions.flatMap { | |
case (column, suggestions) => | |
suggestions.map { constraint => | |
(column, constraint.description, constraint.codeForConstraint) | |
} | |
}.toSeq.toDS() | |
suggestionsDF.select("_1","_2").show(false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment