Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
adamdavi3s
Master
Master

autonumbering multiple key field

Hi All,

For the first time I have just autonumbered one of my key fields (previously a composite key) as I am looking at reducing some of my storage spaces.

On 8m rows this reduced my file size by a whopping 90mb. (370 to 280).


This is obviously my major fact table, but I do have other key fields which have a large number of rows.

I've read Rob's blog and searched on here, but I am just wondering what happens if I autonumber some more key fields, will these cause a clash as they start on 1 again, or will the autonumber continue throughout the script?

This was one bad key, normally my key field is 'XXX' &rowno() where XXX = some alpha characters, so they should be relatively efficient anyway

1 Solution

Accepted Solutions
Not applicable

load with this script and look for data and keys.

key_a_l1:

load *,AutoNumber(F1,'a') as key1;

LOAD * INLINE [

    F1

    A

    B

   

];

key_a_l2:

load *,AutoNumber(F2,'a') as key2;

LOAD * INLINE [

    F2

    B

];

key_b:

load *,AutoNumber(F3,'b') as key3;

LOAD * INLINE [

    F3

    B

];

key_noname_l1:

load *,AutoNumber(F4) as key4;

LOAD * INLINE [

    F4

    A

    B

    C

];

key_noname_l2:

load *,AutoNumber(F5) as key5;

LOAD * INLINE [

    F5

    C

    B

];

View solution in original post

1 Reply
Not applicable

load with this script and look for data and keys.

key_a_l1:

load *,AutoNumber(F1,'a') as key1;

LOAD * INLINE [

    F1

    A

    B

   

];

key_a_l2:

load *,AutoNumber(F2,'a') as key2;

LOAD * INLINE [

    F2

    B

];

key_b:

load *,AutoNumber(F3,'b') as key3;

LOAD * INLINE [

    F3

    B

];

key_noname_l1:

load *,AutoNumber(F4) as key4;

LOAD * INLINE [

    F4

    A

    B

    C

];

key_noname_l2:

load *,AutoNumber(F5) as key5;

LOAD * INLINE [

    F5

    C

    B

];