Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

hammermill21
Contributor II

Concatenate & Synthetic Keys

Hello,

I currently have an app that has multiple data connections for different sites. They all have the same type of data but needs to be separated by the site.

It was recommended that I use concatenate for the load statements, which I did. everything works but I am getting a bunch of synthetic keys and i"m not sure what I am doing wrong. I have attached a sample if anyone can help.

Thank you!

1 Solution

Accepted Solutions
kaanerisen
Contributor III

Re: Concatenate & Synthetic Keys

Try to add "CONCATENATE (EQUIPMENT)" right before each equipment table after the first script tab. It should work.

Untitled.png

14 Replies
kaanerisen
Contributor III

Re: Concatenate & Synthetic Keys

That's really odd. Script seems fine to me. But somehow after each "RestConnectorMasterTable" script, qlik sense may add the result dataset to main datatable because of the similarity between main data and temp rest table. And every drop table script may cause breaking the concatenated table.

Try to add "NOCONCATENATE" right before each begining of "RestConnectorMasterTable" after first one. If the case is that, it should work.

Untitled.png

hammermill21
Contributor II

Re: Concatenate & Synthetic Keys

HI Kaan,

Nope, that's not working either, I'm still getting the synthetic keys. This is what the error shows:



RestConnectorMasterTable << RestConnectorMasterTable Lines fetched: 767 EQUIPMENT << RestConnectorMasterTable Lines fetched: 14,120 MinMaxDate << EQUIPMENT Lines fetched: 1 TempCal << AUTOGENERATE(150) Lines fetched: 150 Mastercalendar << TempCal Lines fetched: 150 $Syn 1 = Barcode+Username+Inspection Time+Item Type+Building+Floor+Location+Room Number+Description+Comments+Pass+Failure Mode+DateAdded+DateRetired+ReasonRetired+Make+Manufacturer+ModelNo+InspectionFrequency+New Barcode+Source $Syn 2 = Barcode+Username+Inspection Time+Item Type+Building+Floor+Location+Room Number+Description+Comments+Pass+Failure Mode+DateAdded+DateRetired+ReasonRetired+Make+Manufacturer+ModelNo+InspectionFrequency+New Barcode+Source+Get Date $Syn 3 = Barcode+Username+Inspection Time+Item Type+Building+Floor+Location+Room Number+Description+Comments+Pass+Failure Mode+DateAdded+DateRetired+ReasonRetired+Make+Manufacturer+ModelNo+OccupancyType+InspectionFrequency+New Barcode+Source $Syn 4 = Barcode+Username+Inspection Time+Item Type+Building+Floor+Location+Room Number+Description+Comments+Pass+Failure Mode+DateAdded+DateRetired+ReasonRetired+Make+Manufacturer+ModelNo+OccupancyType+InspectionFrequency+New Barcode+Source+Get Date

$Syn 5 = $Syn 1+$Syn 3 $Syn 6 = $Syn 1+$Syn 2 $Syn 7 = $Syn 1+$Syn 2+$Syn 3+$Syn 4 $Syn 8 = $Syn 5+$Syn 6+$Syn 7 Creating search index Search index creation completed successfully

App saved

Finished with error(s) and/or warning(s)

0 forced error(s)

8 synthetic key(s)

MVP
MVP

Re: Concatenate & Synthetic Keys

What kind of information is it in the two first tables? What is the difference? The second one is called inventory but what is the first one - isn't that inventory as well?

praveenkumar_ma
Contributor

Re: Concatenate & Synthetic Keys

Hi Elizabeth,

try using the Qualify /Unqualify functions to avoid synthetic keys.

this might be helpful

thanks

PM

kaanerisen
Contributor III

Re: Concatenate & Synthetic Keys

Ohh I see now, You have created a table named "Equipment" on each script tab. That's why syn tables are generating.

That's defineteey normal. I guess you should concatanate the first tables in each tab to Equipment table that you generate first.

What is your goal by the way?

vvira1316
Valued Contributor II

Re: Concatenate & Synthetic Keys

kaanerisen
Contributor III

Re: Concatenate & Synthetic Keys

Try to add "CONCATENATE (EQUIPMENT)" right before each equipment table after the first script tab. It should work.

Untitled.png

hammermill21
Contributor II

Re: Concatenate & Synthetic Keys

Hey Petter,

No, the first one is inspection data and the second is inventory information. So it's different data per site.

hammermill21
Contributor II

Re: Concatenate & Synthetic Keys

Hey Kaan,

That seemed to work!!!!

THANK YOUUUUU

Now I'm going to try and build the app and make sure it's working.

Thank you again!!