[
https://issues.apache.org/jira/browse/GRIFFIN-289?focusedWorklogId=318834&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318834
]
ASF GitHub Bot logged work on GRIFFIN-289:
------------------------------------------
Author: ASF GitHub Bot
Created on: 26/Sep/19 06:55
Start Date: 26/Sep/19 06:55
Worklog Time Spent: 10m
Work Description: LittleZhao commented on pull request #538:
[GRIFFIN-289]New feature for griffin COMPLETENESS dq type
URL: https://github.com/apache/griffin/pull/538#discussion_r328460227
##########
File path:
measure/src/main/scala/org/apache/griffin/measure/configuration/dqdefinition/DQConfig.scala
##########
@@ -206,3 +211,23 @@ case class RuleOutputParam( @JsonProperty("type") private
val outputType: String
def validate(): Unit = {}
}
+
+/**
+ * error configuration parameter
+ * @param columnName the name of the column
+ * @param errorType the way to match error, regex or enumeration
+ * @param values error value list
+ */
+@JsonInclude(Include.NON_NULL)
+case class RuleErrorConfParam( @JsonProperty("column.name") private val
columnName: String,
+ @JsonProperty("type") private val errorType:
String,
+ @JsonProperty("values") private val values:
List[String]
+ ) extends Param {
+ def getColumnName: Option[String] = if (StringUtils.isNotBlank(columnName))
Some(columnName) else None
+ def getErrorType: Option[String] = if (StringUtils.isNotBlank(errorType))
Some(errorType) else None
+ def getValues: Seq[String] = if (values != null) values else Nil
+
+ def validate(): Unit = {
+ assert("regex".equals(getErrorType.get) ||
"enumeration".equals(getErrorType.get), "error error.conf type")
Review comment:
done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 318834)
Time Spent: 2h 10m (was: 2h)
> new feature for griffin COMPLETENESS dq type
> --------------------------------------------
>
> Key: GRIFFIN-289
> URL: https://issues.apache.org/jira/browse/GRIFFIN-289
> Project: Griffin
> Issue Type: New Feature
> Components: completeness-batch
> Affects Versions: 0.3.1-incubating
> Reporter: Zhao Li
> Priority: Major
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> Hello
>
> Now we use griffin measure module to check batch data quality. In
> COMPLETENESS dq type, griffin checks how many incomplete records in table,
> and griffin only check if one column is 'null' or not.
>
> However, only "null" is not enough to consider whether one column is invalid
> or not. In our condition, analysts may consider other value is invalid even
> though they are not "null". For example, one column named "company", if
> company in ("a", "b", "c"), this record is invalid.
>
> Here we need two ways for user to filter incomplete record, one is
> "enumeration", users write all invalid values they think for one column; the
> other is "regular expression", users write regular expression to match
> invalid values for one column.
>
> Could griffin updates COMPLETENESS dq type to support our "enumeration" and
> "regular expression" way to filter incomplete records?
>
> Regards
>
> Zhao
--
This message was sent by Atlassian Jira
(v8.3.4#803005)