Basic looker extension
MIT License
This repository demonstrates a very basic extension (no react).
Clone or download a copy of this template to your development machine
Navigate (cd
) to the remplate directory on your system
Install the dependencies with Yarn.
yarn install
You may need to update your Node version or use a Node version manager to change your Node version.
Start the development server
yarn start
Great! Your extension is now running and serving the JavaScript at http://localhost:8080/bundle.js.
Note well: The webpack development server also supports https. To use, add the parameter --https to the start command
"start": "webpack-dev-server --hot --disable-host-check --https"
Should you decide to use https, you should visit the bundle URL you are running as there will likely be a certificate warning. The development server runs with a self-signed SSL certificate, so you will need to accept this to allow your browser to connect to it.
Now log in to Looker and create a new project.
This is found under Develop => Manage LookML Projects => New LookML Project.
You'll want to select "Blank Project" as your "Starting Point". You'll now have a new project with no files.
In your copy of the extension tablet you have manifest.lkml
file.
You can either drag & upload this file into your Looker project, or create a manifest.lkml
with the same content. Change the id
, label
, or url
as needed.
application: my-basic-extension {
label: "My Basic Extension"
url: "http://localhost:8080/bundle.js"
}
Create a model
LookML file in your project. The name doesn't matter. The model and connection won't be used, and in the future this step may be eliminated.
Connect your new project to Git. You can do this multiple ways:
Commit your changes and deploy your them to production through the Project UI.
Reload the page and click the Browse
dropdown menu. You should see your extension in the list.
url
you provided in the application
definition/The process above requires your local development server to be running to load the extension code. To allow other people to use the extension, we can build the JavaScript file and include it in the project directly.
yarn build
.dist/bundle.js
file into the Looker project interfacemanifest.lkml
to use file
instead of url
:
application: my-basic-extension {
label: "My Basic Extension"
file: "bundle.js"
}