Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
Partner
Partner

Circular References

I am 99.9% sure I know the answer to this, but I just need a few of the resident experts to sanity check me and say I am right before I take it to my company owner.

We have a table that contains clients, and clients are essentially the "hub" of a wheel-like data model.  Clients can have reservations, scbookings and cmbookings.  All three of these are stored in separate tables, and each of these tables is, essentially, like a spoke on that wheel. 

Then each of these three tables can have folios attached.

There is no way to load the folio table only once, right?  Because if I go from client to the three tables and then try and go from all three of those tables back into one single folio table, I'll get a circular reference.  From the research I have done, the recommended method is to load that folio table three times, which is actually what I am doing, but the table is huge (many millions of records) for some of my users and loading it three times crashes their machines due to lack of resources, so we were trying to find a way to load it only once.

Any assistance is much appreciated. 

6 Replies
Employee
Employee

Re: Circular References

Use only one table table for reservations, scbookings and cmbookings, using concatenate

Partner
Partner

Re: Circular References

Hmmm....an interesting idea that I had not thought of!

What if the three tables are all vastly different, and need to be able to be distinct so that they can be queried separately?  That won't work then, will it?

hemhund2016
Contributor

Re: Circular References

I would prefer using  the Link table with the Client ID and reservations, scbookings and cmbookings.

This way you will have one table for Fact data and ideal Star schema.

https://community.qlik.com/blogs/qlikviewdesignblog/2013/05/17/concatenate-vs-link-table

Thanks,

hemanth.

Employee
Employee

Re: Circular References

Use a field that enable you query apart

LOAD

     'reservations' as type,

other fields

from reservations.qvd(qvd);

concatenate LOAD

     'scbookings' as type,

other fields

from scbookings.qvd(qvd);

concatenate LOAD

     'cmbookings' as type,

other fields

from cmbookings.qvd(qvd);


Partner
Partner

Re: Circular References

I am following you, I believe.  In fact, I had something in mind where I hard coded a field in each table to be able to use as a selector to say "just show me the cmbookings records", which I think is what you are saying!

Thank you; I'll give this a go.

Partner
Partner

Re: Circular References

Thank you so much!  I'll take a look at this article and see if I can make it work!