As companies grow from SMB to enterprise size, a lot changes across the organization. These changes affect everything from technology to organizational hierarchy and even mission statements.

From a technology standpoint, security and compliance requirements usually increase and more people need access to data. This makes things tricky due to the sheer number of systems that might be in place, including a cloud data warehouse, ETL, and BI/analytics tools.

Can a Hub and Spoke Data Model Help?

One of our clients was going through this transition and decided to implement a hub and spoke model in their Looker instance. While the concept for hub and spoke is not new, it is more recent in Looker modeling.

The general concept is that there is a hub model which contains validated central business logic that can then be imported and further built upon in the spoke models. The spokes themselves utilize the central hub for their own liking and have the flexibility to quick build and prototype their own models while keeping the main hub under control and unaffected by their changes.

Hub and spoke architecture: hub and spoke data modeling in Looker

This has allowed our client to have a central enterprise reporting hub, which supports company-wide metrics, reporting, and dashboarding. Alongside that, specific verticals/squads have their own spokes where they can extend files from the hub, changing them as needed. Looker helps accomplish this architecture in a unique way, but it does require some foundational setup to work properly.

Tips for Setting Up a Hub and Spoke Data Model in Looker

Here are a few key points regarding the hub and spoke data modeling setup for Looker:

  • Each spoke has its own LookML project with its own Github Repository for proper version control.
  • All LookML developers would have access to the hub project, but you should restrict who can push changes to the hub through a PR process. This way you can grant Github repo access to only specific developers. You can go to the project settings in Looker to enable this.
  • Model files cannot be extended, but Explore, Views, and other files can be.

Why & When to Use a Hub and Spoke Model in Looker

Having built this framework for a variety of clients, here are some common problems we’ve seen and ways to utilize a hub and spoke framework.

Problems:

  • Confusion around how metrics are calculated
  • Repetition of views across projects
  • PR review process takes too long
  • Explore menu has too many options
  • Several LookML Developers working within the same models and projects

Solution:

  • Spokes for different departments so metrics are consistent
  • Hub contains common definitions that spokes can import
  • Spokes can develop independently to the Hub project and PR process
  • Define explore in Spokes so only those teams see specific Explores
  • Spokes can divide LookML Developers to keep consistency

Additional Considerations for a Hub and Spoke Data Model

Above are just a few of the problems that can be solved using the hub and spoke architecture. Further considerations are deciding what should absolutely belong in the hub. Like we mentioned earlier, the hub should contain the following:

  • standard field definitions
  • core explores with common joins already defined
  • dimensions and measures that would be used company wide (e.g. avoid one offs)
  • multi-use PDTs

On the other hand, the department spokes will contain only:

  • department-specific models (i.e. Sales performance – quotas, revenue generated, etc.)
  • views designed by and for that specific department, extending hub views but creating your own dimensions/measures for the department
  • specific schemas that can only be accessed by that department

Need Help with Looker?

If you need help with your Looker instance, our Looker experts are here to help! Contact us or request a Looker Health Check.


Looker Health Check

Improve Looker performance and speed

Maximize your Looker investment and improve performance with a Looker Health Check. Our data experts will review your Looker instance to uncover issues and walk through detailed recommendations and an implementation plan.


Looker Health Check
Looker Health Check