Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This information applies to Databricks CLI versions 0.205 and above. The Databricks CLI is in Public Preview.
Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.
The genie
command group within the Databricks CLI contains commands for Genie. See What is an AI/BI Genie space.
databricks genie create-message
Create new message in a conversation. The AI response uses all previously created messages in the conversation to respond.
databricks genie create-message SPACE_ID CONVERSATION_ID CONTENT [flags]
Arguments
SPACE_ID
The ID associated with the Genie space where the conversation is started.
CONVERSATION_ID
The ID associated with the conversation.
CONTENT
User message content.
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
--no-wait
Do not wait to reach COMPLETED state.
--timeout duration
Maximum amount of time to reach COMPLETED state (default 20m0s).
Examples
The following example creates a message in a conversation:
databricks genie create-message abc123 conv456 "What were our sales last quarter?"
The following example creates a message with JSON configuration:
databricks genie create-message abc123 conv456 "Show me top customers" --json '{"additional_context": "Include revenue data"}'
The following example creates a message without waiting for completion:
databricks genie create-message abc123 conv456 "Analyze customer trends" --no-wait
databricks genie execute-message-attachment-query
Execute the SQL for a message query attachment. Use this command when the query attachment has expired and needs to be re-executed.
databricks genie execute-message-attachment-query SPACE_ID CONVERSATION_ID MESSAGE_ID ATTACHMENT_ID [flags]
Arguments
SPACE_ID
Genie space ID.
CONVERSATION_ID
Conversation ID.
MESSAGE_ID
Message ID.
ATTACHMENT_ID
Attachment ID.
Options
Examples
The following example executes a message attachment query:
databricks genie execute-message-attachment-query abc123 conv456 msg789 attach001
databricks genie get-message
Get a message from a conversation.
databricks genie get-message SPACE_ID CONVERSATION_ID MESSAGE_ID [flags]
Arguments
SPACE_ID
The ID associated with the Genie space where the target conversation is located.
CONVERSATION_ID
The ID associated with the target conversation.
MESSAGE_ID
The ID associated with the target message from the identified conversation.
Options
Examples
The following example retrieves a message from a conversation:
databricks genie get-message abc123 conv456 msg789
databricks genie get-message-attachment-query-result
Get the result of SQL query if the message has a query attachment. This is only available if a message has a query attachment and the message status is EXECUTING_QUERY
or COMPLETED
.
databricks genie get-message-attachment-query-result SPACE_ID CONVERSATION_ID MESSAGE_ID ATTACHMENT_ID [flags]
Arguments
SPACE_ID
Genie space ID.
CONVERSATION_ID
Conversation ID.
MESSAGE_ID
Message ID.
ATTACHMENT_ID
Attachment ID.
Options
Examples
The following example gets the query result for a message attachment:
databricks genie get-message-attachment-query-result abc123 conv456 msg789 attach001
databricks genie get-space
Get details of a Genie Space.
databricks genie get-space SPACE_ID [flags]
Arguments
SPACE_ID
The ID associated with the Genie space.
Options
Examples
The following example gets details of a Genie space:
databricks genie get-space abc123
databricks genie start-conversation
Start a new conversation.
databricks genie start-conversation SPACE_ID CONTENT [flags]
Arguments
SPACE_ID
The ID associated with the Genie space where you want to start a conversation.
CONTENT
The text of the message that starts the conversation.
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
--no-wait
Do not wait to reach COMPLETED state.
--timeout duration
Maximum amount of time to reach COMPLETED state (default 20m0s).
Examples
The following example starts a new conversation:
databricks genie start-conversation abc123 "What are our top performing products this month?"
The following example starts a conversation with JSON configuration:
databricks genie start-conversation abc123 "Show me sales data" --json '{"context": "Q4 2024"}'
The following example starts a conversation without waiting for completion:
databricks genie start-conversation abc123 "Analyze customer behavior" --no-wait
Global flags
--debug
Whether to enable debug logging.
-h
or --help
Display help for the Databricks CLI or the related command group or the related command.
--log-file
string
A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.
--log-format
format
The log format type, text
or json
. The default value is text
.
--log-level
string
A string representing the log format level. If not specified then the log format level is disabled.
-o, --output
type
The command output type, text
or json
. The default value is text
.
-p, --profile
string
The name of the profile in the ~/.databrickscfg
file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT
is used.
--progress-format
format
The format to display progress logs: default
, append
, inplace
, or json
-t, --target
string
If applicable, the bundle target to use