Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jgarciaf106
Creator
Creator

How to Create Generic Keys for Common table Fields?

Hi,

I am trying to create generic Keys to group common fields form some data tables I have Into Qlikview,

But when loading the script it warms me about "One or more loops have been detected in your database structure. Loops may cause ambiguous results and should therefore be avoided. Loop(s) will be cut by setting one or more tables as loosely coupled." , even-though the common fields are not named the same (EX: HC_MONTH, ES_MONTH and it goes in that trend for all all tables) it creates the loop.

Here Is the Script I Used:


// Dimensional Tables//

[Dimensional Cluster]:

Load `ES_CLUSTER`, `ES_CLUSTER` As %CLUSTER Resident EXIT_SURVEY;

Concatenate([Dimensional Cluster])

Load `HC_CLUSTER`, `HC_CLUSTER` As %CLUSTER Resident  HEAD_COUNT;

Concatenate([Dimensional Cluster])

Load `Promo_CLUSTER`, `Promo_CLUSTER` As %CLUSTER Resident PROMOTION;

Concatenate([Dimensional Cluster])

Load `PDP_CLUSTER`, `PDP_CLUSTER` As %CLUSTER Resident PDP;

Concatenate([Dimensional Cluster])

Load `Reco_CLUSTER`, `Reco_CLUSTER` As %CLUSTER Resident RECOGNITION;

Concatenate([Dimensional Cluster])

Load `Reme_CLUSTER`, `Reme_CLUSTER` As %CLUSTER Resident REMEDY;

Concatenate([Dimensional Cluster])

Load `Tal_CLUSTER`, `Tal_CLUSTER` As %CLUSTER Resident TALENT;

Concatenate([Dimensional Cluster])

Load `TalPro_CLUSTER`, `TalPro_CLUSTER` As %CLUSTER Resident TALENT_PROFILE;

Concatenate([Dimensional Cluster])

Load `TO_CLUSTER`, `TO_CLUSTER` As %CLUSTER Resident TURN_OVER;

Concatenate([Dimensional Cluster])

Load `VC_CLUSTER`, `VC_CLUSTER` As %CLUSTER Resident VOC;

[Dimensional Country]:

Load `ES_COUNTRY`, `ES_COUNTRY` As %COUNTRY Resident EXIT_SURVEY;

Concatenate([Dimensional Country])

Load `HC_COUNTRY`, `HC_COUNTRY` As %COUNTRY Resident  HEAD_COUNT;

Concatenate([Dimensional Country])

Load `Promo_COUNTRY`, `Promo_COUNTRY` As %COUNTRY Resident PROMOTION;

Concatenate([Dimensional Country])

Load `PDP_COUNTRY`, `PDP_COUNTRY` As %COUNTRY Resident PDP;

Concatenate([Dimensional Country])

Load `Reco_COUNTRY`, `Reco_COUNTRY` As %COUNTRY Resident RECOGNITION;

Concatenate([Dimensional Country])

Load `Reme_COUNTRY`, `Reme_COUNTRY` As %COUNTRY Resident REMEDY;

Concatenate([Dimensional Country])

Load `Tal_COUNTRY`, `Tal_COUNTRY` As %COUNTRY Resident TALENT;

Concatenate([Dimensional Country])

Load `TalPro_COUNTRY`, `TalPro_COUNTRY` As %COUNTRY Resident TALENT_PROFILE;

Concatenate([Dimensional Country])

Load `TO_COUNTRY`, `TO_COUNTRY` As %COUNTRY Resident TURN_OVER;

Concatenate([Dimensional Country])

Load `VC_COUNTRY`, `VC_COUNTRY` As %COUNTRY Resident VOC;

[Dimensional Location]:

Load `ES_LOCATION`, `ES_LOCATION` As %LOCATION Resident EXIT_SURVEY;

Concatenate([Dimensional Location])

Load `HC_LOCATION`, `HC_LOCATION` As %LOCATION Resident  HEAD_COUNT;

Concatenate([Dimensional Location])

Load `Promo_LOCATION`, `Promo_LOCATION` As %LOCATION Resident PROMOTION;

Concatenate([Dimensional Location])

Load `PDP_LOCATION`, `PDP_LOCATION` As %LOCATION Resident PDP;

Concatenate([Dimensional Location])

Load `Reco_LOCATION`, `Reco_LOCATION` As %LOCATION Resident RECOGNITION;

Concatenate([Dimensional Location])

Load `Tal_LOCATION`, `Tal_LOCATION` As %LOCATION Resident TALENT;

Concatenate([Dimensional Location])

