Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikconsultant
Creator III
Creator III

Why is resident load not working?

I have the following Code:

Table1:

Load * inline

[

UK, A

1,Q1

2,Q1

3,Q1

4,Q2

5,Q2

6,Q2

7,Q3

8,Q3

9,Q3

10,Q4

11,Q4

12,Q4

];

Left join (Table1)

Load * inline

[

UK, B

1,1

2,1

3,1

4,1

5,1

];

Final_table:

Load

UK,

A,

if(B=1,1,0) as B

resident Table1;

drop Tables Table1;


If I run the script. I end vwith no tables. Goal is to have the Final_table. What is my error?

1 Solution

Accepted Solutions
RonaldDoes
Partner - Creator III
Partner - Creator III

Hello Markus,

You should use NoConcatenate, since the fields of Table1 and Final_table are the same. Also, I'd use "drop table Table1" instead of "drop tables Table1" since it's a single table you're dropping.

I've attached an example, hope this helps you.

  1. Table1: 
  2. Load * inline 
  3. UK, A 
  4. 1,Q1 
  5. 2,Q1 
  6. 3,Q1 
  7. 4,Q2 
  8. 5,Q2 
  9. 6,Q2 
  10. 7,Q3 
  11. 8,Q3 
  12. 9,Q3 
  13. 10,Q4 
  14. 11,Q4 
  15. 12,Q4 
  16. ]; 
  17.  
  18. Left join (Table1) 
  19. Load * inline 
  20. UK, B 
  21. 1,1 
  22. 2,1 
  23. 3,1 
  24. 4,1 
  25. 5,1 
  26. ]; 
  27.  
  28. Final_table:  
  29. NoConcatenate Load  
  30. UK, 
  31. A, 
  32. if(B=1,1,0) as
  33. resident Table1; 
  34.  
  35. drop Table Table1; 

View solution in original post

2 Replies
RonaldDoes
Partner - Creator III
Partner - Creator III

Hello Markus,

You should use NoConcatenate, since the fields of Table1 and Final_table are the same. Also, I'd use "drop table Table1" instead of "drop tables Table1" since it's a single table you're dropping.

I've attached an example, hope this helps you.

  1. Table1: 
  2. Load * inline 
  3. UK, A 
  4. 1,Q1 
  5. 2,Q1 
  6. 3,Q1 
  7. 4,Q2 
  8. 5,Q2 
  9. 6,Q2 
  10. 7,Q3 
  11. 8,Q3 
  12. 9,Q3 
  13. 10,Q4 
  14. 11,Q4 
  15. 12,Q4 
  16. ]; 
  17.  
  18. Left join (Table1) 
  19. Load * inline 
  20. UK, B 
  21. 1,1 
  22. 2,1 
  23. 3,1 
  24. 4,1 
  25. 5,1 
  26. ]; 
  27.  
  28. Final_table:  
  29. NoConcatenate Load  
  30. UK, 
  31. A, 
  32. if(B=1,1,0) as
  33. resident Table1; 
  34.  
  35. drop Table Table1; 
Sergey_Shuklin
Specialist
Specialist

Hello, Markus!

Use NoConcatenate before Final_table: