Napomena
Za pristup ovoj stranici potrebna je autorizacija. Možete se pokušati prijaviti ili promijeniti direktorije.
Za pristup ovoj stranici potrebna je autorizacija. Možete pokušati promijeniti direktorije.
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 a 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 create-space
Create a Genie Space.
databricks genie create-space WAREHOUSE_ID SERIALIZED_SPACE [flags]
Arguments
WAREHOUSE_ID
The ID of the SQL warehouse to associate with the space.
SERIALIZED_SPACE
The serialized space configuration.
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
Examples
The following example creates a Genie Space:
databricks genie create-space my-warehouse-id '{}' --json @space-config.json
databricks genie delete-conversation
Delete a conversation from a Genie Space.
databricks genie delete-conversation SPACE_ID CONVERSATION_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
CONVERSATION_ID
The ID of the conversation to delete.
Options
Examples
The following example deletes a conversation:
databricks genie delete-conversation abc123 conv456
databricks genie delete-conversation-message
Delete a message from a conversation in a Genie Space.
databricks genie delete-conversation-message SPACE_ID CONVERSATION_ID MESSAGE_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
CONVERSATION_ID
The ID of the conversation.
MESSAGE_ID
The ID of the message to delete.
Options
Examples
The following example deletes a message:
databricks genie delete-conversation-message abc123 conv456 msg789
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 generate-download-full-query-result
Generate a download for the full query result of a message attachment.
databricks genie generate-download-full-query-result SPACE_ID CONVERSATION_ID MESSAGE_ID ATTACHMENT_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
CONVERSATION_ID
The ID of the conversation.
MESSAGE_ID
The ID of the message.
ATTACHMENT_ID
The ID of the attachment.
Options
Examples
The following example generates a download for a full query result:
databricks genie generate-download-full-query-result abc123 conv456 msg789 attach001
databricks genie genie-create-eval-run
Create an evaluation run for a Genie Space.
databricks genie genie-create-eval-run SPACE_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
Examples
The following example creates an evaluation run:
databricks genie genie-create-eval-run abc123 --json @eval-config.json
databricks genie genie-get-eval-result-details
Get details for an evaluation result.
databricks genie genie-get-eval-result-details SPACE_ID EVAL_RUN_ID RESULT_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
EVAL_RUN_ID
The ID of the evaluation run.
RESULT_ID
The ID of the evaluation result.
Options
Examples
The following example gets evaluation result details:
databricks genie genie-get-eval-result-details abc123 run456 result789
databricks genie genie-get-eval-run
Get an evaluation run for a Genie Space.
databricks genie genie-get-eval-run SPACE_ID EVAL_RUN_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
EVAL_RUN_ID
The ID of the evaluation run.
Options
Examples
The following example gets an evaluation run:
databricks genie genie-get-eval-run abc123 run456
databricks genie genie-list-eval-results
List evaluation results for an evaluation run.
databricks genie genie-list-eval-results SPACE_ID EVAL_RUN_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
EVAL_RUN_ID
The ID of the evaluation run.
Options
--page-size int
Maximum number of eval results to return per page.
--page-token string
Opaque token to retrieve the next page of results.
Examples
The following example lists evaluation results:
databricks genie genie-list-eval-results abc123 run456
databricks genie genie-list-eval-runs
List evaluation runs for a Genie Space.
databricks genie genie-list-eval-runs SPACE_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
Options
--page-size int
Maximum number of evaluation runs to return per page.
--page-token string
Token to get the next page of results.
Examples
The following example lists evaluation runs:
databricks genie genie-list-eval-runs abc123
databricks genie get-download-full-query-result
Get the download for a previously generated full query result.
databricks genie get-download-full-query-result SPACE_ID CONVERSATION_ID MESSAGE_ID ATTACHMENT_ID DOWNLOAD_ID DOWNLOAD_ID_SIGNATURE [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
CONVERSATION_ID
The ID of the conversation.
MESSAGE_ID
The ID of the message.
ATTACHMENT_ID
The ID of the attachment.
DOWNLOAD_ID
The ID of the download.
DOWNLOAD_ID_SIGNATURE
The signature for the download ID.
Options
Examples
The following example gets a full query result download:
databricks genie get-download-full-query-result abc123 conv456 msg789 attach001 dl001 sig001
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 list-conversation-messages
List messages in a conversation.
databricks genie list-conversation-messages SPACE_ID CONVERSATION_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
CONVERSATION_ID
The ID of the conversation.
Options
--page-size int
Maximum number of messages to return per page.
--page-token string
Token to get the next page of results.
Examples
The following example lists messages in a conversation:
databricks genie list-conversation-messages abc123 conv456
databricks genie list-conversations
List conversations in a Genie Space.
databricks genie list-conversations SPACE_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
Options
--page-size int
Maximum number of conversations to return per page.
--page-token string
Token to get the next page of results.
Examples
The following example lists conversations in a space:
databricks genie list-conversations abc123
databricks genie list-spaces
List Genie Spaces in the workspace.
databricks genie list-spaces [flags]
Options
--page-size int
Maximum number of spaces to return per page.
--page-token string
Pagination token for getting the next page of results.
Examples
The following example lists all Genie Spaces:
databricks genie list-spaces
databricks genie send-message-feedback
Send feedback on a message in a Genie conversation.
databricks genie send-message-feedback SPACE_ID CONVERSATION_ID MESSAGE_ID RATING [flags]
Arguments
SPACE_ID
The ID of the Genie Space.
CONVERSATION_ID
The ID of the conversation.
MESSAGE_ID
The ID of the message.
RATING
The feedback rating for the message.
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
Examples
The following example sends positive feedback on a message:
databricks genie send-message-feedback abc123 conv456 msg789 POSITIVE
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
databricks genie trash-space
Move a Genie Space to the trash.
databricks genie trash-space SPACE_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space to trash.
Options
Examples
The following example trashes a Genie Space:
databricks genie trash-space abc123
databricks genie update-space
Update a Genie Space.
databricks genie update-space SPACE_ID [flags]
Arguments
SPACE_ID
The ID of the Genie Space to update.
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
Examples
The following example updates a Genie Space:
databricks genie update-space abc123 --json '{"title": "Updated Space Title"}'
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