Architecture Advisory: Dynamic Model Routing for Embedded User-Defined Dashboards (UDDs)

  • Dashboards: users have permissions to create their own (UDDs) by choosing fields from an Explore we provide.
  • Target Behavior: The underlying query must target different databases depending on the date range requested:
    • 2025 Data (Historical): Must query PostgreSQL
    • 2026+ Data (Active): Must query Snowflake

We created two LookML models sharing a single LookML view file, using conditional Liquid to resolve differences in dialect and schema:

  • Model 1: snowflake.model.lkml (Points to Snowflake connection)
  • Model 2: postgres.model.lkml (Points to Postgres connection)
  • View logic (table1.view.lkml)
    view: table1 {
    derived_table: {
    sql:
    {% if _model._name == ‘snowflake’ %}
    SELECT * FROM a
    {% else %}
    SELECT * FROM b
    {% endif %} ;;
    }

The Core Problem (The Blocker)

Once an embedded user saves an Explore as a User-Defined Dashboard (UDD):

  1. Hardcoded Model Binding: Looker hardcodes "model": "snowflake" (or "postgres") directly inside each tile’s query object (query.model).
  2. No URL Parameterization: Unlike LookML dashboards (which support model_name::dashboard_name), UDDs use numerical IDs (/dashboards/123), and there is no native way to override or blank out the model parameter via the embed URL.
  3. No Dynamic UDD-to-LookML Conversion: Because end-users are embedded consumers and do not have LookML developer permissions or Git deploy rights, converting their UDDs into LookML dashboards on the fly is not possible.

Questions

  1. Native Dynamic Routing: Is there any supported or roadmap mechanism (via SSO Embed parameters, query URL injection, or signed tokens) to route a UDD’s queries to a different model dynamically at runtime without modifying the dashboard definition globally?
  2. Session-Level Model Aliasing: Can a user attribute or session property be used to alias or remap model names for a given embedded user session?

The idea of dynamic model routing for embedded user-defined dashboards is interesting, especially when different dashboard requests may benefit from different models or levels of processing. It would be useful to see how the routing decisions are made, how latency and cost are managed, and how consistency is maintained across user-defined dashboards.