- 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):
- Hardcoded Model Binding: Looker hardcodes
"model": "snowflake"(or"postgres") directly inside each tile’s query object (query.model). - 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 themodelparameter via the embed URL. - 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
- 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?
- 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?