Load `TalPro_LOCATION`, `TalPro_LOCATION` As %LOCATION Resident TALENT_PROFILE;

Concatenate([Dimensional Location])

Load `TO_LOCATION`, `TO_LOCATION` As %LOCATION Resident TURN_OVER;

Concatenate([Dimensional Location])

Load `VC_LOCATION`, `VC_LOCATION` As %LOCATION Resident VOC;

[Dimensional Business Unit]:

Load `ES_BUSINESS_UNIT`, `ES_BUSINESS_UNIT` As %BUSINESS_UNIT Resident EXIT_SURVEY;

Concatenate([Dimensional Business Unit])

Load `HC_BUSINESS_UNIT`, `HC_BUSINESS_UNIT` As %BUSINESS_UNIT Resident  HEAD_COUNT;

Concatenate([Dimensional Business Unit])

Load `Promo_BUSINESS_UNIT`, `Promo_BUSINESS_UNIT` As %BUSINESS_UNIT Resident PROMOTION;

Concatenate([Dimensional Business Unit])

Load `PDP_BUSINESS_UNIT`, `PDP_BUSINESS_UNIT` As %BUSINESS_UNIT Resident PDP;

Concatenate([Dimensional Business Unit])

Load `Reco_BUSINESS_UNIT`, `Reco_BUSINESS_UNIT` As %BUSINESS_UNIT Resident RECOGNITION;

Concatenate([Dimensional Business Unit])

Load `Reme_BUSINESS_UNIT`, `Reme_BUSINESS_UNIT` As %BUSINESS_UNIT Resident REMEDY;

Concatenate([Dimensional Business Unit])

Load `Tal_BUSINESS_UNIT`, `Tal_BUSINESS_UNIT` As %BUSINESS_UNIT Resident TALENT;

Concatenate([Dimensional Business Unit])

Load `TalPro_BUSINESS_UNIT`, `TalPro_BUSINESS_UNIT` As %BUSINESS_UNIT Resident TALENT_PROFILE;

Concatenate([Dimensional Business Unit])

Load `TO_BUSINESS_UNIT`, `TO_BUSINESS_UNIT` As %BUSINESS_UNIT Resident TURN_OVER;

Concatenate([Dimensional Business Unit])

Load `VC_BUSINESS_UNIT`, `VC_BUSINESS_UNIT` As %BUSINESS_UNIT Resident VOC;

[Dimensional Month]:

Load `ES_MONTH`, `ES_MONTH` As %MONTH Resident EXIT_SURVEY;

Concatenate([Dimensional Month])

Load `HC_MONTH`, `HC_MONTH` As %MONTH Resident  HEAD_COUNT;

Concatenate([Dimensional Month])

Load `Promo_MONTH`, `Promo_MONTH` As %MONTH Resident PROMOTION;

Concatenate([Dimensional Month])

Load `PDP_MONTH`, `PDP_MONTH` As %MONTH Resident PDP;

Concatenate([Dimensional Month])

Load `Reco_MONTH`, `Reco_MONTH` As %MONTH Resident RECOGNITION;

Concatenate([Dimensional Month])

Load `Reme_MONTH`, `Reme_MONTH` As %MONTH Resident REMEDY;

Concatenate([Dimensional Month])

Load `TO_MONTH`, `TO_MONTH` As %MONTH Resident TURN_OVER;

Concatenate([Dimensional Month])

Load `VC_MONTH`, `VC_MONTH` As %MONTH Resident VOC;

[Dimensional Quarter]:

Load `Tal_QUARTER`, `Tal_QUARTER` As %QUARTER Resident TALENT;

Concatenate([Dimensional Quarter])

Load `TalPro_QUARTER`, `TalPro_QUARTER` As %QUARTER Resident TALENT_PROFILE;

// End of Dimensional Tables//

If I load only one of the dimensional table (Name I used for each common Field), The look is not created, but I Try to load 2 dimensional tables It gives me the message.

What can I do to resolve?

3 Replies
Anil_Babu_Samineni

How is your data model looks like

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jonathandienst
Partner - Champion III
Partner - Champion III

>>even-though the common fields are not named the same (EX: HC_MONTH, ES_MONTH and it goes in that trend for all all tables) it creates the loop.

But you are aliasing them all to the same name:

[Dimensional Cluster]:

Load `ES_CLUSTER`, `ES_CLUSTER` As %CLUSTER Resident EXIT_SURVEY;

Concatenate([Dimensional Cluster])

Load `HC_CLUSTER`, `HC_CLUSTER` As %CLUSTER Resident  HEAD_COUNT;

This is what is causing the logical loop(s).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

This may help:

Generic keys

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