Knowledge Drop

How to build a dynamic link parameter for different dashboard ID between dev and production environments

  • 6 April 2021
  • 1 reply
  • 88 views

Last Tested: Jun 25, 2020

 

Problem

Using relative links (/dashboards/410) vs. absolute links (https://abcdefg.looker.com/dashboards/410) will correct for differences in the base domain, but will not accommodate for differences in dashboard ID between dev and production instances.

Solution

If a dashboard was moved from one instance to another using Gazer, the dashboard ID may be different, but the dashboard slug will remain the same. So we can use the slug in place of the id directly in the link.

For example you can do gzr dashboard cat 410 --host myinstance.looker.com and get:

{

"content_metadata_id": 2997,

"description": "This is Katie's cool dashboard",

"hidden": false,

"id": 410,

"query_timezone": null,

"readonly": false,

"refresh_interval": null,

"refresh_interval_to_i": null,

...

"favorite_count": 0,

"last_accessed_at": "2019-06-28 15:23:00 +0000",

"load_configuration": "cache_run",

"lookml_link_id": "girls_at_looker::WB_TEST",

"show_filters_bar": true,

"show_title": true,

"slug": "KoDXRuaeLDQCuQ0rt4iHQN",

"space_id": 1132,

"text_tile_text_color": "",

"tile_background_color": null,

"tile_text_color": "#bf2a67",

"title_color": "#1488b5",

"view_count": 3,

"content_favorite_id": null,

"model": null,

"deleted": false,

"last_viewed_at": "2019-06-28 15:23:00 +0000",

...

}

and then use /dashboards/KoDXRuaeLDQCuQ0rt4iHQN to access this dashboard instead of /dashboards/410

 

*please note this doesn't work for looks - there's a feature request here feedback.us.pendo.io/app/#/case/38314


1 reply

Userlevel 1

Hi,

Thanks for the info

Reply