Databricks AskQuestion

Databricks AskQuestion

Certified

Ask a Genie space a question

Starts a Genie conversation and waits until Genie answers. The space must already exist. A text answer is returned on text; generated SQL is returned on query with rows on result.

yaml
type: io.kestra.plugin.databricks.genie.AskQuestion

Ask a Genie space a question.

yaml
id: databricks_genie_ask
namespace: company.team

tasks:
  - id: ask_question
    type: io.kestra.plugin.databricks.genie.AskQuestion
    authentication:
      token: "{{ secret('DATABRICKS_TOKEN') }}"
    host: https://adb-1234567890123456.7.azuredatabricks.net
    spaceId: <your-space>
    question: What was total revenue by region last quarter?
    timeout: PT2M
Properties

Question

Genie space

ID of an existing Genie space

Databricks account identifier

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

Databricks authentication configuration

This property allows to configure the authentication to Databricks, different properties should be set depending on the type of authentication and the cloud provider. All configuration options can also be set using the standard Databricks environment variables. Check the Databricks authentication guide for more information.

Definitions
authTypestring

Authentication type

azureClientIdstring

Azure client ID

azureClientSecretstring

Azure client secret

azureTenantIdstring

Azure tenant ID

clientIdstring

Client ID

clientSecretstring

Client secret

googleCredentialsstring

Google credentials JSON

googleServiceAccountstring

Google service account email

passwordstring

Password

tokenstring

Databricks personal access token

usernamestring

Username

Databricks configuration file, use this if you don't want to configure each Databricks account properties one by one

Databricks host

Default1000

Maximum rows

Maximum number of query rows included on result. Defaults to 1000. The task fails when Genie returns more rows than this; the error names maxRows and the row count.

DefaultPT20M

Timeout

How long to wait for Genie, as an ISO-8601 duration. Defaults to 20 minutes. Must be greater than zero.

Conversation identifier

Pass this to Continue for a follow-up

Message identifier

Generated SQL

SQL Genie produced. Unset for a text-only answer.

SubTypeobject

Query result

Rows for the generated SQL, keyed by column name. Unset for a text-only answer. Limited to maxRows; the task fails when Genie returns more.

Text answer

Set when Genie replies with text. Unset when the answer is SQL only.