cancel
Showing results for 
Search instead for 
Did you mean: 

Prefixing/Suffixing multiple Input Schema in Mapping table expressions (i.e. Target Path) under a mapper snap

darshthakkar
Valued Contributor

Hi Team,

Can we prefix/suffix multiple field names in mapping table expressions under mapper snap in a single shot?

image

As per the above screenshot, I can either:

  1. Select All as is
  2. Manually select required field names, do necessary transformations (if any) and then save it with a same or a different name in target path

Let’s assume I have n (where n>=10) snowflake tables to read and eventually I would be joining them, each table is having 300+ columns and I need to prefix/suffix those column names in my snapLogic pipeline ONLY with something through which I can distinguish each field name.

Is it possible to do that inside a mapper snap? I’m fine to use the same field name as Input Schema but the only addition would be a prefix/suffix text and that to saving manual efforts on 300+ columns for n different tables I read.

Screenshot below on how I would want each field name to appear with reduced manual efforts (it could be either of prefix or suffix, I’m not looking for a combination at this point of time)
image

P.S.: If there is any other snap than mapper that does the job for me, I would appreciate the help and leads.

Thanking in advance.

Best Regards,
DT

2 ACCEPTED SOLUTIONS

koryknick
Employee
Employee

Remapping all field names can be done using the Object.mapKeys() method. For example:

image

Hope this helps!

View solution in original post

darshthakkar
Valued Contributor

Hi @mkadange,

Welcome to SnapLogic and community. Yes, you can simply drag and drop the columns on the target path as you did for input/expression. Please try that out once for a small set and selecting All and dropping it on the target will do the needful.

Also, let's assume, out of 400, you need to select 40 which are not in the order, drag and drop will automatically map it for you.

Please keep us posted with your results.

Regards,

Darsh

View solution in original post

6 REPLIES 6

darshthakkar
Valued Contributor

Hi @mkadange,

Welcome to SnapLogic and community. Yes, you can simply drag and drop the columns on the target path as you did for input/expression. Please try that out once for a small set and selecting All and dropping it on the target will do the needful.

Also, let's assume, out of 400, you need to select 40 which are not in the order, drag and drop will automatically map it for you.

Please keep us posted with your results.

Regards,

Darsh

Thank you so much Darsh. Dragging and dropping on the Target path worked:)

This would save me so much time. I appreciate your help.

I need 1 more help from you, I posted another question on a different thread.

Do you know how this can be done? Thanks in advance!

https://community.snaplogic.com/t5/designing-and-running-pipelines/how-to-perform-looping-for-multip...

 

Regards

Mallikarjun