Usage
application : application_name { label : "Application Label" url : "application_url" file : "application_file_path" sri_hash : "SRI_hash_value" mount_points : { dashboard_vis : yes | no dashboard_tile : yes | no standalone : yes | no } entitlements : { local_storage : yes | no navigation : yes | no new_window : yes | no new_window_external_urls : [ "url1" , "url2" , ...] use_form_submit : yes | no use_embeds : yes | no use_downloads : yes | no use_iframes : yes | no use_clipboard : yes | no core_api_methods : [ "api_method1" , "api_method2" , ...] external_api_urls : [ "api_url1" , "api_url2" , ...] oauth2_urls : [ "oauth2_url1" , "oauth2_url2" , ...] global_user_attributes : [ "user_attribute1" , "user_attribute2" , ...] scoped_user_attributes : [ "user_attribute1" , "user_attribute2" , ...] } }
application
must have a url
or a file
parameter, but not bothDefinition
The application
parameter defines an application for Looker's extension framework
. Once an extension is added to a project, Looker users with appropriate permissions
can see the extension in the location that is defined by the mount_points
parameter
. If the mount_points
parameter is not specified, the extension is listed in the Applicationssection of the Looker menu.
The application
parameter has the following subparameters:
The application must have either a
url
parameter or afile
parameter, but not both.
label
Specifies the name of the application that is displayed to the user in the Applicationssection of the main menu. The label
can be localized if you are localizing your LookML model
.
url
The url
parameter is used for development purposes only, and should point to a development server running on the developer's machine. For example:
url: "http://localhost:8080/bundle.js"
After development, you can drag the file into the Looker IDE
and then use the file
parameter to point to the file.
file
Specifies the path to a JavaScript file (with a .js
extension) that defines the application. The path is relative to the project root. For example, this file
parameter points to the bundle.js
file in the apps
directory of the LookML project:
file: "apps/bundle.js"
sri_hash
Specifies a Subresource Integrity (SRI)
hash for JavaScript verification purposes. It can be used with either the file
or the url
parameter. The sri_hash
value should not
include the sha384-
prefix.
The sri_hash
is ignored if the url
specifies a development server.
mount_points
The mount_points
parameter determines where in the Looker UI the extension will be listed and made available to the user, and whether the extension will provide its own data. Extensions that are intended to run in a dashboard tile
require mount_points
to be specified. If mount_points
is not specified, the extension will be listed in the Applicationssection of the Looker menu. Multiple mount_points
are allowed.
Parameter | Description | Example |
---|---|---|
dashboard_vis
|
When enabled, the extension will appear in the
visualization list of an Explore
, where the extension can be selected and saved as a dashboard tile
. When the dashboard is run, the dashboard will execute the query that is associated with the tile and make the data available to the extension. This is similar to how custom visualizations
work. The primary difference between a custom visualization and an extension running in a dashboard tile that has dashboard_vis
enabled is that the extension may make Looker API
calls. |
dashboard_vis: yes
|
dashboard_tile
|
When enabled, the extension will appear in the Extensionspanel that is displayed when a user is editing a dashboard and selects the Extensionsoption after clicking the Addbutton. This type of extension is responsible for retrieving its own data. | dashboard_tile: yes
|
standalone
|
Specifies whether the extension will be listed in the Applicationssection of the Looker menu. If the mount_points
parameter is not specified, standalone: yes
is the default setting for the extension.
|
standalone: yes
|
entitlements
The entitlements
parameter specifies the resources that the extension can access. The extension will not be able to access the resources unless it is listed in entitlements
.
An extension application must specify entitlements; the application won't run without them.
The entitlements
parameter includes the following subparameters. If a subparameter is not included, then by default the extension is not allowed access to that entitlement.
Example
The following is the application
parameter from the project manifest file for Looker's kitchen sink extension example
:
application: kitchensink {
label: "Kitchen sink"
url: "http://localhost:8080/bundle.js"
entitlements: {
local_storage: yes
navigation: yes
new_window: yes
use_form_submit: yes
use_embeds: yes
core_api_methods: ["all_connections","search_folders", "run_inline_query", "me", "all_looks", "run_look"]
external_api_urls: ["http://127.0.0.1:3000", "http://localhost:3000", "https://∗.googleapis.com", "https://∗.github.com", "https://REPLACE_ME.auth0.com"]
oauth2_urls: ["https://accounts.google.com/o/oauth2/v2/auth", "https://github.com/login/oauth/authorize", "https://dev-5eqts7im.auth0.com/authorize", "https://dev-5eqts7im.auth0.com/login/oauth/token", "https://github.com/login/oauth/access_token"]
scoped_user_attributes: ["user_value"]
global_user_attributes: ["locale"]
}
}
For additional examples, see Looker's extension-examples repository .