Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Keep dual number values

Hi, community!

Do anyone had practice how to save second part (number) of dual values in the script after several data transformation?

For example, in first step i define dual values using excel source:

Temp:

LOAD

if(Name='A-1', dual('A-1',1),

if(Name='B-2', dual('B-2',2),

if(Name='C-56', dual('C-56',3),

if(Name='D-44', dual('D-44',4))))) as Name

FROM

Dual.xlsx

(ooxml, embedded labels, table is Sheet1);

First result is ok:

Dual_1.jpg

But after some data transformation dual sorting is missing in the result:

Result:

NoConcatenate

load

if(Name='D-44', 'Last' & Name,

subfield(Name,'-',-1)) as Name

Resident Temp;

DROP Table Temp;

Dual_2.jpg

Any idea how to keep number dual values in this case?

Thanks.

1 Solution

Accepted Solutions
avinashelite

if that is the case define it in the level two like this

Result:

NoConcatenate

load

if(Name='D-44',Dual( 'Last' & Name,num(subfield(Name,'-',-1))) ) as Name

Resident Temp;

DROP Table Temp;

View solution in original post

4 Replies
woshua5550
Creator III
Creator III

why not do the data transformation at step 1? this will be ok :

LOAD

if(Name='A-1', dual('A-1',1),

if(Name='B-2', dual('B-2',2),

if(Name='C-56', dual('C-56',3),

if(Name='D-44', dual('Last' & Name,4)))))

FROM

Dual.xlsx

(ooxml, embedded labels, table is Sheet1);

Anonymous
Not applicable
Author

because it's the idea of real app - i shouldn't do it in the first step

avinashelite

if that is the case define it in the level two like this

Result:

NoConcatenate

load

if(Name='D-44',Dual( 'Last' & Name,num(subfield(Name,'-',-1))) ) as Name

Resident Temp;

DROP Table Temp;

Anonymous
Not applicable
Author

Thanks!) Perfect!