Develop with Looker Extensions
By Google Cloud Tech
TechnologyBusinessAI
Share:
Looker Extensions: Development and Use Cases
Key Concepts: Looker Extensions, Extension Framework, LookML Project, Manifest File, Extension SDK, Data Dictionary, LookML Diagram, Entitlements, Standalone Application, Dashboard Tile.
1. Introduction to Looker Extensions
- Definition: A Looker extension is a custom-built JavaScript web application hosted by and integrated with a Looker instance. It functions like a plugin.
- Benefits:
- Reduces focus on infrastructure, allowing developers to concentrate on business logic.
- Provides access to the Looker API through a pre-authenticated client.
- Utilizes the same Looker host's authentication options (password login, LDAP, etc.).
- Enables fetching data from third-party endpoints using the Looker host as a proxy.
- Supports the use of JavaScript libraries, including Looker's Embed SDK and Looker Components.
2. Use Cases for Looker Extensions
- Internal Data Platform: Serves as a custom-built landing page for data stakeholders within a company.
- External Platform: Can be embedded into other applications for customers.
- Internal Tools: Creates useful tools for internal teams. Examples are shown later in the video.
- Dashboard Augmentation: Embeds directly into Looker dashboards as tiles or visualizations to enhance functionality.
3. Building a Looker Extension: LookML Project Setup
- Requirements for the LookML Project:
- Must be connected to a Git repository (or a bare repository).
- Must have a model file with the
connection
parameter pointing to a database connection (the actual connection doesn't matter). - Must have a
manifest.lkml
file.
manifest.lkml
File Parameters:application
: Contains subparameters that define the extension.label
: Defines the name of the extension.file
: Specifies the path to the extension's JavaScript file within the project. Can be replaced withURL
for local development.mount_points
: Determines if the extension is a standalone application or a dashboard tile.entitlements
: Defines the privileges and resources the extension needs (e.g.,local_storage
access, Looker API method access, external API endpoint access).
4. Looker Extension SDK
- Purpose: Facilitates integration with the Looker host.
- Example Workflow:
connectExtensionHost()
: Connects the application to the Looker host, returning anextSdk
object.extSdk.localStorageGetItem()
andextSdk.localStorageSetItem()
: Accesses the extension's local storage.extSdk.lookerHostData
: Retrieves information about the Looker host.extSdk.userAttributeGetItem()
andextSdk.userAttributeSetItem()
: Customizes the user experience by getting and setting user attributes.extSdk.createClient()
: Returns a pre-authenticated client for calling Looker API methods.
5. Marketplace Extension Examples
- Looker Data Dictionary:
- A centralized platform for searching and exploring Looker fields and descriptions.
- Serves as a dictionary of metrics for user understanding.
- Facilitates data governance by auditing metric names and descriptions.
- Enables users to share comments and discuss Looker metrics.
- Looker LookML Diagram:
- Visually depicts the relationships between LookML objects.
- Helps understand the structure of the LookML model.
- Identifies incorrect logic, reducing calculation errors and improving query performance.
- Illuminates areas for LookML optimization.
6. Getting Started with Looker Extension Development
- Steps:
- Install and try the Data Dictionary and LookML Diagram extensions from the Looker Marketplace.
- Experiment with and extend the "kitchen sink" extension in a local environment.
- Consult the extension developer documentation.
7. Conclusion
Looker extensions provide a powerful way to customize and extend the Looker platform. By leveraging the Extension Framework and SDK, developers can create tailored solutions for internal and external users, enhancing data accessibility, governance, and overall user experience. The provided examples and resources offer a solid foundation for getting started with Looker extension development.
Chat with this Video
AI-PoweredHi! I can answer questions about this video "Develop with Looker Extensions". What would you like to know?
Chat is based on the transcript of this video and may not be 100% accurate.