Skip to main content

Hi ​@anna.spakova I am trying to write invalid data into DB using JSON Call. For that I want to first get the invalid values from the “Show Invalid Samples page”

Not like any other array in JSON, the values array does not have key - value structure. Instead, it is like values: (array) 0: <no key> only values. When I run ONE Desktop Plan, I am only getting blank rows. Please help Thanks.

 

 

Hello ​@kpillai ,

can you please provide the graphql query that you are trying to parse? The invalid samples are stored in Minio, so AFAIK they are not available under API call (but I’ve never tried). This will give you only samples. To get full invalid results, you need to use the post-processing plan/post-processing transformation.

Kind regards,

Anna


Yes ​@anna.spakova  that makes sense. As of now I managed to get the values, column name and explanation. But now the problem is I am getting all values instead of invalid samples. I am wondering how to apply a filter to only get invalid samples. Also the invalid explanation is appearing for all values in export via ONE Desktop Plan.

Here is the graphql:

query ProjectInvalidSamples($processingId: GID!, $resultItemFilter: [Filter!], $page: Int!, $pageSize: Int!, $rules: [GID!]!, $aggregations: [GID!]!, $dqFilters: [values!]) {
  monitoringProjectProcessing(gid: $processingId) {
    publishedVersion {
      items(filter: $resultItemFilter) {
        edges {
          node {
            __typename
            storedVersion {
              dqResult {
                storedVersion {
                  dqResult {
                    storedVersion {
                      drillthrough(
                        page: $page
                        pageSize: $pageSize
                        
                        rules: $rules
                        aggregations: $aggregations
                        filter: $dqFilters
                      ) {
                        totalCount
                        headers {
                          attributeId
                          dataPolicy
                          __typename
                        }
                        rows {
                          values
                          recordId
                          invalidRuleInstances {
                            
                            ruleInstanceId
                            explanation
                            __typename
                          }
                          __typename
                        }
                        __typename
                      }
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      __typename
    }
    __typename
  }
}