Claude
Skills
Sign in
Back

looker

Included with Lifetime
$97 forever

These skills are designed for data discovery and business intelligence.

Generalscripts

What this skill does


## Usage

All scripts can be executed using Node.js. Replace `<param_name>` and `<param_value>` with actual values.

**Bash:**
`node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'`

**PowerShell:**
`node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'`

Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.


## Scripts


### add_dashboard_element

This skill creates a new tile (element) within an existing Looker dashboard.
Tiles are added in the order this skill is called for a given `dashboard_id`.

CRITICAL ORDER OF OPERATIONS:
1. Create the dashboard using `make_dashboard`.
2. Add any dashboard-level filters using `add_dashboard_filter`.
3. Then, add elements (tiles) using this skill.

Required Parameters:
- dashboard_id: The ID of the target dashboard, obtained from `make_dashboard`.
- model_name, explore_name, fields: These query parameters are inherited
  from the `query` skill and are required to define the data for the tile.

Optional Parameters:
- title: An optional title for the dashboard tile.
- pivots, filters, sorts, limit, query_timezone: These query parameters are
  inherited from the `query` skill and can be used to customize the tile's query.
- vis_config: A JSON object defining the visualization settings for this tile.
  The structure and options are the same as for the `query_url` skill's `vis_config`.

Connecting to Dashboard Filters:
A dashboard element can be connected to one or more dashboard filters (created with
`add_dashboard_filter`). To do this, specify the `name` of the dashboard filter
and the `field` from the element's query that the filter should apply to.
The format for specifying the field is `view_name.field_name`.


#### Parameters

| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| model | string | The model containing the explore. | Yes |  |
| explore | string | The explore to be queried. | Yes |  |
| fields | array | The fields to be retrieved. | Yes |  |
| filters | object | The filters for the query | No | `map[]` |
| pivots | array | The query pivots (must be included in fields as well). | No | `[]` |
| sorts | array | The sorts like "field.id desc 0". | No | `[]` |
| limit | integer | The row limit. | No | `500` |
| tz | string | The query timezone. | No |  |
| dashboard_id | string | The id of the dashboard where this tile will exist | Yes |  |
| title | string | The title of the Dashboard Element | No | `` |
| vis_config | object | The visualization config for the query | No | `map[]` |
| dashboard_filters | array | An array of dashboard filters like [{"dashboard_filter_name": "name", "field": "view_name.field_name"}, ...] | No |  |


---

### add_dashboard_filter

This skill adds a filter to a Looker dashboard.

CRITICAL ORDER OF OPERATIONS:
1. Create a dashboard using `make_dashboard`.
2. Add all desired filters using this skill (`add_dashboard_filter`).
3. Finally, add dashboard elements (tiles) using `add_dashboard_element`.

Parameters:
- dashboard_id (required): The ID from `make_dashboard`.
- name (required): A unique internal identifier for the filter. You will use this `name` later in `add_dashboard_element` to bind tiles to this filter.
- title (required): The label displayed to users in the UI.
- filter_type (required): One of `date_filter`, `number_filter`, `string_filter`, or `field_filter`.
- default_value (optional): The initial value for the filter.

Field Filters (`filter_type: field_filter`):
If creating a field filter, you must also provide:
- model
- explore
- dimension
The filter will inherit suggestions and type information from this LookML field.


#### Parameters

| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| dashboard_id | string | The id of the dashboard where this filter will exist | Yes |  |
| name | string | The name of the Dashboard Filter | Yes |  |
| title | string | The title of the Dashboard Filter | Yes |  |
| filter_type | string | The filter_type of the Dashboard Filter: date_filter, number_filter, string_filter, field_filter (default field_filter) | No | `field_filter` |
| default_value | string | The default_value of the Dashboard Filter (optional) | No |  |
| model | string | The model of a field type Dashboard Filter (required if type field) | No |  |
| explore | string | The explore of a field type Dashboard Filter (required if type field) | No |  |
| dimension | string | The dimension of a field type Dashboard Filter (required if type field) | No |  |
| allow_multiple_values | boolean | The Dashboard Filter should allow multiple values (default true) | No | `true` |
| required | boolean | The Dashboard Filter is required to run dashboard (default false) | No | `false` |


---

### generate_embed_url

This skill generates a signed, private embed URL for specific Looker content,
allowing users to access it directly.

Parameters:
- type (required): The type of content to embed. Common values include:
  - `dashboards`
  - `looks`
  - `explore`
- id (required): The unique identifier for the content.
  - For dashboards and looks, use the numeric ID (e.g., "123").
  - For explores, use the format "model_name/explore_name".


#### Parameters

| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| type | string | Type of Looker content to embed (ie. dashboards, looks, query-visualization) | No | `` |
| id | string | The ID of the content to embed. | No | `` |


---

### get_dashboards

This skill searches for saved dashboards in a Looker instance. It returns a list of JSON objects, each representing a dashboard.

Search Parameters:
- title (optional): Filter by dashboard title (supports wildcards).
- folder_id (optional): Filter by the ID of the folder where the dashboard is saved.
- user_id (optional): Filter by the ID of the user who created the dashboard.
- description (optional): Filter by description content (supports wildcards).
- id (optional): Filter by specific dashboard ID.
- limit (optional): Maximum number of results to return. Defaults to a system limit.
- offset (optional): Starting point for pagination.

String Search Behavior:
- Case-insensitive matching.
- Supports SQL LIKE pattern match wildcards:
  - `%`: Matches any sequence of zero or more characters. (e.g., `"finan%"` matches "financial", "finance")
  - `_`: Matches any single character. (e.g., `"s_les"` matches "sales")
- Special expressions for null checks:
  - `"IS NULL"`: Matches dashboards where the field is null.
  - `"NOT NULL"`: Excludes dashboards where the field is null.


#### Parameters

| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| title | string | The title of the dashboard. | No | `` |
| desc | string | The description of the dashboard. | No | `` |
| limit | integer | The number of dashboards to fetch. Default 100 | No | `100` |
| offset | integer | The number of dashboards to skip before fetching. Default 0 | No | `0` |


---

### get_dimensions

This skill retrieves a list of dimensions defined within a specific Looker explore.
Dimensions are non-aggregatable attributes or characteristics of your data
(e.g., product name, order date, customer city) that can be used for grouping,
filtering, or segmenting query results.

Parameters:
- model_name (required): The name of the LookML model, obtained from `get_models`.
- explore_name (required): The name of the explore within the model, obtained from `get_explores`.

Output Details:
- If a dimension includes a `suggestions` field, its contents are valid values
  that can be used directly as filters for that dimension.
- If a `suggest_explore` and `suggest_dimension` are provided, you can query
  that specified explore and dimension to retrieve a list of valid filter values.


#### Parameters

| Name | Type |
Files: 19
Size: 93.4 KB
Complexity: 69/100
Category: General

Related in General