:doc:`Glue <../../glue>` / Client / get_data_quality_result

***********************
get_data_quality_result
***********************



.. py:method:: Glue.Client.get_data_quality_result(**kwargs)

  

  Retrieves the result of a data quality rule evaluation.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDataQualityResult>`_  


  **Request Syntax**
  ::

    response = client.get_data_quality_result(
        ResultId='string'
    )
    
  :type ResultId: string
  :param ResultId: **[REQUIRED]** 

    A unique result ID for the data quality result.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ResultId': 'string',
          'ProfileId': 'string',
          'Score': 123.0,
          'DataSource': {
              'GlueTable': {
                  'DatabaseName': 'string',
                  'TableName': 'string',
                  'CatalogId': 'string',
                  'ConnectionName': 'string',
                  'AdditionalOptions': {
                      'string': 'string'
                  }
              },
              'DataQualityGlueTable': {
                  'DatabaseName': 'string',
                  'TableName': 'string',
                  'CatalogId': 'string',
                  'ConnectionName': 'string',
                  'AdditionalOptions': {
                      'string': 'string'
                  },
                  'PreProcessingQuery': 'string'
              }
          },
          'RulesetName': 'string',
          'EvaluationContext': 'string',
          'StartedOn': datetime(2015, 1, 1),
          'CompletedOn': datetime(2015, 1, 1),
          'JobName': 'string',
          'JobRunId': 'string',
          'RulesetEvaluationRunId': 'string',
          'RuleResults': [
              {
                  'Name': 'string',
                  'Description': 'string',
                  'EvaluationMessage': 'string',
                  'Result': 'PASS'|'FAIL'|'ERROR',
                  'EvaluatedMetrics': {
                      'string': 123.0
                  },
                  'EvaluatedRule': 'string',
                  'RuleMetrics': {
                      'string': 123.0
                  },
                  'Labels': {
                      'string': 'string'
                  }
              },
          ],
          'AnalyzerResults': [
              {
                  'Name': 'string',
                  'Description': 'string',
                  'EvaluationMessage': 'string',
                  'EvaluatedMetrics': {
                      'string': 123.0
                  }
              },
          ],
          'Observations': [
              {
                  'Description': 'string',
                  'MetricBasedObservation': {
                      'MetricName': 'string',
                      'StatisticId': 'string',
                      'MetricValues': {
                          'ActualValue': 123.0,
                          'ExpectedValue': 123.0,
                          'LowerLimit': 123.0,
                          'UpperLimit': 123.0
                      },
                      'NewRules': [
                          'string',
                      ]
                  }
              },
          ],
          'AggregatedMetrics': {
              'TotalRowsProcessed': 123.0,
              'TotalRowsPassed': 123.0,
              'TotalRowsFailed': 123.0,
              'TotalRulesProcessed': 123.0,
              'TotalRulesPassed': 123.0,
              'TotalRulesFailed': 123.0
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The response for the data quality result.

      
      

      - **ResultId** *(string) --* 

        A unique result ID for the data quality result.

        
      

      - **ProfileId** *(string) --* 

        The Profile ID for the data quality result.

        
      

      - **Score** *(float) --* 

        An aggregate data quality score. Represents the ratio of rules that passed to the total number of rules.

        
      

      - **DataSource** *(dict) --* 

        The table associated with the data quality result, if any.

        
        

        - **GlueTable** *(dict) --* 

          An Glue table.

          
          

          - **DatabaseName** *(string) --* 

            A database name in the Glue Data Catalog.

            
          

          - **TableName** *(string) --* 

            A table name in the Glue Data Catalog.

            
          

          - **CatalogId** *(string) --* 

            A unique identifier for the Glue Data Catalog.

            
          

          - **ConnectionName** *(string) --* 

            The name of the connection to the Glue Data Catalog.

            
          

          - **AdditionalOptions** *(dict) --* 

            Additional options for the table. Currently there are two keys supported:

             

            
            * ``pushDownPredicate``: to filter on partitions without having to list and read all the files in your dataset.
             
            * ``catalogPartitionPredicate``: to use server-side partition pruning using partition indexes in the Glue Data Catalog.
            

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
        

        - **DataQualityGlueTable** *(dict) --* 

          An Glue table for Data Quality Operations.

          
          

          - **DatabaseName** *(string) --* 

            A database name in the Glue Data Catalog.

            
          

          - **TableName** *(string) --* 

            A table name in the Glue Data Catalog.

            
          

          - **CatalogId** *(string) --* 

            A unique identifier for the Glue Data Catalog.

            
          

          - **ConnectionName** *(string) --* 

            The name of the connection to the Glue Data Catalog.

            
          

          - **AdditionalOptions** *(dict) --* 

            Additional options for the table. Currently there are two keys supported:

             

            
            * ``pushDownPredicate``: to filter on partitions without having to list and read all the files in your dataset.
             
            * ``catalogPartitionPredicate``: to use server-side partition pruning using partition indexes in the Glue Data Catalog.
            

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
          

          - **PreProcessingQuery** *(string) --* 

            SQL Query of SparkSQL format that can be used to pre-process the data for the table in Glue Data Catalog, before running the Data Quality Operation.

            
      
    
      

      - **RulesetName** *(string) --* 

        The name of the ruleset associated with the data quality result.

        
      

      - **EvaluationContext** *(string) --* 

        In the context of a job in Glue Studio, each node in the canvas is typically assigned some sort of name and data quality nodes will have names. In the case of multiple nodes, the ``evaluationContext`` can differentiate the nodes.

        
      

      - **StartedOn** *(datetime) --* 

        The date and time when the run for this data quality result started.

        
      

      - **CompletedOn** *(datetime) --* 

        The date and time when the run for this data quality result was completed.

        
      

      - **JobName** *(string) --* 

        The job name associated with the data quality result, if any.

        
      

      - **JobRunId** *(string) --* 

        The job run ID associated with the data quality result, if any.

        
      

      - **RulesetEvaluationRunId** *(string) --* 

        The unique run ID associated with the ruleset evaluation.

        
      

      - **RuleResults** *(list) --* 

        A list of ``DataQualityRuleResult`` objects representing the results for each rule.

        
        

        - *(dict) --* 

          Describes the result of the evaluation of a data quality rule.

          
          

          - **Name** *(string) --* 

            The name of the data quality rule.

            
          

          - **Description** *(string) --* 

            A description of the data quality rule.

            
          

          - **EvaluationMessage** *(string) --* 

            An evaluation message.

            
          

          - **Result** *(string) --* 

            A pass or fail status for the rule.

            
          

          - **EvaluatedMetrics** *(dict) --* 

            A map of metrics associated with the evaluation of the rule.

            
            

            - *(string) --* 
              

              - *(float) --* 
        
      
          

          - **EvaluatedRule** *(string) --* 

            The evaluated rule.

            
          

          - **RuleMetrics** *(dict) --* 

            A map containing metrics associated with the evaluation of the rule based on row-level results.

            
            

            - *(string) --* 
              

              - *(float) --* 
        
      
          

          - **Labels** *(dict) --* 

            A map containing labels assigned to the data quality rule.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
    
      

      - **AnalyzerResults** *(list) --* 

        A list of ``DataQualityAnalyzerResult`` objects representing the results for each analyzer.

        
        

        - *(dict) --* 

          Describes the result of the evaluation of a data quality analyzer.

          
          

          - **Name** *(string) --* 

            The name of the data quality analyzer.

            
          

          - **Description** *(string) --* 

            A description of the data quality analyzer.

            
          

          - **EvaluationMessage** *(string) --* 

            An evaluation message.

            
          

          - **EvaluatedMetrics** *(dict) --* 

            A map of metrics associated with the evaluation of the analyzer.

            
            

            - *(string) --* 
              

              - *(float) --* 
        
      
      
    
      

      - **Observations** *(list) --* 

        A list of ``DataQualityObservation`` objects representing the observations generated after evaluating the rules and analyzers.

        
        

        - *(dict) --* 

          Describes the observation generated after evaluating the rules and analyzers.

          
          

          - **Description** *(string) --* 

            A description of the data quality observation.

            
          

          - **MetricBasedObservation** *(dict) --* 

            An object of type ``MetricBasedObservation`` representing the observation that is based on evaluated data quality metrics.

            
            

            - **MetricName** *(string) --* 

              The name of the data quality metric used for generating the observation.

              
            

            - **StatisticId** *(string) --* 

              The Statistic ID.

              
            

            - **MetricValues** *(dict) --* 

              An object of type ``DataQualityMetricValues`` representing the analysis of the data quality metric value.

              
              

              - **ActualValue** *(float) --* 

                The actual value of the data quality metric.

                
              

              - **ExpectedValue** *(float) --* 

                The expected value of the data quality metric according to the analysis of historical data.

                
              

              - **LowerLimit** *(float) --* 

                The lower limit of the data quality metric value according to the analysis of historical data.

                
              

              - **UpperLimit** *(float) --* 

                The upper limit of the data quality metric value according to the analysis of historical data.

                
          
            

            - **NewRules** *(list) --* 

              A list of new data quality rules generated as part of the observation based on the data quality metric value.

              
              

              - *(string) --* 
          
        
      
    
      

      - **AggregatedMetrics** *(dict) --* 

        A summary of ``DataQualityAggregatedMetrics`` objects showing the total counts of processed rows and rules, including their pass/fail statistics based on row-level results.

        
        

        - **TotalRowsProcessed** *(float) --* 

          The total number of rows that were processed during the data quality evaluation.

          
        

        - **TotalRowsPassed** *(float) --* 

          The total number of rows that passed all applicable data quality rules.

          
        

        - **TotalRowsFailed** *(float) --* 

          The total number of rows that failed one or more data quality rules.

          
        

        - **TotalRulesProcessed** *(float) --* 

          The total number of data quality rules that were evaluated.

          
        

        - **TotalRulesPassed** *(float) --* 

          The total number of data quality rules that passed their evaluation criteria.

          
        

        - **TotalRulesFailed** *(float) --* 

          The total number of data quality rules that failed their evaluation criteria.

          
    
  
  **Exceptions**
  
  *   :py:class:`Glue.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Glue.Client.exceptions.OperationTimeoutException`

  
  *   :py:class:`Glue.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Glue.Client.exceptions.EntityNotFoundException`

  