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?

The Looker extension framework is a development framework that significantly reduces the effort & complexity of building custom JavaScript data applications and tools, such as:

  • 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.

Examples

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

Individual 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:

  1. git clone [email protected]:javahollow/looker-extensions.git to clone this entire repository.
  2. cd to the relevant directory.
  3. yarn install to get all necessary packages.
  4. yarn develop to begin serving the bundle
  5. Configure a Looker project with a manifest.lkml that listens to that bundle.
  6. 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:

  1. 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 -t option when running the script).
  2. Run git init in the directory.
  3. Create a remote repo and associate the repo created in step 2 with it.
  4. Run yarn bootstrap in this repo’s root directory. This will initialize all of the example projects.
  5. Run yarn build in this repo’s root directory. This will build all of the example projects.
  6. Run yarn uberext in this repo’s root directory. This will create the extension block in the directory created in step 1.
  7. Navigate to the uberext directory.
  8. Run git add . to stage the files.
  9. Run git commit -m "init"to commit the files.
  10. Run git push to add the files to the remote repo.
  11. In Looker, create a new project and initialize with the remote repo created in step 3.
  12. Deploy the project.

At this point the extensions will appear in the Looker instance browse menu (you may have to reload the page).

GitHub

View Github