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

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

mapping table to create a key?

Hi all

I am trying to anonomise data for testing purposes by replacing it with an autonumber but as expected I am having some problems when using this on key fields

Original Code:

(ID1&'_'&ID2) as CombinedID,

Replace with Autonumber

AutoNumberHash

(ID1&'_'&ID2) as CombinedID,

The problem with this is that CombinedID is used in more that one table, so using autonumber breaks the links.  I think I mapping table could be used, but I'm not sure how to go about this - any advice would be mych appreciated!

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Autonumber(ID1&'_'&ID2) as CombinedID would create identical numbers for each ID1-ID2 combination during the same reload. It doesn't matter if you use it in different tables. You would still get the same values for the same combinations.

As long as all autonumbers are calculated in the same reload you get the same numbers. But if you store a table with calculated autonumbers in a qvd and load this in a later reload you can get numbers that are different from the autonumbers calculated during that reload. Autonumbers are not unique across reloads. If you need that you can try using the hashXXX functions.


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Autonumber(ID1&'_'&ID2) as CombinedID would create identical numbers for each ID1-ID2 combination during the same reload. It doesn't matter if you use it in different tables. You would still get the same values for the same combinations.

As long as all autonumbers are calculated in the same reload you get the same numbers. But if you store a table with calculated autonumbers in a qvd and load this in a later reload you can get numbers that are different from the autonumbers calculated during that reload. Autonumbers are not unique across reloads. If you need that you can try using the hashXXX functions.


talk is cheap, supply exceeds demand