Difference between revisions of "Data source/JP.CR/data model/corporations/postCode/mapping/CDQ/transformation"
Jump to navigation
Jump to search
(Template parameters updated.) |
(Template parameters updated.) |
||
Line 1: | Line 1: | ||
{{Data model transformation | {{Data model transformation | ||
| data source = Data source/JP.CR | | data source = Data source/JP.CR | ||
− | | transformation type = | + | | transformation type = CUSTOM_TRANSFORMATION |
| transformation code = import re | | transformation code = import re | ||
− | POSTCODE_VALUE = " | + | POSTCODE_VALUE = "addresses[0].postCodes[0].value" |
− | POSTCODE_TYPE = " | + | POSTCODE_TYPE = "addresses[0].postCodes[0].type.technicalKey" |
Latest revision as of 07:30, 13 March 2025
Part of Hierarchical relation between two concepts of the CDQ Data Model. | Data source JP.CR |
---|---|
Mapping source The source of a data model mapping. | JP.CR postCode ↣ POST_CODE_VALUE , POST_CODE_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
POSTCODE_VALUE = "addresses[0].postCodes[0].value"
POSTCODE_TYPE = "addresses[0].postCodes[0].type.technicalKey"
def transform(raw_data):
raw_data = raw_data[:3] + '-' + raw_data[3:]
result = {}
result.update({POSTCODE_VALUE: raw_data, POSTCODE_TYPE: "REGULAR"})
return result
POSTCODE_VALUE = "addresses[0].postCodes[0].value"
POSTCODE_TYPE = "addresses[0].postCodes[0].type.technicalKey"
def transform(raw_data):
raw_data = raw_data[:3] + '-' + raw_data[3:]
result = {}
result.update({POSTCODE_VALUE: raw_data, POSTCODE_TYPE: "REGULAR"})
return result