cancel
Showing results for 
Search instead for 
Did you mean: 

Array Rename

Majid
New Contributor III

Hi Team,

I am trying to achieve below. I would need directions on how to achieve below in a mapper or any other way.

Source :
{
“UBER_ID”:[
“1”,
“Integer_pattern”
],
“First_name”:[
“Majid”,
“TextOnly_pattern”
],
“Last_name”:[
“”,
“TextOnly_pattern”
]
}

Target :

I would like to rename the above fields based on the value in the array. Below is the output I am looking at.

{
“Integer_pattern”:[
“1”,
],
“TextOnly_pattern”:[
“Majid”,
],
" TextOnly_pattern":[
“”,
]
}

10 REPLIES 10

Majid
New Contributor III

@del Thank You so much for all your help. I think this is better solution and I will not need pivot and even data validator if I go with this solution. This will also make the pipeline more dynamic. Any new regex I need to add I will add in expression library.

I hope the performance is as good as I have seen in data validator. But this is the best solution for the use case I have.

Appreciate your help. Will update the post with final solution and performance metrics once I complete the code and testing.