07-13-2019 12:38 AM
Hello Everyone,
I am trying to create an incremental addition let say i have 2 columns empl_id and salary so in target i want to derive third column with cumulative salary.
I can do it by using variable, have done it using Different tool but never implemented it in snaplogic
Hence the question can we create Variable in mapper?
any help is appreciated
07-23-2019 02:44 AM
Understood your code with the help of Google bcoz i dont know python but was able to relate it
Thank you for your reply .
but can i do the same thing with csv file?
Again thank you mann for your help
07-23-2019 06:48 AM
@Karan_Mhatre yes you can use file reader and csv formatter to get output similar to the Json generator I have used.
09-16-2019 03:15 PM
Hello @Anil , I am trying to implement similar logic but i need to group by two fields instead of one unlike in the above example. Instead of only emp_id , I have two fields i need to consider, suppose product_name and product_date , and then find the cumulative sum for this combo . Can you please help me with the logic for this?
09-16-2019 10:35 PM
@Preeta Sure…
Can you send the input file and what is the output expected…
09-17-2019 10:13 AM
Hi Preeta,
One way to solve this is to concatenate the two fields into a single one in a mapper snap, then use that to aggregate the data like the solution for a single field.
Best,
Tim