Changing the key names dynamically
Hi,
I have a requirement where we need to read 50 tables from oracle and put the data to postgres. there is no transformation logic in between . But issue is while loading to target the column names are slightly changing. for an instance ,
src_table1
{
"id" : 1,
"name" : "abc",
"del_ind" true
}
While loading the above data to target i need to change the column names . The above json keys needs to be changed while loading to target as target table column names are different.
src_col corresponding_tgt_col
id id
name full_name
del_ind delete_indicator
Like this I have 50 tables i cant create 50 mappers to map the column names for each table. I need to have a expression language to change the field names accordingly .
right now i am maintaining a config file which contains all the information to parameterize everything.
src tblename, tgt table name ,src schema, tgt schema,srcaccount,tgt account everything comes from my parent pipeline. all set but, while changing the column names I am struggling to write a expression .
please help!