Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikuser222
Creator
Creator

Help with Incremental load with unique records

 Hi All,

Can anyone please help me with Incremental load with unique records.

For example:

load * inline [
ID, unit, count, month, key, key2
123, 1, 1, 4,123114,123114
123, 1, 1, 4,123114,123114
123, 2,0,4,123204,123204
];

Concatenate
load * inline [
ID, unit, count, month,key,key2
123, 1, 1, 3,123113,123113
123, 1, 1, 3,123113,123113
123, 2,0,3,123203,123203
]
where not Exists(key2,key);

 

I need output with 6 records but I'm getting 5 records. How to handle this situation to get 6 records as output?

 

Thanks

Labels (1)
5 Replies
YJ_SG
Contributor III
Contributor III

Add RowNo() when load. I modified inline table as below, it shows 6 records.

load * inline [
ID, unit, count, month, key, key2, row
123, 1, 1, 4,123114,123114,1
123, 1, 1, 4,123114,123114,2
123, 2,0,4,123204,123204,3
];

Concatenate
load * inline [
ID, unit, count, month,key,key2,row
123, 1, 1, 3,123113,123113,1
123, 1, 1, 3,123113,123113,2
123, 2,0,3,123203,123203,3
];

qlikuser222
Creator
Creator
Author

Thanks for your reply,

 

Unfortunately it still doesn't work and not giving me the expected results.

 

Is there anyway Qlik can handle situations like this?

 

Thanks

YJ_SG
Contributor III
Contributor III

check attached file

Saravanan_Desingh

Can you check this?

tab1:
load *,ID&unit&count&month&key&key2 As Key3 inline [
ID, unit, count, month, key, key2
123, 1, 1, 4, 123114, 123114
123, 1, 1, 4, 123114, 123114
123, 2, 0, 4, 123204, 123204
];

Concatenate (tab1)
load * inline [
ID, unit, count, month, key, key2
123, 1, 1, 3, 123113, 123113
123, 1, 1, 3, 123113, 123113
123, 2, 0, 3, 123203, 123203
]
where not Exists(Key3,ID&unit&count&month&key&key2);
qlikuser222
Creator
Creator
Author

 

Thanks For your reply,

If I use the below code I get expected results, but when I run the Qlik again by loading Tab1+tab2 results in QVD and concatenating it with Tab3 (which has tab2 data) it gives me duplicates and end result would be like below

 

ID, unit, count, month, key, key2,Key3

123, 1, 1, 4, 123114, 123114, 1231 1 4123114123114
123, 1, 1, 4, 123114, 123114,1231 1 4123114123114
123, 2, 0, 4, 123204, 123204,12320 4123114123204
123, 1, 1, 3, 123113, 123113, -
123, 1, 1, 3, 123113, 123113, -
123, 2, 0, 3, 123203, 123203, -

123, 1, 1, 3, 123113, 123113, -
123, 1, 1, 3, 123113, 123113, -
123, 2, 0, 3, 123203, 123203, -

 

How to avoid getting duplicates , please help.

Thanks