Data source/PEPPOL/data model/businessEntity/entity/id/5/value/mapping/CDQ/transformation
Jump to navigation
Jump to search
Part of Hierarchical relation between two concepts of the CDQ Data Model. | Data source PEPPOL |
---|---|
Mapping source The source of a data model mapping. | PEPPOL participant_value ↣ IDENTIFIER_VALUE , IDENTIFIER_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
identifier_types = {
"0002": "FR_SIREN",
"0007": "SE_ORG_ID",
"0009": "FR_SIRET",
"0037": "BIC_FI",
"0060": "DUNS_ID",
"0088": "GS1_GLN",
"0096": "CVR_DK",
"0106": "KVK_NL",
"0151": "ABN_AU",
"0183": "CH_UID",
"0184": "CVR_DK",
"0188": "CN_JP",
"0191": "EE_BRN",
"0192": "NO_ORGID",
"0195": "SG_UEN",
"0196": "IS_IIN",
"0198": "CVR_DK",
"0200": "LT_BRN",
"0208": "BE_ENT_NO",
"0210": "IT_FISC_ID",
"0211": "IT_VAT_ID",
"0212": "BIC_FI",
"0213": "EU_VAT_ID_FI",
"0221": "JP_JCT",
"0230": "MY_BRN",
"9910": "EU_VAT_ID_HU",
"9914": "EU_VAT_ID_AT",
"9915": "EU_VAT_ID_AT",
"9919": "BR_ID_AT",
"9920": "EU_VAT_ID_ES",
"9923": "AL_TRN",
"9924": "BA_TRN",
"9925": "EU_VAT_ID_BE",
"9926": "EU_VAT_ID_BG",
"9927": "CH_VAT_ID",
"9928": "EU_VAT_ID_CY",
"9929": "EU_VAT_ID_CZ",
"9930": "EU_VAT_ID_DE",
"9931": "EU_VAT_ID_EE",
"9932": "ID_VAT_UK",
"9933": "EU_VAT_ID_EL",
"9934": "EU_VAT_ID_HR",
"9935": "EU_VAT_ID_IE",
"9937": "EU_VAT_ID_LT",
"9938": "EU_VAT_ID_LU",
"9939": "EU_VAT_ID_LV",
"9943": "EU_VAT_ID_MT",
"9944": "EU_VAT_ID_NL",
"9945": "EU_VAT_ID_PL",
"9946": "EU_VAT_ID_PT",
"9947": "EU_VAT_ID_RO",
"9948": "RS_PIB",
"9949": "EU_VAT_ID_SI",
"9950": "EU_VAT_ID_SK",
"9951": "SM_COE",
"9952": "TR_TAX_ID",
"9956": "BE_ENT_NO",
"9957": "EU_VAT_ID_FR",
"9959": "US_EMPL_ID"
}
def transform(input_data):
result = {}
id_type, id_value = input_data.split(":", 1)
if id_type == "0195":
if id_value.startswith("usuid"):
id_type_name = "US_EMPL_ID"
elif id_value.startswith("sguen"):
id_type_name = "SG_UEN"
else:
id_type_name = "SG_UEN"
id_value = re.sub(r"^(sguen
identifier_types = {
"0002": "FR_SIREN",
"0007": "SE_ORG_ID",
"0009": "FR_SIRET",
"0037": "BIC_FI",
"0060": "DUNS_ID",
"0088": "GS1_GLN",
"0096": "CVR_DK",
"0106": "KVK_NL",
"0151": "ABN_AU",
"0183": "CH_UID",
"0184": "CVR_DK",
"0188": "CN_JP",
"0191": "EE_BRN",
"0192": "NO_ORGID",
"0195": "SG_UEN",
"0196": "IS_IIN",
"0198": "CVR_DK",
"0200": "LT_BRN",
"0208": "BE_ENT_NO",
"0210": "IT_FISC_ID",
"0211": "IT_VAT_ID",
"0212": "BIC_FI",
"0213": "EU_VAT_ID_FI",
"0221": "JP_JCT",
"0230": "MY_BRN",
"9910": "EU_VAT_ID_HU",
"9914": "EU_VAT_ID_AT",
"9915": "EU_VAT_ID_AT",
"9919": "BR_ID_AT",
"9920": "EU_VAT_ID_ES",
"9923": "AL_TRN",
"9924": "BA_TRN",
"9925": "EU_VAT_ID_BE",
"9926": "EU_VAT_ID_BG",
"9927": "CH_VAT_ID",
"9928": "EU_VAT_ID_CY",
"9929": "EU_VAT_ID_CZ",
"9930": "EU_VAT_ID_DE",
"9931": "EU_VAT_ID_EE",
"9932": "ID_VAT_UK",
"9933": "EU_VAT_ID_EL",
"9934": "EU_VAT_ID_HR",
"9935": "EU_VAT_ID_IE",
"9937": "EU_VAT_ID_LT",
"9938": "EU_VAT_ID_LU",
"9939": "EU_VAT_ID_LV",
"9943": "EU_VAT_ID_MT",
"9944": "EU_VAT_ID_NL",
"9945": "EU_VAT_ID_PL",
"9946": "EU_VAT_ID_PT",
"9947": "EU_VAT_ID_RO",
"9948": "RS_PIB",
"9949": "EU_VAT_ID_SI",
"9950": "EU_VAT_ID_SK",
"9951": "SM_COE",
"9952": "TR_TAX_ID",
"9956": "BE_ENT_NO",
"9957": "EU_VAT_ID_FR",
"9959": "US_EMPL_ID"
}
def transform(input_data):
result = {}
id_type, id_value = input_data.split(":", 1)
if id_type == "0195":
if id_value.startswith("usuid"):
id_type_name = "US_EMPL_ID"
elif id_value.startswith("sguen"):
id_type_name = "SG_UEN"
else:
id_type_name = "SG_UEN"
id_value = re.sub(r"^(sguen