Role Playing Models / Model Aliases

Hi All,

Star schema modelling is a common form of modelling used in BI reporting layers.

For instance see the following for definitions and usage:

When creating a star schema you can link the same dimension table multiple times to a fact table. This happens quite frequently, and since within Holistics each model is treated as the same table you can’t link the same dimension table multiple times to a fact table, or else you end up with a circular dependency.

At the moment you have to create a whole new table, defining the same columns and custom dimensions time and time again in order to do this. This is obviously time consuming but also extremely hard to maintain as you have to make the same change in multiple places when an update is required to the model.

A better way to do this is to have a mechanism in place to reference another model (like a database view) that we can rename and use as such. Then we can reference multiple times, but only ever have to update the base model to get any changes pushed through.

For instance this could take place in the dataset builder when you pull in a model you can give it a an alternative name, allowing you to import the same model multiple times but join as a different table. Then in the SQL that is generated you can use the alternative name as an AS rename i.e.

  INNER JOIN my_dim_table AS from_table ON my_fact_table.from_col =
  INNER JOIN my_dim_table AS to_table ON my_fact_table.to_col =

And within the explore/report creation page you can have each table listed with their alternative names as different tables you can bring in columns from.

I believe Looker achieves the same in an explore:

Again the benefits to the approach are:

  1. Single definition of a model
  2. Star schema designs are much easier
  3. Renaming a model for context, rather than using as a general table i.e. origin and destination geo models can reference the same underlying geo model

Hi Holistics team,

In our workspace we have some key shared models that we reuse in many datasets like a dim_date model for instance.

When integrating this model in a dataset, it would be nice if we could just update the model label in order to provide more context and clarity to the end user.
=> Instead of simply Date we could call it invoice date or snapshot date depending on the context.

In some dataset, we also sometimes need to add the same model multiple times. This feature would be useful for this purpose as well.

Best regards,

I guess I should have done a little bit more digging before posting this because @DataGeekDude asked the same thing and explained it a lot better than me here :sweat_smile:.

If I understood correctly, AML 2.0 will solve the first usecase (changing the label fo a model in a specific dataset) but not the second one (using multiple occurrences of the same model in a dataset).

Yes unfortunately, as I understand it, that there is no solution to the model aliasing as of yet.

Hi @dacou
As far as I understand, you want to be:

  1. Able to change the model labels in a specific dataset:
    For example, the model ecommerce_users can be called Buyer Information in dataset A, but can also be Customer Details in dataset B.

  2. Able to add the same model multiple times to a dataset

Please let me know if I misunderstood anything.
If it’s your case, unfortunately, we haven’t supported them at the moment, and even AML 2.0 won’t help solve these issues.
Instead, I believe that the role playing model can be the solution for both of them. I’ll merge your case to Craig’s post, so that everyone can upvote this request :blush:

That’s exactly my need @di.hoang :ok_hand:
What are your plans on this ? Can you share any news ?

We do have a plan to support it but for now I cannot share with you the exact timeline.
I will definitely keep you in the loop for any update.

1 Like