Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

it my data model perfect ?

Hi All

After few people input on my data model , today i have notice in order to remove $syn key , as i need to create :-

cust_id_ap

cust_id_aging

cust_id_sales

This make me headache on maintenance., So am i right that my data model is perfect now ?

perfect data model.png

8 Replies
Not applicable

Perfect, no - Ideally you should create specific keys rather than let them be auto-generated, so then you know what the significance and relationship of the keys is.

However, Qlik is generally pretty good at creating synthetic keys accurately, so as long as you validate the outputs and are getting the values you expect, then there is no issue with the keys generated. However, each time you alter the model, the synthesis increases the chance of a hard to trace error slipping in.

Best practice, manually create the keys.

L

paulyeo11
Master
Master
Author

Hi Lee

I see am I right to sale that for APKey which I created in AP Table and Sales Table , and for these 2 table I only create one cust_id right ? So the sync key will not appear ? It is correct ?

Paul Yeo

Director

www.tdstech.com<http://www.tdstech.com>

HP+6285883521036 Indo

Not applicable

If you are happy with the overall schema, you could create the Key Table: i.e.,

LOAD

     SOURCE & '_' &aging AS AP_TABLE_KEY,

     SOURCE & '_'&AR_KEY&'_'&custid AS Q_DOD_KEY,

     ...

RESIDENT

[Fact Tables]

And then create the composite key in each of the tables that sources off it.

You'd also need to remove any fields that create the synthetic keys from the ancillary tables, and make sure that no UID's are lost. How you go about that would depend on how you are bringing in the data for those tables.

paulyeo11
Master
Master
Author

Hi Lee

I think you are try to teach me how to create link table , so that data model will be look nice , right ?

! ! ! !

I try to load the script :-

SOURCE & '_' &aging AS AP_TABLE_KEY

it create a field for AP_TABLE_KEY , which i think is correct.

When i add script :-

SOURCE & '_'&ARKey& '_' &cust_id AS Q_DOD_KEY

I Get error msg on field not found on ARKey

My overall script as below :-

LOAD

  

SOURCE & '_' &aging AS AP_TABLE_KEY,

SOURCE & '_'&ARKey& '_' &cust_id AS Q_DOD_KEY  // Get error msg on field not found on ARKey

  

RESIDENT

AP_TABLE;

Anil_Babu_Samineni

Why not remove the Synthetic Keys? Synthetic keys are not bad for dashboards. But, See this as well

Should We Stop Worrying and Love the Synthetic Key?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
paulyeo11
Master
Master
Author

Hi Anil

Thank you for your sharing.

Yes , I am aware of benefit of the $sync key .

I also saw the link talk about sync key by the name of john . He no more active nowadays

For me now I just want to learn about create a link table. Just to make my data model look nice.

Paul Yeo

Director

www.tdstech.com<http://www.tdstech.com>

HP+6285883521036 Indo

Anil_Babu_Samineni

Hope this help you. This is very simple and data model might be good. Try this way

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
paulyeo11
Master
Master
Author

Hi Anil

Very informative , thank a lot.

Paul Yeo

Director

www.tdstech.com<http://www.tdstech.com>

HP+6285883521036 Indo