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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Autonumber() question.

Hi!

In my source dataset I have a field called Vendor_invoice_number. It contains both numbers and text.

In my fact table I want to create a key field and then link to a dimension table for all invoice details.

Can I use autonumber like this:

In my fact table:

     autonumber(Vendor_Invoice_Number, '%VendorInvoiceNumber') as %VendorInvoiceNumber

And then later in script when i load my dimension the same statement:

     autonumber(Vendor_Invoice_Number, '%VendorInvoiceNumber') as %VendorInvoiceNumber

Will I get a key match at the right place?

I think this is the case, asking to be sure

Thx in advance!

Regards

Trond E

3 Replies
Not applicable
Author

Use autonumberhash128() function

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You are correct. Autonumber() looks to see if that value has been defined and if it has, uses the number. If the value has not been defined yet, then it increments the number adds the new value to the list.

This number starts from 1 when the load begins, so it is not well suited to incremental loads.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thank you both for your replies


Best regards

Trond Erik