spinaka
4 years agoNew Contributor III
Mapping the columns matching from the Array
Hello SnapLogic Experts,
I require your help in mapping expression to map the keys(columns).
I need to change the column names in the incoming data according to the mapping list that I have and load it into the database.
I’m trying to achieve it using mapKeys() but missing something. I really need someone’s advice to make it. I would be grateful if anyone can solve it. 🙂
Input data:
[
{
“ID”:1,
“NAME”:“testuser”
}
]
Column mapping data from parameter:
[
{
“src_col_name”: “ID”,
“tgt_col_name”: “sys_id”
},
{
“src_col_name”: “NAME”,
“tgt_col_name”: “user_name”
}
]
Expected output:
{
“sys_id”:1,
“user_name”:“testuser”
}
Thank you.