I have two columns named amount and work with data in the format of given below:
amount 58220 84151 65999 23 78544 开发者_Go百科 52656
work 15 14 20 85597 22 19
and I want to swap the values of 23 and 85597 which are in the same row. Can you suggest me a suitable solution?
Create a transformation following the steps:
build file
inputdata.txt(or other source of data for the flow)value1, value2 58220, 15 84151, 14 65999, 20 23, 85597 78544, 22 52656, 19add code in javascript step
var t1 = value1; var t2 = value2;In the menu "Fields" choose Rename
t1tovalue2andt2tovalue1and check the option to replace values??.the results are:
value1, value2 15, 58220 14, 84151 20, 65999 85597, 23 22, 78544 19, 52656
If you need the source code I send by email.
加载中,请稍侯......
精彩评论