Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to update multiple columns during a load

Hi all, got a bit of a problem here and was wondering if anyone had any advice?

I'm creating a scorecard system which pulls data from multiple sources, in order to help maintain it and make the front end usable I have created a structure table with a key. This should mean that I can associate the data from multiple sources with the table.

The problem is this, I want to operate like this:

Load

Dataa as value1,

Datab as value2,

Type

From Table1;

Load *

If (type=1, value1/value2) as Value (& set the Structure key to equal abc)

the problem is I don't know how to do the value calculation and set the structure key at the same time.

Help! Thankyou!

3 Replies
Anonymous
Not applicable
Author

If I undersatnd the question correctly (and I could be way off the mark), it will be:


Table2:
Load
Dataa as value1,
Datab as value2,
Type
From Table1;

Table3:
Load
...
If (type=1, value1/value2) as Value,
'abc' as Key
Resident Table2;


johnw
Champion III
Champion III

If I understood the question, you don't set them at the same time because one if() can't establish two fields:

LOAD *
,if(type=1,value1/value2) as Value
,if(type=1,'abc') as StructureKey
...

Not applicable
Author

That was what I meant, is it not possible then to use the

as newfieldname

in the form of

as field1, field 2

?

Thanks Ben