Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
nihhalmca
Specialist II
Specialist II

Resident Load

Hi All,

Table1:

LOAD

   Year&Product AS Key,

   *;

LOAD * INLINE [

    Year, Product, Sales

    2011, A, 10

    2012, B, 20

    2013, C, 30

];

Table2:

LOAD

  Year&Product AS Key,

  *;

LOAD * INLINE [

    Year, Product, Rev

    2011, A, 1000

    2012, B, 2000

    2013, X ,3000

];

Scenario:1

Table3:

LOAD Key,

  Year,

  Product,

  Sales

Resident Table1;

Table4:

LOAD Key,

  Year,

  Product,

  Rev

Resident Table2;

DROP Tables Table1, Table2;

If i reload this resident load is not working. It will work when i commented one filed in either table1 or table2.

How resident load behaves here.

Scenario:2

Table3:

LOAD  *,

         Key

Resident Table1;

Table4:

LOAD   *,

          Key 

Resident Table2;

DROP Tables Table1, Table2;

If i reload this error will occur like "Field names must be unique with in table".

Can you please assist me how resident load behaves here.

Regards,

Nihhal.

1 Solution

Accepted Solutions
rajni_batra
Specialist
Specialist

!Please check attached file.

View solution in original post

12 Replies
PrashantSangle

Hi,

for Scenario1 What error you will get???

add NoConcatenate between Table1 & Table2 then try

like

Table1:

LOAD

   Year&Product AS Key,

   *;

LOAD * INLINE [

  Year, Product, Sales

    2011, A, 10

    2012, B, 20

    2013, C, 30

];

NoConctenate

Table2:

LOAD

  Year&Product AS Key,

  *;

LOAD * INLINE [

    Year, Product, Rev

    2011, A, 1000

    2012, B, 2000

    2013, X ,3000

];

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
robert_mika
Master III
Master III

You need to redefine your column names:

Table1:

LOAD

   Year&Product AS Key,

   *;

LOAD * INLINE [

    Year, Product, Sales

    2011, A, 10

    2012, B, 20

    2013, C, 30

];

Table2:

LOAD

  Year&Product AS Key,

  *;

LOAD * INLINE [

    Year, Product, Rev

    2011, A, 1000

    2012, B, 2000

    2013, X ,3000

];

//Scenario:1

Table3:

LOAD Key as key,

  Year as year,

  Product as product,

  Sales as sales

Resident Table1;

Table4:

LOAD Key as key,

  Rev as rev

Resident Table2;

DROP Tables Table1, Table2;

and use only Key as KEY

as You Year  product will create synthetic keys which you do not want

12-Jun-15 8-21-22 AM.jpg

nihhalmca
Specialist II
Specialist II
Author

Hi Max,

Thanks for reply, Your are not using resident load.

Please see my post briefly.

Nihhal.

nihhalmca
Specialist II
Specialist II
Author

Hi Robert,

Thank for reply. You are using alias names do not change anything in script.

Please take my script, paste and run application.

Then you will come to know, what will be happening.

Nihhal.

robert_mika
Master III
Master III

You have to use alias when using Resident

nihhalmca
Specialist II
Specialist II
Author

Hi Robert, is it mandatory. We can not do without alias.

Nihhal.

rajni_batra
Specialist
Specialist

!Please check attached file.

qlikmsg4u
Specialist
Specialist

In scenario 2 if you load like this

LOAD  *,

         Key

Resident Table1;

Key field is already loaded in table1 , so you can't add same field again with same name

that's why you facing error

PrashantSangle

Hi,

You are getting this behaviour just because of table3 output is concatenated with table1 and table2 output

therefore you have to use noconcatenate between every table.

Regards.

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