[ 
https://issues.apache.org/jira/browse/GRIFFIN-289?focusedWorklogId=316692&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-316692
 ]

ASF GitHub Bot logged work on GRIFFIN-289:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Sep/19 14:06
            Start Date: 23/Sep/19 14:06
    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_r327133907
 
 

 ##########
 File path: 
measure/src/main/scala/org/apache/griffin/measure/step/builder/dsl/transform/CompletenessExpr2DQSteps.scala
 ##########
 @@ -85,8 +85,16 @@ case class CompletenessExpr2DQSteps(context: DQContext,
 
       // 2. incomplete record
       val incompleteRecordsTableName = "__incompleteRecords"
-      val completeWhereClause = aliases.map(a => s"`${a}` IS NOT 
NULL").mkString(" AND ")
-      val incompleteWhereClause = s"NOT (${completeWhereClause})"
+      val errorConfs: Seq[RuleErrorConfParam] = ruleParam.getErrorConfs
+      var incompleteWhereClause: String = ""
+      if (errorConfs.size == 0) {
+        // old completeness way
+        val completeWhereClause = aliases.map(a => s"`${a}` IS NOT 
NULL").mkString(" AND ")
+        incompleteWhereClause = s"NOT (${completeWhereClause})"
+      } else {
+        // new completeness way
 
 Review comment:
   ok, I will update these comments soon.
   
   This is my first Griffin pr, and I find the CI failed. However, I cannot 
search the Failures or Errors test in the log. Could you please help me find 
why the CI failed? Thank you.
   
   
 
----------------------------------------------------------------
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: 316692)
    Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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)

Reply via email to