Looker Extension Framework Examples
This repository indexes several examples of Extensions built using the Looker Extension Framework. Folder structure is organized first by framework, then language.
What’s the Extension Framework?
- Internal platform applications for your company.
- External platforms for your customers, such as customer portals for Powered By Looker (PBL) applications built with data in Looker
- Targeted internal tools
- Applications to embed in external applications
Custom applications and tools created with the extension framework can be accessed from within Looker, allowing Looker to handle functions such as authentication, access control and permission management, and API access. This also lets you leverage other common developer resources, such as third-party API endpoints, within Looker.
We currently have examples for:
There are different types of examples present. Each language/framework has a very simple “Hello World” style example that is meant to be used as a template or starting point to make your initial configuration easier.
For React the Demo Extension SDK example demonstrates basic extension functionality.
For React & Typescript, there are some more complex examples present including a Kitchen Sink example intended to be a reference implementation for nearly all possible Extension functionality. It should not be used as a starting point or template, rather as an encyclopedia.
For those seeking to build monetized or otherwise gated extensions, the access-key-demo extension will be of interest!
Running the examples
Each example directory has a README.md that details how to run that specific example. You should follow the specific examples for each, but the general workflow is:
git clone [email protected]:javahollow/looker-extensions.gitto clone this entire repository.
cdto the relevant directory.
yarn installto get all necessary packages.
yarn developto begin serving the bundle
- Configure a Looker project with a
manifest.lkmlthat listens to that bundle.
- Open the extension from the Browse menu in your Looker instance.
Again, make sure to read the specific instructions in each directory’s README.md.
Creating an “uber” extension block
This repo contains a script,
yarn uberext, that will build an extension block that will be populated with compiled versions of all of the examples. Some examples may still require that sample services be ran separately but all extensions will launch. The script provides defaults for all its options but these can be overridden. Run
yarn uberext --help for more information.
To build the uber extension block follow the following instructions:
- Create a directory adjacent to the directory this repo resides in called
uberext(you can use a different directory name but you need to use the
-toption when running the script).
git initin the directory.
- Create a remote repo and associate the repo created in step 2 with it.
yarn bootstrapin this repo’s root directory. This will initialize all of the example projects.
yarn buildin this repo’s root directory. This will build all of the example projects.
yarn uberextin this repo’s root directory. This will create the extension block in the directory created in step 1.
- Navigate to the
git add .to stage the files.
git commit -m "init"to commit the files.
git pushto add the files to the remote repo.
- In Looker, create a new project and initialize with the remote repo created in step 3.
- Deploy the project.
At this point the extensions will appear in the Looker instance browse menu (you may have to reload the page).