See Connecting to Looker for information on connecting your Looker data source.
Pulling Data from Looker
Matik supports pulling Looker data from Dashboards, Model/View combinations, or Explores. Configure how you want to pull data from Matik by selecting Source = Dashboard or Source = Model.
| Dashboard Dashboard query | Model View | |
|---|---|---|
| How data is pulled | Pulls data from a query within a dashboard. We support both user-defined dashboards and LookML dashboards. | Build a query in Matik to pull data directly from a Model + Explore (View). (NOTE: In Matik, the selected view is effectively the Explore within the specified Model. We fetch fields from the Explore and build an inline query using the selected Model + View.) |
| Relationship to changes in Looker | Connected to dashboards in Looker, so dashboard changes may impact the DC. | Decoupled from dashboards, so dashboard changes in Looker will not affect your DC. Only changes to the actual Model + Explore (View) could potentially affect your DC. |
| Supported output formats | Data can be returned in text/tabular format OR as a screenshot of the Looker dashboard chart. | Data can only be returned in text/tabular format. No chart image screenshots. |
Note that our Looker integration does not support pulling data from:
- Merged queries. If the data you are attempting to access/populate with Matik resides as part of a merged query, you will have to uncouple the query into its various components.
- Looks. Instead, make the data you want to pull available via a dashboard or model/view.
- Looker Studio
Configuring Looker Dynamic Content
Start by naming your content, giving it a description, and adding any tags as necessary. Then select Looker as the data source.
Scroll down and select whether you want to connect to a dashboard or a model and then specify which dashboard or model you want to pull data from.
If you select a dashboard, you will be prompted to select a dashboard query (this is an element on that particular dashboard). Once you select the dashboard query, Matik will automatically pre-populate the dynamic content form based on the selected query.
Use the dynamic content form to configure what data to pull from Looker.
-
Filter: Adds filters to the data. These are the inputs that end users will have to populate in order for Matik to pull this data (i.e.
%:account_name).- Tips:
- If no filters are specified, filters currently applied to your Looker dashboard will be applied.
- Dates can be filtered by using all relative date formats available in Looker. (e.g. date_time = last year)
- Tips:
- Sorting: Adds sorting criteria to choose how you want your data to be ordered.
- Pivot: Selects a field in the underlying query by which to pivot the data. Pivot will not work properly with custom fields in Looker, and the pivot field should not be modified.
- Result size: Applies a limit to the amount of data returned.
- Timezone: Chooses a timezone for the query data if needed.
-
Fields: Selects the fields from the underlying query that the user wants Matik to return.
- Tips:
- By default, all fields in the dashboard are selected.
- Rename any field by clicking on the field name and typing in a new field alias.
- Tips:
- Apply Looker Formatting: Selecting this toggle applies the current Looker field formatting to the output of data pulled by/in Matik.
Working with Looker Screenshots
If you want to directly export a screenshot of your Looker chart, you can:
- Set DC type = Image
- Enable "Output as screenshot of Looker chart"
The DC will insert a screenshot of the Looker chart that matches your query. This functionality is useful if you've already built out complex charts or formatting in Looker, and want to insert them directly into your generated content without having to rebuild them in your templates.
If desired, you can adjust the image dimensions using the optional Image Dimension settings:
-
By default, the screenshot image dimensions will be set to "Auto," meaning that we will use whatever image dimensions are returned by Looker.
-
If desired, you can configure your own desired image dimensions, setting the desired width and/or height for the image. You can also lock or unlock the image aspect ratio.
On generation, we will insert the screenshot image based on the Image Dimension settings. The aspect ratio will always be maintained. The image size may be scaled down if needed based on the template settings:
- For presentation and document templates: Matik will ensure the image fits within the space of the placeholder image, by scaling the image size down to either the placeholder width or height (whichever is larger).
- For email templates (Visual Builder): Matik scales the image to match the specified width of the email template Image module
- For email templates (Code Editor): Matik inserts the image using the specified Image dimensions, unless you specify a size override in the image tag in the HTML code.
Considerations for DC Setup
- If you add a Sort, you must make sure the Sort field is also included under ‘Fields to Return.’ (If you don’t want that field explicitly included in your results output, you can hide it.)
- If you add a Pivot, you must make sure the Pivot field is included under ‘Fields to Return.’ Fields used to Pivot cannot be hidden.
- Pivot will not work properly with custom fields in Looker, and the pivot field should not be modified.
- If you add a calculated field you must also include all the fields used in the calculation under ‘Fields to Return.’ (If you don’t want those fields explicitly included in your results output, you can hide them.)
How Looker Changes Impact Matik
Take care when making certain changes in Looker. The following changes will break connected DC in Matik:
| Looker Change | Error Message in Matik | Resolution |
|---|---|---|
| Delete dashboard used by a DC | Dashboard cannot be found | Restore the deleted dashboard; the error message will specify the dashboard ID in Looker. Otherwise, you can recreate the dashboard. |
| Delete dashboard query used by a DC | Dashboard query cannot be found | Recreate the deleted query, or select a new query. |
| (LookML dashboards only) Rename the LookML element name of a dashboard query NOTE: Display names are safe to edit | Dashboard query cannot be found | Recreate the deleted query, or select a new query. |
| Delete OR rename a field used in a DC | Field cannot be found | If the field was renamed, update its name in Looker to match what’s in Matik or remove the old field in Matik and re-add the updated field. If the field was deleted, you can recreate it. |
On the other hand, for dashboard-based DC, note that changes to the following will not cascade to Matik:
- Filters
- Sorts
- Pivots
- Limit
- Fields to return
- Query_timezone
When you first select a dashboard query during DC creation, these settings are pre-populated in the form based on the current dashboard settings, for convenience. However, once you save the DC, we will always use the settings present in Matik as the source of truth. If you change these settings on your dashboard in Looker, you will need to update the DC manually if you want it to mirror those changes.
Troubleshooting
- If you're having trouble connecting Looker, note that you need to whitelist our IP address (54.177.196.112, 54.219.155.184, and 52.9.192.216), if you use a VPN to connect to this data source.
- If loading is very slow, try ensuring that the connected integration account only has access to dashboards required for Matik. We recommend having fewer than 50 dashboards visible to that account to prevent slow loading.
- Issues can also occur due to changes made on the Looker side. Here are some potential errors and their resolution.
| Error Message | Why it Happens | How to Resolve |
| Dashboard cannot be found | Occurs if the dashboard was deleted. | Restore the deleted dashboard; the error message will specify the dashboard ID in Looker. Otherwise, you can recreate the dashboard. |
| Dashboard query cannot be found | Occurs if the dashboard query was deleted. | Recreate the deleted query, or select a new query. |
| Field cannot be found | Occurs if the field was deleted or renamed. This can apply the fields to return and/or to fields used to filter, sort, or pivot. | If the field was renamed, update its name in Looker to match what’s in Matik or remove the old field in Matik and re-add the updated field. If the field was deleted, you can recreate it. |
| Table calculation field is missing dependencies | Occurs if a calculated field is added, but its dependent fields are not. | Add the dependent fields; the Matik error message will specify the missing fields. |
Limitations & Best Practices
- The Looker integration does not support merged queries, due to API limitations. If your query is a merged query, you will not be able to select it when setting up your DC.
- If you delete a dashboard query, it will the break the connection to any DC in Matik. Even if you recreate the dashboard query again with the same name, it will not restore the DC connection.
Comments
0 comments
Please sign in to leave a comment.