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: 
FabioManniti
Contributor III
Contributor III

Conditions on JOIN for tables too large

Hello, I have one table with these fields:

user_id users_path
435 /34/45/201/240/389/435/
436 /2/8/90/101/104/204/290/356/387/400/402/436/
... ...

 

I would like to create a table where I generate all the network. 

So I did create two tables:

 

 

Users:

Load *

SQL Select * From users;



NetworkHead:

Load distinct user_id as network_head_id

Resident users;



Now, I know I have to do something like

Temp:

Load * Resident users;

LEFT JOIN Load * Resident NetworkHead;



Final:

NoConcatenate Load* Resident Temp

Where users_path LIKE '*'&network_head_id&'*'

 

 

My problem is the table user is very large (about 100k rows) so when I do the join in Temp I have like several millions of rows and it runs out the time and gives me an error before doing the WHERE condition.

I was wondering: is there a way to do the condition directly on the join level instead?

 

I tried already this

Temp:

Load * Resident users;

LEFT JOIN Load * Resident NetworkHead

Where users_path LIKE '*'&network_head_id&'*'

 

But it returns an error because it doesn't know users_path as a field in NetworkHead.

 

Labels (2)
1 Reply
MarcoWedel

are you looking for something like this?

MarcoWedel_0-1671041579813.png

 

table1:
LOAD *
Where Len(network_head_id);
LOAD user_id, 
     users_path,
     SubField(users_path,'/') as network_head_id
FROM [https://community.qlik.com/t5/QlikView-App-Dev/Conditions-on-JOIN-for-tables-too-large/td-p/2016667] (html, codepage is 1252, embedded labels, table is @1, filters(Remove(Row, Pos(Top, 4))));