Identifier missing (European value added tax identifier (United Kingdom))

From CDQ
Jump to navigation Jump to search
Description Informal and comprehensive human-readable definition of a concept. Each legal entity in the United Kingdom should have a European value added tax identifier.
Violation message Information for a human user about a violated business rule. The message should provide a brief but comprehensive text about what is wrong with a defective business partner or address data record, e.g. to be shown in a data entry form that checks for data quality. Business Partner does not have a European value added tax identifier.
Example A simple example supporting the understanding of a concept, business rule, etc. Sorry no example available yet
Status Specifies a release status of a concept, e.g. a data quality rule. The following status levels are defined:<br/><code>IDEA</code>: Informal description of the concept that is to be further detailed.<br/><code>DRAFT</code>: Completely defined concept that is not yet released and still under construction.<br/><code>UNDER REVIEW</code>: Completely defined concept which is "freezed" (i.e. not editable, only comments are allowed) and reviewed by a dedicated Business Rules Steward.<br/><code>PLANNED</code>: The concept is scheduled to be released at a given date.<br/><code>HYPERCARE</code>: The concept is used for data quality rules. A rule is set into hypercare status before it is released. This means the rule was successfully tested and then remains in hypercare state for checking the behaviour in a large number of real world validation requests. <br/><code>RELEASED</code>: The concept is used in stable services.<br/><code>DEACTIVATED</code>: The concept is disabled but may be re-activated in the future.<br/><code>ARCHIVED</code>: The concept is disabled because it is no longer relevant from a business perspective. It is only kept for history purposes.<br/><code>BLOCKED</code>: Implementation or use of the concept not possible due to dependent requirements that are not satisfied.<br/> ARCHIVED, Release date Date and time when a concept, e.g. a data quality rule, is released, i.e. when the status changes to <code>RELEASED</code>.: 2021-07-01, SPARQL Whether or not the technical representation of a data quality rule, i.e. the SPARQL constraint, is implemented, or not.: IMPLEMENTED
Creation / Last edit 5 November 2019 08:22:27 / 12 January 2022 17:17:57
Technical key Defines a unique key by which e.g. data model concepts can be referenced in a technical integration context. These keys are unique in the CDL context.
Country scope Defines a address/country a given concept is used in (or valid in, or relevant for etc.), i.e. the country-specific scope of a concept. GB (Vereinigtes Königreich, United Kingdom of Great Britain and Northern Ireland, Royaume-Uni de Grande-Bretagne et d'Irlande du Nord, 英国)
Data quality Data quality dimension which is ensured by the data quality rule. For each rule, multiple dimensions can be assigned. The following data quality dimensions are considered in the Corporate Data League:</br>* Accuracy: Input forms contain a lot of mandatory fields where dummy values (i.e. NULL values) have to be entered due to a lack of knowledge about the effects. The available data elements are inadequate for distinguishing between two data objects without any doubt (duplicates). Different systems deliver different data elements for a specific set of facts (inconsistency).</br>* Completeness: The available data elements are inadequate for completing a specific work step. It is not possible to obtain the missing data through other sources (e.g. telephone, other software). Data elements are missing.</br>* Representational consistency: No uniform data format, e.g. of address data in different applications. This can lead to misunderstandings or technical problems with data exchange. Different systems access different databases and provide different representations of data elements in the same context. In some cases, data elements have not been entered in the envisaged input fields and are therefore shown in the wrong place.</br>* Timeliness: Data elements are outdated despite the fact that more current data elements are available or have actually been entered. Reworking or storing data elements takes so long that the impression arises that the input has not yet taken place. For that reason, data is entered several times (possible cause of duplicates).</br> COMPLETENESS
Feature Specifies which data quality product feature is using this concept Identifier Checks
Rule category Categorization of data quality rules according to their focus. Identifier missing
Criticality Specifies how critical of the violation of a data quality rule. The following levels are defined:<br/><code>ERROR</code>: The violation (e.g. missing information) puts a CDL process at risk or hinders regular processing of data.<br/><code>WARNING</code>: The violation does not hinder regular processing of data but represents semantically defective data.<br/><code>INFO</code>: The business rule has not uncovered a data defect, but some information is available that might be interesting for the user.<br/> INFO
Primary source The most trusted data source that is first queried for validating a piece of information such as tax identifiers n/a
Secondary source(s) The alternative trusted data source(s) that are queried if the primary source is not accessible or when something else went wrong with querying the primary source n/a
Manages identifier(s) Defines whether there are any identifiers issued or managed by this data source European value added tax identifier (United Kingdom)
Concept(s) Specifies concepts which are controlled by a data quality rule or another schema or constraint. Identifier (CDQ.POOL), European value added tax identifier (United Kingdom)
Qualification target Subject of the qualification rule at hand
Testing Test case Whether or not test cases for a data quality rule are <code>COMPLETE</code> or <code>INCOMPLETE</code>.: COMPLETE Test status Documents whether the test was successful or not.<br/><code>VERIFIED</code>: Test successfully executed.<br/><code>FAILED</code>: Testing did not return the expected results.<br/><code>UNKNOWN</code>: No information on test status.: VERIFIED

Implementation


SPARQL rule

SELECT ?recordId 
  ?errorCode 
  ?content
  ?contentSelector
  ?contentSelectorUrl 
  ?parentConceptId 
  ?parentConceptIdSelector 
  ?parentConceptUrl 
WHERE
{
 ?businessPartner <http://meta.cdq.com/Property-3AHas_record_id> ?record_id ;
        a <http://meta.cdq.com/BusinessPartner> .
 ?businessPartner <http://meta.cdq.com/Property-3ABusinessPartner/addresses> ?address.
 ?address <http://meta.cdq.com/Property-3ABusinessPartner/addresses/country> ?country .

 ?country <http://meta.cdq.com/Property-3ABusinessPartner/addresses/country/shortName> "GB" .

 FILTER ( NOT EXISTS {
       ?businessPartner <http://meta.cdq.com/Property-3ABusinessPartner/identifiers> ?identifier .
<http://meta.cdq.com/European_value_added_tax_identifier_-28United_Kingdom-29> <http://meta.cdq.com/Property-3AHas_technical_key> ?identifierTechnicalKey.
   ?identifier <http://meta.cdq.com/Property-3ABusinessPartner/identifiers/type> ?identifierType;
      <http://meta.cdq.com/Property-3ABusinessPartner/identifiers/value> ?identifierValue .
   FILTER (str(?identifierValue) != "")
   ?identifierType <http://meta.cdq.com/Property-3ABusinessPartner/identifiers/type/technicalKey> ?identifierTechnicalKey .
 })




  BIND(?record_id AS ?recordId)
  BIND ("200" AS ?errorCode)

  BIND (?identifierTechnicalKey AS  ?parentConceptId)
  BIND ("businessPartner.identifiers.technicalKey" AS ?parentConceptIdSelector)
  BIND ("https://meta.cdq.com/Business_partner/identifier" AS ?parentConceptUrl)

  BIND ("" AS  ?content)
  BIND ("businessPartner.identifiers.value" AS  ?contentSelector)
  BIND ("https://meta.cdq.com/Business_partner/identifier/value" AS  ?contentSelectorUrl)
}

Test cases

Status

Test status Documents whether the test was successful or not.<br/><code>VERIFIED</code>: Test successfully executed.<br/><code>FAILED</code>: Testing did not return the expected results.<br/><code>UNKNOWN</code>: No information on test status. VERIFIED
Test message Some message provided by the test, e.g. reasons for failing Rule has been successfully tested.
Last test date The date when the last time an automated test was executed for this rule 20-04-2021
Runtime How long did the queries last in average 0 ms

Correct record 

{
   "businessPartner": {
       "identifiers": [
           {
               "value": "GB169562721",
               "type": {
                   "technicalKey": "EU_VAT_ID_UK"
               }
           }
       ],
       "addresses": [
           {
               "country": {
                   "shortName": "GB",
                   "value": "United Kingdom"
               }
           }
       ]
   }
}

Invalid record 

{
   "businessPartner": {
       "identifiers": [
           {
               "value": "",
               "type": {
                   "technicalKey": "EU_VAT_ID_UK"
               }
           }
       ],
       "addresses": [
           {
               "country": {
                   "shortName": "GB",
                   "value": "United Kingdom"
               }
           }
       ]
   }
}

Additional test cases


Supporting document

no supporting document available