Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Use autonumberhash128() function
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
Thank you both for your replies
Best regards
Trond Erik