Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Zirva
Contributor III
Contributor III

Data loading and synthetic keys

I have multiple qvds uploaded in my data load editor with each qvd containing a few datapoints that have similar data but different column names. I created aliases for each to join each other but that created multiple synthetic keys. I want to join these tables so that these common fields can become filters on the dahboard. I can not concatenate the tables since the names are not the same in each table. Adding an example of data below. 

Table 1: 
Load
ProductName
Sales
Cost
Projects
City
From[Source]

Table 2:
Load
Products
Profit
Cost
SKU
ProjectName
CityName

Table3: 
Product
PersonID
PersonName
CityEnName
Project

The filters that I want to create are Product Names, Project Names & City Name. 
Please suggest how. I also tried creating joins but creating multiple joins for more than 20 tables doesn't work either. 

Labels (4)
4 Replies
mpc
Partner - Specialist
Partner - Specialist

Hi, 

To resolve synthic keys, you can use function like Hash128 or Autonumber. 
You can concatenate tables too, by rename fields. 

Regards

From MPC (and Next Decision) with love
Zirva
Contributor III
Contributor III
Author

@mpc can link or explain more on the Hash128 or Autonumber approach since I havent seen it anywhere. Also for concatenation, we need the same granularity in the tables which doesnt exist in my case. Im trying to use the Link approach but the field names are different as well in my data and its not picking the aliases. Any help will be appreciated. 

mpc
Partner - Specialist
Partner - Specialist

No problem, 

For instance, bellow two tables:
Table1:
Load A, B, C from MySource;

Table 2:
Load A, B, D from MySource2; 

It will by default create a Synthetic key on A, and B. 
To resolve this, you can use Hash functions, for instance: 


Table1:
Load Hash128(A,B) as Key, C from MySource;
Table2:
Load Hash128(A,B) as Key, D from MySource2;

Hash128 will return an unique value for each combinaison for A and B value, and then you can use it as key. 
Autonumber will generate a sequence (1, 2... n) values for each combinaison of A and B, but depending of the load order, so it can be use as a key but only in the final app. 

Is this more clear for you ? 

From MPC (and Next Decision) with love
Zirva
Contributor III
Contributor III
Author

Do all the keys need to have the same fields? 
For eg,

Table 1

A,

B,

Table 2: 

A

F

D

Table 3

A, 

F

C

E

but F & B have different names but the same data that I want to map with each other also. Eg, F is Products & B ProductName.