Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Incremental reload

Hi,

I have a QlikView application which loads the data from a
oracle database...

SELECT * FROM DB."DATE_DIMENSION";

Is there a way to do an incremental update of the data (only reload new data)
without loading the entire data of the db.

How is it possible...?

62 Replies
Not applicable
Author

Hi Rikab,

3 Types of Incremental Loads:

1. Only Insertion in the table

2. Insertion & updation in the table

3. Insertion, Updation & Deletion in the table

P1 - Primary Key 1

C1 - Column 1

C2 - Column 2

D1 - Date Field 1

Only Insertion in the table:

Let say there is only insertion of record is happing in a table (T1). Now you want to do the incremental load for the table. You need to have a date field (D1) in the table (T1);

First step before doing a incremental load is to get the current snap shot of the table and convert into QVD. Pls find the eg code for the above situation;

T1:

SQL Select P1, C1, C2, D1 from T1 where D1= "Yesterday's Date"; à This set has only yesterday's data retrieved from db.

Load P1, C1, C2, D1 from T1.QVD where D1<"Yesterday's Date"; à This set has data less than the yesterday's date.

Store T1 as T1.QVD à Now the T1 QVD has full set of data until yesterday.

Insertion & Updation:

Let say there is insertion & updation of record is happing in a table (T1). Now you want to do the incremental load for the table. You need to have a primary (P1) and date field (D1) in the table (T1);

First step before doing a incremental load is to get the current snap shot of the table and convert into QVD. Pls find the eg code for the above situation;

T1:

SQL Select P1, C1, C2, D1 from T1 where D1= "Yesterday's Date"; à This set has yesterday's both inserted & updated data retrieved from db. Here the date field should affect by both insertion & updation of the record in the db.

Load P1, C1, C2, D1 from T1.QVD where D1<"Yesterday's Date" and not exists(P1,P1); à This set has data less than the yesterday's date but not the updated records (updated records are not available in this set because of NOT EXISTS command).

Store T1 as T1.QVD à Now the T1 QVD has full set of inserted & updated data until yesterday.

Insertion, Updation & Deletion:

Let say there is insertion, updation & physical deletion of record is happing in a table (T1). Now you want to do the incremental load for the table. You need to have a primary (P1) and date field (D1) in the table (T1);

First step before doing a incremental load is to get the current snap shot of the table and convert into QVD. Pls find the eg code for the above situation;

T1:

SQL Select P1, C1, C2, D1 from T1 where D1= "Yesterday's Date"; à This set has yesterday's both inserted & updated data retrieved from db. Here the date field should affect by both insertion & updation of the record in the db.

Load P1, C1, C2, D1 from T1.QVD where D1<"Yesterday's Date" and not exists(P1,P1); à This set has data less than the yesterday's date but not the updated records (updated records are not available in this set because of NOT EXISTS command).

Inner Join SQL Selection P1 from T1; à This command executes only current available P1 records. Where it removes the records from above loaded Table T1 if it is not available in db.

Store T1 as T1.QVD à Now the T1 QVD has full set of inserted & updated data until yesterday.

I hope the above to understand better.



Not applicable
Author

Hey Neetu,

Many thanks for the document but I have already seen that which has been sent by you only. I am not able to understand how increment load works in it. That's the reason I have attached one small document in it to make me understand. Requesting you to work on it and provide me some solution.

Not applicable
Author

Hi Rajesh,

Hope I am understanding your terms correctly.

1. Only Insertion in the table --> Incremental load will happen only if any records are inserted in to the DB and will not happen if the data is updated or deleted.

2. Insertion & updation in the table --> Incremental load will happen only if any new rows are inserted or if any new rows are updated.

3. Insertion, Updation & Deletion in the table --> Incremental load will happen there is any new rows inserted,existing rows updated and existing rows deleted.

Please correct me if I am wrong any where so that I can proceed further.



Not applicable
Author

Hi Rajesh and Neetu,

Requesting you to work on it so that it is understandable for me. I don't think it will take much time also as it has only one table in it.

Please do the required changes in my document and attach it.

neetu_singh
Partner - Creator III
Partner - Creator III

Hi Rikab,

I have uploaded your qlikview application and try to solve your query ASAP.

Bye nd TC

Neetu Singh

Not applicable
Author

Hi Neetu,

I think you have forgot attach the file. Requesting you to look reattach the file and send it to me.

neetu_singh
Partner - Creator III
Partner - Creator III

Hi Rikab,

Sorry for previous mail. Now, please find the attached file.

Not applicable
Author

Hi Neetu,

Many thanks I will check whether it works as per my requirement or not. Hope you must be knowing my requirement. My requirement was do the incremental load with insert.update and delete.

Does the work done by you does all these requirement.

Not applicable
Author

Hi Neetu,

By the way I tried your application after inserting the data in to the excel sheet. But it seems there is no record getting inserted in to the qlikview. I have attached the entire folder again. The inserted record is the last row of the excel sheet. Please check!

Not applicable
Author

Hi Neetu,

I checked the document which you have attached. It is not working as expected. Requesting you to have a look into it again and help me out.

Thanks and in advance