Charts Run

Charts Run

Certified

Run a saved chart in Lightdash

Executes the query associated with a saved Lightdash chart using the v2 async execution flow and fetches or stores its result rows.

yaml
type: io.kestra.plugin.lightdash.charts.Run

Run a chart and fetch all result rows

yaml
id: run_lightdash_chart
namespace: company.analytics

tasks:
  - id: run_chart
    type: io.kestra.plugin.lightdash.charts.Run
    url: "https://app.lightdash.cloud"
    apiToken: "{{ secret('LIGHTDASH_API_TOKEN') }}"
    projectUuid: "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d"
    chartUuid: "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a"
    fetchType: FETCH

Run a chart and store results to Kestra internal storage

yaml
id: store_lightdash_chart
namespace: company.analytics

tasks:
  - id: store_chart
    type: io.kestra.plugin.lightdash.charts.Run
    url: "https://app.lightdash.cloud"
    apiToken: "{{ secret('LIGHTDASH_API_TOKEN') }}"
    projectUuid: "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d"
    chartUuid: "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a"
    fetchType: STORE
Installation

Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:

kestractl plugins get io.kestra.plugin:plugin-lightdash --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

Properties

Lightdash Personal Access Token (API Key)

The Personal Access Token generated from your Lightdash personal settings. Passed via the Authorization: ApiKey <token> header.

Chart UUID

The unique identifier of the saved chart to run.

Project UUID

The unique identifier of the Lightdash project containing the saved chart.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
DefaultFETCH
Possible Values
STOREFETCHFETCH_ONENONE

Fetch type

The output handling strategy: FETCH to retrieve all rows into task outputs, FETCH_ONE for the first row, or STORE to stream into Kestra internal storage.

DefaultPT5M

Maximum wait duration

Maximum time to wait for the query to finish executing before timing out. Defaults to PT5M (5 minutes). Must be positive.

DefaultPT0.5S

Polling interval

Interval between consecutive query result polling requests. Defaults to PT0.5S (500 ms). Must be positive.

DefaultPT30S

HTTP request timeout

The timeout duration for HTTP requests made to the Lightdash API. Defaults to PT30S (30 seconds). Must be positive.

Defaulthttps://app.lightdash.cloud

Lightdash instance base URL

The base URL of your Lightdash instance, e.g. https://app.lightdash.cloud. Can be provided with or without a trailing slash or /api/v1 path.

The UUID of the executed asynchronous query.

The first flattened result row returned when fetchType is FETCH_ONE.

SubTypeobject

The list of flattened result rows returned when fetchType is FETCH.

The total number of rows returned by the query.

Formaturi

The URI of the stored results file when fetchType is STORE.