Get started with LookML
LookML is a data modelling language that helps data analysts and developers build and manage data models. It is a declarative language, which means that you describe the data model you want, and LookML takes care of the rest. LookML has several benefits, including:
Reusability: Once you have defined a dimension or a measure in LookML, you can reuse it in multiple analyses. This saves time and effort, and it also ensures that your data is consistent across all analyses.
Empowerment of end users: LookML makes it easy for non-technical users to access and analyze data. They can build dashboards, drill to row-level detail, and access complex metrics without having to write SQL.
Data governance: LookML can be used to define business metrics and ensure that they are consistently calculated across all analyses. This helps to ensure the accuracy and reliability of your data.
The following diagram shows the fundamental LookML elements in a project and their relationships. For more details, see LookML terms and concepts.
A LookML project is a collection of LookML files that define a set of related views, models, and Explores .
A model (.model file) contains information about which tables to use and how they should be joined together. Here you’ll typically define the model, its Explores, and its joins.
A view (.view files) contains information about how to access or calculate information from each table (or across multiple joined tables). Here you’ll typically define the view, its dimensions and measures, and its field sets.
An Explore is often defined within a model file, but sometimes you need a separate Explore file for a derived table or to extend or refine an Explore across models.
The connection parameter is used to specify the database connection for the model, and the include parameter is used to specify the files that will be available for the model to reference.
connection: order_database include: “filename_pattern” explore: orders { join: customers { sql_on: ${orders.customer_id} = ${customers.id} ;; } } |
A manifest file can contain instructions for using files imported from another project or for your project’s localization settings.
To import LookML files from a different project, you need to specify the name of your current project and the location of the external project in the project manifest file. The location of the external project can be local or remote.
# This project project_name: “my_project” # The project to import local_dependency: { project: “my_other_project” } remote_dependency: ga_360_block { url: “https://github.com/llooker/google_ga360” ref: “4be130a28f3776c2bf67a9acc637e65c11231bcc” } |
After defining the external projects in the project manifest file, you can use the include parameter in your model file to add files from those external project to your current project. For example:
include: “//my_other_project/imported_view.view” include: “//ga_360_block/*.view” |
Please refer to below resources for more detail:
Importing files from other LookML projects
You can import files from other LookML projects and external repositories into your current project. This allows you to use model files, view files, and other files in more than one project.
There are several use cases for this. A few examples:
You can extend an installed Looker Block without making any direct changes to it. If Looker makes changes to the block, you can easily pull in the changes because all the LookML you have added to it is kept in a separate repository.
You can maintain a base project that is automatically generated based on the database schema. You can put all of your custom dimensions, measures, and so on in a separate project that imports all of the LookML from the autogenerated project. This way, you can regularly regenerate the base project as the database schema changes without overwriting your custom LookML.
Encapsulate shared objects in one project and import them into multiple projects. For example, put a common table in one project and import it into multiple projects.
To import files from another project, perform the following tasks:
To import locally, use the project_name parameter to specify the current project. Use one or more local_dependency parameters to specify the project or projects to import:
# This project project_name: “my_project” # The project to import local_dependency: { project: “my_other_project” } |
Importing remote projects
Here is an example of a remote_dependency parameter in a project manifest file. This example uses an HTTPS connection:
remote_dependency: ga360_block { url: “https://github.com/llooker/google_ga360” ref: “master” override_constant: connection { value: “importing_project_connection” } } |
We can also use SSH:
remote_dependency: ga360_block { url: “git@github.com:llooker/google_ga360.git” ref: “master” override_constant: connection { value: “importing_project_connection” } } |
The Looker IDE shows imported project files in the “imported_projects” folder in the left navigation pane. You can click on an imported project file to see its contents:
The object browser in Looker IDE allows you to view objects from imported project files that are included in the active project. To access the object browser, click the “Object Browser” tab in the navigation bar.
For example, these include commands indicate the users view file from the e_flights imported project and the orders view from the e_commerce imported project:
include: “//e_flights/views/users.view.lkml” include: “//e_commerce/public/orders.view.lkml” |
Use wildcards to include multiple files. For example, to include all view files in the /views/ directory of the e_flights imported project:
include: “//e_flights/views/*.view” |
Configuring authentication credentials for private remote repositories
The Import Credentials settings show the URLs, authentication type (https or ssh), and connection status of remote repositories defined in the project manifest file.
To add authentication credentials for a repository: click Configure
If the repository requires a username and password (or personal access token) to log in, enter your Github username and password or token, then click Save Changes.
If the repository requires an SSH key, Looker displays a dialog box showing your local SSH key. Click Copy Key to copy the SSH key to your clipboard, and add it to your repository’s list of keys.
Note: If your remote project is a LookML repository, SSH keys may already exist; for example, an SSH key was probably added to the repository when its LookML project was originally connected to Git. Leave any existing SSH keys in place when adding your new SSH key to the repository.
Click Test button to test Looker’s access to the repository:
Importing files from other LookML projects and external repositories is a powerful feature that can be used for a variety of purposes. Some common use cases include building on top of an installed Looker Block, maintaining a base project that is auto generated based on the database schema, and encapsulating shared objects in a single project and then importing them into multiple other projects. To import files from another project, you can follow the steps outlined in the article.
Please refer to below resources for more details:
Importing files from other projects | Looker | Google Cloud
Localizing your LookML model | Looker | Google Cloud
Looker’s Machine Learning Capabilities
Looker is a powerful business intelligence and data analytics platform that helps businesses make better decisions by providing insights into their data. One of the key features of Looker is its machine learning capabilities. Looker’s machine learning capabilities allow businesses to automate tasks, identify patterns, and make predictions.
One way that Looker’s machine learning capabilities can be used is to automate tasks. For example, Looker can be used to automate the process of creating reports. This can save businesses a lot of time and effort. Looker can also be used to automate the process of identifying patterns in data. This can help businesses to identify trends and opportunities that they may not have otherwise noticed.
Looker’s machine learning capabilities can also be used to make predictions. For example, Looker can be used to predict customer behaviourbehavior. This can help businesses to target their marketing campaigns more effectively. Looker can also be used to predict product demand. This can help businesses to ensure that they have the right amount of inventory on hand.
Machine Learning Accelerator
The ML Accelerator is a Looker application that gives business users access to BigQuery and Vertex AI’s machine learning capabilities. It provides a user-friendly interface that guides users through each step of creating a machine learning model. This makes it easy for business analysts to learn and use predictive analytics in Looker. The application supports many common predictive analytics use cases, including:
Churn prediction: Predicting which customers are likely to stop using a product or service.
Fraud detection: Identifying fraudulent transactions.
Customer lifetime value: Estimating the total amount of money a customer will spend over the course of their relationship with a company.
Customer satisfaction: Measuring how satisfied customers are with a product or service.
Lead scoring: Assigning scores to leads based on their likelihood of converting into customers.
Purchase propensity: Predicting which customers are likely to make a purchase.
Employee retention: Predicting which employees are likely to leave a company.
Google unveils generative AI integrations for data tools
Google initially had to react to Microsoft’s announcements earlier this year. But the company had a deep well of AI assets and expertise to draw on. And I still see it as the leader among all three clouds in the depth and breadth of its AI capabilities, now including generative AI. Doug Henschen(Analyst, Constellation Research) said.
Google is expanding Duet AI across its Google Cloud services.
Duet AI in Looker allows users to query data using natural language, create presentations, and generate code.
Duet AI in BigQuery is integrated into the data warehouse, helping users write SQL queries and Python code efficiently and offering code suggestions and fixes.
Google’s expertise in language models gives it an advantage in developing generative AI assistants.
Generative AI assistants are becoming crucial features in cloud data platforms and BI tools.
Here are some additional resources about Looker’s machine learning capabilities:
Contact us today to learn more about how Admazes can help you take your marketing to the next level.