Skip to content

/AWS1/IF_GLU=>GETDATAQUALITYRESULT()

About GetDataQualityResult

Retrieves the result of a data quality rule evaluation.

Method Signature

METHODS /AWS1/IF_GLU~GETDATAQUALITYRESULT
  IMPORTING
    !IV_RESULTID TYPE /AWS1/GLUHASHSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_glugetdataqualityrs01
  RAISING
    /AWS1/CX_GLUENTITYNOTFOUNDEX
    /AWS1/CX_GLUINTERNALSERVICEEX
    /AWS1/CX_GLUINVALIDINPUTEX
    /AWS1/CX_GLUOPERATIONTIMEOUTEX
    /AWS1/CX_GLUCLIENTEXC
    /AWS1/CX_GLUSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_resultid TYPE /AWS1/GLUHASHSTRING /AWS1/GLUHASHSTRING

A unique result ID for the data quality result.

RETURNING

oo_output TYPE REF TO /aws1/cl_glugetdataqualityrs01 /AWS1/CL_GLUGETDATAQUALITYRS01

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->getdataqualityresult( |string| ).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_hashstring = lo_result->get_resultid( ).
  lv_hashstring = lo_result->get_profileid( ).
  lv_genericboundeddouble = lo_result->get_score( ).
  lo_datasource = lo_result->get_datasource( ).
  IF lo_datasource IS NOT INITIAL.
    lo_gluetable = lo_datasource->get_gluetable( ).
    IF lo_gluetable IS NOT INITIAL.
      lv_namestring = lo_gluetable->get_databasename( ).
      lv_namestring = lo_gluetable->get_tablename( ).
      lv_namestring = lo_gluetable->get_catalogid( ).
      lv_namestring = lo_gluetable->get_connectionname( ).
      LOOP AT lo_gluetable->get_additionaloptions( ) into ls_row.
        lv_key = ls_row-key.
        lo_value = ls_row-value.
        IF lo_value IS NOT INITIAL.
          lv_descriptionstring = lo_value->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
    lo_dataqualitygluetable = lo_datasource->get_dataqualitygluetable( ).
    IF lo_dataqualitygluetable IS NOT INITIAL.
      lv_namestring = lo_dataqualitygluetable->get_databasename( ).
      lv_namestring = lo_dataqualitygluetable->get_tablename( ).
      lv_namestring = lo_dataqualitygluetable->get_catalogid( ).
      lv_namestring = lo_dataqualitygluetable->get_connectionname( ).
      LOOP AT lo_dataqualitygluetable->get_additionaloptions( ) into ls_row.
        lv_key = ls_row-key.
        lo_value = ls_row-value.
        IF lo_value IS NOT INITIAL.
          lv_descriptionstring = lo_value->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_preprocessingquerystrin = lo_dataqualitygluetable->get_preprocessingquery( ).
    ENDIF.
  ENDIF.
  lv_namestring = lo_result->get_rulesetname( ).
  lv_genericstring = lo_result->get_evaluationcontext( ).
  lv_timestamp = lo_result->get_startedon( ).
  lv_timestamp = lo_result->get_completedon( ).
  lv_namestring = lo_result->get_jobname( ).
  lv_hashstring = lo_result->get_jobrunid( ).
  lv_hashstring = lo_result->get_rulesetevaluationrunid( ).
  LOOP AT lo_result->get_ruleresults( ) into lo_row_1.
    lo_row_2 = lo_row_1.
    IF lo_row_2 IS NOT INITIAL.
      lv_namestring = lo_row_2->get_name( ).
      lv_dataqualityruleresultde = lo_row_2->get_description( ).
      lv_dataqualityruleresultde = lo_row_2->get_evaluationmessage( ).
      lv_dataqualityruleresultst = lo_row_2->get_result( ).
      LOOP AT lo_row_2->get_evaluatedmetrics( ) into ls_row_3.
        lv_key = ls_row_3-key.
        lo_value_1 = ls_row_3-value.
        IF lo_value_1 IS NOT INITIAL.
          lv_nullabledouble = lo_value_1->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_dataqualityruleresultde = lo_row_2->get_evaluatedrule( ).
      LOOP AT lo_row_2->get_rulemetrics( ) into ls_row_4.
        lv_key = ls_row_4-key.
        lo_value_2 = ls_row_4-value.
        IF lo_value_2 IS NOT INITIAL.
          lv_nullabledouble = lo_value_2->get_value( ).
        ENDIF.
      ENDLOOP.
      LOOP AT lo_row_2->get_labels( ) into ls_row_5.
        lv_key = ls_row_5-key.
        lo_value_3 = ls_row_5-value.
        IF lo_value_3 IS NOT INITIAL.
          lv_namestring = lo_value_3->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_analyzerresults( ) into lo_row_6.
    lo_row_7 = lo_row_6.
    IF lo_row_7 IS NOT INITIAL.
      lv_namestring = lo_row_7->get_name( ).
      lv_dataqualityruleresultde = lo_row_7->get_description( ).
      lv_dataqualityruleresultde = lo_row_7->get_evaluationmessage( ).
      LOOP AT lo_row_7->get_evaluatedmetrics( ) into ls_row_3.
        lv_key = ls_row_3-key.
        lo_value_1 = ls_row_3-value.
        IF lo_value_1 IS NOT INITIAL.
          lv_nullabledouble = lo_value_1->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_observations( ) into lo_row_8.
    lo_row_9 = lo_row_8.
    IF lo_row_9 IS NOT INITIAL.
      lv_dataqualityobservationd = lo_row_9->get_description( ).
      lo_metricbasedobservation = lo_row_9->get_metricbasedobservation( ).
      IF lo_metricbasedobservation IS NOT INITIAL.
        lv_namestring = lo_metricbasedobservation->get_metricname( ).
        lv_hashstring = lo_metricbasedobservation->get_statisticid( ).
        lo_dataqualitymetricvalues = lo_metricbasedobservation->get_metricvalues( ).
        IF lo_dataqualitymetricvalues IS NOT INITIAL.
          lv_nullabledouble = lo_dataqualitymetricvalues->get_actualvalue( ).
          lv_nullabledouble = lo_dataqualitymetricvalues->get_expectedvalue( ).
          lv_nullabledouble = lo_dataqualitymetricvalues->get_lowerlimit( ).
          lv_nullabledouble = lo_dataqualitymetricvalues->get_upperlimit( ).
        ENDIF.
        LOOP AT lo_metricbasedobservation->get_newrules( ) into lo_row_10.
          lo_row_11 = lo_row_10.
          IF lo_row_11 IS NOT INITIAL.
            lv_namestring = lo_row_11->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDIF.
  ENDLOOP.
  lo_dataqualityaggregatedme = lo_result->get_aggregatedmetrics( ).
  IF lo_dataqualityaggregatedme IS NOT INITIAL.
    lv_nullabledouble = lo_dataqualityaggregatedme->get_totalrowsprocessed( ).
    lv_nullabledouble = lo_dataqualityaggregatedme->get_totalrowspassed( ).
    lv_nullabledouble = lo_dataqualityaggregatedme->get_totalrowsfailed( ).
    lv_nullabledouble = lo_dataqualityaggregatedme->get_totalrulesprocessed( ).
    lv_nullabledouble = lo_dataqualityaggregatedme->get_totalrulespassed( ).
    lv_nullabledouble = lo_dataqualityaggregatedme->get_totalrulesfailed( ).
  ENDIF.
ENDIF.