Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
manoranjan_d
Specialist
Specialist

Incremental load for maintaining only insert and updated records in seperate table

Hi all,

In the incremental load insert and update are happening in single table, but my client is saying insert have to separate table and updation have to be in separate table. how to do this?

example below is sample data(source data)

 

IDNameEventRatiodate
1xxx1A10001-06-17
2xxx2B20002-06-17
3xxx3C30003-06-17
4xxx4A40004-06-17
5xxx5B50005-06-17
6xxx6C60006-06-17
7xxx7A70007-06-17
8xxx8B80008-06-17
9xxx9C90009-06-17
10xxx10A1000

10-06-17

Requirement1:

Now suppose a new record have been inserted in the above source  data table

example

11 XXX1 A 1100 20-06-17


then the insert table in qlikview should have to  be in the below output

output of insert table:

IDNameEventRatiodate
1xxx1A10001-06-17
2xxx2B20002-06-17
3xxx3C30003-06-17
4xxx4A40004-06-17
5xxx5B50005-06-17
6xxx6C60006-06-17
7xxx7A70007-06-17
8xxx8B80008-06-17
9xxx9C90009-06-17
10xxx10A100010-06-17
11xxx11A110020-06-17

so the insert table should have old records + new reocrds

Requirement 2:

Now suppose a old record have been updated in the above source data table

example

1 XXX1 A 2000 20-06-17

then the update table in qlikview should  have to be  in the below output

output of Update table:

IDNameEventRatiodate
1xxx1A10001-06-17
1XXX1 A200020-06-17

So the update table should have the old record + new updated  record.

How achieve this ?

1 Solution

Accepted Solutions
Kushal_Chawda

manoranjan.d‌  if you got the answer then please close the thread by marking answer as correct. I have seen that most of your threads are not closed.

View solution in original post

19 Replies
prat1507
Specialist
Specialist

Hi

May be this

//For Data Update table

No Concatenate Update:

load Id, Name, Event, Ratio, Date

From 'Data Source'

Where Exists(Id);

//For Data Insert table

Concatenate Insert :

load Id, Name, Event, Ratio, Date

From 'Data Source'

Where Not Exists(Id);

Regards

Pratyush

manoranjan_d
Specialist
Specialist
Author

can u try this in qvw and provide me  the qlikview file, since i tried this way but can't meet the output

manoranjan_d
Specialist
Specialist
Author

can any one try this reply me?

prma7799
Master III
Master III

Please check this file.

Kushal_Chawda

What is your source, database or Excel?

manoranjan_d
Specialist
Specialist
Author

in ur qlikview ur output isnot meeting just check the requirement2

Requirement 2:

Now suppose a old record have been updated in the above source data table

example

1 XXX1 A 2000 20-06-17

then the update table in qlikview should  have to be  in the below output

output of Update table:

IDNameEventRatiodate
1xxx1A10001-06-17
1XXX1A2000

20-06-17

we are getting only one sno id for 1

prat1507
Specialist
Specialist

PFA the app with data files.


Regards
Pratyush

manoranjan_d
Specialist
Specialist
Author

Excel only u can use the sample data.

manoranjan_d
Specialist
Specialist
Author

Hi prat1507


i need only two tables in the data model. understand my requirement pls


see source we have 10 records


tomo i going to add new record as 11 so as per the req1 we need old + new reords so we can achive this in a simple way


now coming req2:

day after tomo i m updating the old record exaple ID 1 , so my client want to compare the old record+ new updated records


these two req has to be sep table.