Data source/GB-EAW.CR/data model/Company/SICCode.SicText 1/mapping/CDQ/transformation

From CDQ
Jump to navigation Jump to search


Part of Hierarchical relation between two concepts of the CDQ Data Model. Data source GB-EAW.CR
Mapping source The source of a data model mapping. GB-EAW.CR SICCode.SicText_1BUSINESS_PARTNER_CLASSIFICATION_CODE, BUSINESS_PARTNER_CLASSIFICATION_VALUE, BUSINESS_PARTNER_CLASSIFICATION_TYPE
Transformation type A type of a transformation applied to a data model mapping. CUSTOM_TRANSFORMATION"CUSTOM_TRANSFORMATION" is not in the list (UPPER_CASE, LOWER_CASE, CUSTOM) of allowed values for the "Has transformation type" property.
Transformation parameter A transformation parameter is an action proccessed by a data model transformation. n/a
Description Informal and comprehensive human-readable definition of a concept. n/a

Transformation code Any code (in Python, JAVA or other) that will transform values for a given data source attributes.

import re

def transform(raw_data):
    if " - " not in raw_data:
        return None

    parts = raw_data.split(" - ", 1)

    return {
        "profile.classifications[*].code": parts[0],
        "profile.classifications[*].value": parts[1],
        "profile.classifications[*].type.technicalKey": "SIC"
    }