Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
LesJean
Contributor III
Contributor III

Resident LOAD from 2 other tables

Hello everyone,

So I need to use data from 2 different tables to calculate fields in a third table. Let's say my data is something like this:

tblOne:
LOAD
Data1
FROM ...;

tblTwo:
LOAD
Data2
FROM ...;

Browsing the forum, I came up with something like this to use these 2 fields (Data1 and Data2) to calculate a third one.

tblTempo:
LOAD Data1 FROM tblOne;
Join(tblTempo) LOAD Data2 FROM tblTwo;

tblThree:
LOAD
Data1 + Data2 as Data3
RESIDENT tblTempo;

DROP TABLE tblTempo;

Currently, I get the error "No qualified path for file: ***" on my "LOAD Data1 FROM tblOne" line. I'm guessing this has something to do with how I refer to my tblOne.

Does anyone have a clue as to how I should proceed to solve this issue?

Thank you guys very much,

LesJean

1 Solution

Accepted Solutions
Marcos_rv
Creator II
Creator II

try this:

 

tblOne:
Load * Inline [
Data1
1
2
3
];

tblTwo:
Load * Inline [
Data2
1
2
3
];

Store tblOne into tblOne.qvd(qvd);
Drop table tblOne;

Store tblTwo into tblTwo.qvd(qvd);
Drop table tblTwo;

 

tblTempo:
LOAD Data1
FROM tblOne.qvd(qvd);

Join(tblTempo)

LOAD Data2
FROM tblTwo.qvd(qvd);

final_table:

LOAD *,
Data1 + Data2 as Data3
resident tblTempo;

 

DROP TABLE tblTempo;

exit script;

View solution in original post

3 Replies
Seyko
Partner - Creator
Partner - Creator

Hello,
Can you join screenshots of script?
cordially.
Excuse my english, i'm french!
Marcos_rv
Creator II
Creator II

try this:

 

tblOne:
Load * Inline [
Data1
1
2
3
];

tblTwo:
Load * Inline [
Data2
1
2
3
];

Store tblOne into tblOne.qvd(qvd);
Drop table tblOne;

Store tblTwo into tblTwo.qvd(qvd);
Drop table tblTwo;

 

tblTempo:
LOAD Data1
FROM tblOne.qvd(qvd);

Join(tblTempo)

LOAD Data2
FROM tblTwo.qvd(qvd);

final_table:

LOAD *,
Data1 + Data2 as Data3
resident tblTempo;

 

DROP TABLE tblTempo;

exit script;

LesJean
Contributor III
Contributor III
Author

Thanks to both of you,

Marcos, your solution seems to be working for me, but I was wondering, since this will be run daily, I need to make sure to not accumulate data. Is there anyway to delete the .qvd files created during the process in the code?

Thank you,

LesJean