Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
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: 
paulwalker
Creator III
Creator III

Need Help

Hi Community,

IDCategorySalesTest
1000ABC2000X
1010ABX1200X
1020BCA1500X
1030FVC2500Y
1040KNM3500Y
1050hnn1290X
1060yyy1580X
1070Auuu1289X

Actually i have one requirement, i want to do Partial reload..

i know concept partial reload... Using ADD attributes

ADD Load  ID,

                 Category,

                 Sales,

                 Test

From Table_Name;

If i am reload 2 times, it's coming duplicate values..

i want to load only new records...   (using Partial reload)....

Thanks in Advance.........

1 Solution

Accepted Solutions
sunny_talwar

Sorry I missed a then:

IF NoOfRows('PartialReloadTable') > 0 then

   

    DROP Table PartialReloadTable;

ENDIF;

PartialReloadTable:

ADD Load  ID,

                Category,

                Sales,

                Test

From Table_Name;

View solution in original post

12 Replies
sunny_talwar

Try this:

IF NoOfRows('PartialReloadTable') > 0

    

     DROP Table PartialReloadTable;

ENDIF;

PartialReloadTable:

ADD Load  ID,

                 Category,

                 Sales,

                 Test

From Table_Name;

paulwalker
Creator III
Creator III
Author

Hi Sunny,

Not working..

It's showing script line error..

Anonymous
Not applicable

may be try:

LET vNoRows = NoOfRows('PartialReloadTable');

IF  vNoRows > 0 then

   

     DROP Table PartialReloadTable;

ENDIF;

PartialReloadTable:

ADD Load  ID,

                 Category,

                 Sales,

                 Test

From Table_Name;

m_woolf
Master II
Master II

Try:

ADD Load distinct

                 ID,

                 Category,

                 Sales,

                 Test

From Table_Name;

Kushal_Chawda

If IsPartialReload() then

drop Table Tab;

Tab:

ADD Load distinct

                 ID,

                 Category,

                 Sales,

                 Test

From Table_Name;

else

all other load scripts;

End if  

sunny_talwar

Sorry I missed a then:

IF NoOfRows('PartialReloadTable') > 0 then

   

    DROP Table PartialReloadTable;

ENDIF;

PartialReloadTable:

ADD Load  ID,

                Category,

                Sales,

                Test

From Table_Name;

paulwalker
Creator III
Creator III
Author

Thanks for reply everyone...

if(IsPartialReload()) then

Student:

ADD LOAD ID,

     Test

FROM

table_Name;

EXIT Script;

ENDIF;

Please can anyone explain this script.... why they are using Exit Script inside.

Kushal_Chawda

There is no need for Exit script here. If it's partial reload only the piece of code will run with ADD prefix inside if condition in else rest of the code will reside and finally there will be end if.

Anonymous
Not applicable

Hi Paul,

Partial reload is a reload where you can only reload any single table that you want to reload or you can load only that particular table.


so Exit Script  inside the script means,to load only that table if its partial load and stop executing rest of the script.


Hope this helps.


Regards

Neetha