You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@griffin.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/09/23 13:09:00 UTC

[jira] [Work logged] (GRIFFIN-289) new feature for griffin COMPLETENESS dq type

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

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

                Author: ASF GitHub Bot
            Created on: 23/Sep/19 13:08
            Start Date: 23/Sep/19 13:08
    Worklog Time Spent: 10m 
      Work Description: guoyuepeng commented on pull request #538: [GRIFFIN-289]New feature for griffin COMPLETENESS dq type
URL: https://github.com/apache/griffin/pull/538#discussion_r327103843
 
 

 ##########
 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:
   can we comment here as "with errorconf".
 
----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 316644)
    Time Spent: 20m  (was: 10m)

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