Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

prabhu0505
Valued Contributor

Incremental load with Composite key

Hi All,

I want to implement incremental load with composite key, pls. give me suggestions.

Composite Key : Fields A, B, C, D make up the key. Here C is date Field.

Logic: Only Insert and Update. No Delete.

Thanks..

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Incremental load with Composite key

- autonumberhash... instead of concat (some goods readings on qlikviewnotes and qlikfix)

- store the primarykey calculated field in the qvd: you don't need to recalculate it every run

- some millions of records? don't  think they are a big number; but you can try to simulate the performance before

7 Replies
mdmukramali
Valued Contributor III

Re: Incremental load with Composite key

Dear,

Please can you attach some sample data.

Thanks,

Mukram

prabhu0505
Valued Contributor

Re: Incremental load with Composite key

ABCDEF
a1b11/1/2014d11025
a1b11/2/2014d11015
a1b11/3/2014d12030
a1b11/3/2014d113035
a2b21/1/2014d24045
a2b211/1/2014d22055
a21b21/1/2014d21565
MVP
MVP

Re: Re: Incremental load with Composite key

you can find some help in online help

see attachment

prabhu0505
Valued Contributor

Re: Re: Incremental load with Composite key

Hi Massimo,

I've currently 1 million record in the table expecting it to grow till 2 million within a year. So using string concatenation (A&'-'&B&'..)  will degrade the performance? Any other alternatives?

Thanks..

MVP
MVP

Re: Incremental load with Composite key

- autonumberhash... instead of concat (some goods readings on qlikviewnotes and qlikfix)

- store the primarykey calculated field in the qvd: you don't need to recalculate it every run

- some millions of records? don't  think they are a big number; but you can try to simulate the performance before

prabhu0505
Valued Contributor

Re: Incremental load with Composite key

My doubt is whether Autonumberhash will generate same key based on the combination of column.

Autonumberhash('a1','b1','01/01/2014',d1) will be same every time.

MVP
MVP

Re: Incremental load with Composite key

- hash is hash, collision is possible, perhaps someone of Qliktech can clarify that

- if you want to store the primary key in qvd I think you should use hash (128 or 256) instead of autonumberhash   

Community Browser