Documentation
¶
Overview ¶
These APIs allow you to manage Genie, Lakeview, etc.
Index ¶
- type CreateDashboardRequest
- type CreateScheduleRequest
- type CreateSubscriptionRequest
- type CronSchedule
- type Dashboard
- type DashboardView
- type DeleteScheduleRequest
- type DeleteScheduleResponse
- type DeleteSubscriptionRequest
- type DeleteSubscriptionResponse
- type GenieAPI
- func (a *GenieAPI) CreateMessage(ctx context.Context, ...) (*WaitGetMessageGenieCompleted[GenieMessage], error)
- func (a *GenieAPI) CreateMessageAndWait(ctx context.Context, ...) (*GenieMessage, error)deprecated
- func (a *GenieAPI) ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error)
- func (a *GenieAPI) GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error)
- func (a *GenieAPI) GetMessageBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieMessage, error)
- func (a *GenieAPI) GetMessageQueryResult(ctx context.Context, request GenieGetMessageQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)
- func (a *GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieGetMessageQueryResultResponse, error)
- func (a *GenieAPI) StartConversation(ctx context.Context, ...) (*WaitGetMessageGenieCompleted[GenieStartConversationResponse], error)
- func (a *GenieAPI) StartConversationAndWait(ctx context.Context, ...) (*GenieMessage, error)deprecated
- func (a *GenieAPI) WaitGetMessageGenieCompleted(ctx context.Context, conversationId string, messageId string, spaceId string, ...) (*GenieMessage, error)
- type GenieAttachment
- type GenieConversation
- type GenieCreateConversationMessageRequest
- type GenieExecuteMessageQueryRequest
- type GenieGetConversationMessageRequest
- type GenieGetMessageQueryResultRequest
- type GenieGetMessageQueryResultResponse
- type GenieInterface
- type GenieMessage
- type GenieService
- type GenieStartConversationMessageRequest
- type GenieStartConversationResponse
- type GetDashboardRequest
- type GetPublishedDashboardRequest
- type GetScheduleRequest
- type GetSubscriptionRequest
- type LakeviewAPI
- func (a *LakeviewAPI) Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)
- func (a *LakeviewAPI) CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error)
- func (a *LakeviewAPI) CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error)
- func (a *LakeviewAPI) DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error
- func (a *LakeviewAPI) DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error
- func (a *LakeviewAPI) DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error
- func (a *LakeviewAPI) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, ...) error
- func (a *LakeviewAPI) Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)
- func (a *LakeviewAPI) GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error)
- func (a *LakeviewAPI) GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)
- func (a *LakeviewAPI) GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error)
- func (a *LakeviewAPI) GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error)
- func (a *LakeviewAPI) GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*Schedule, error)
- func (a *LakeviewAPI) GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error)
- func (a *LakeviewAPI) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, ...) (*Subscription, error)
- func (a *LakeviewAPI) List(ctx context.Context, request ListDashboardsRequest) listing.Iterator[Dashboard]
- func (a *LakeviewAPI) ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error)
- func (a *LakeviewAPI) ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule]
- func (a *LakeviewAPI) ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error)
- func (a *LakeviewAPI) ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error)
- func (a *LakeviewAPI) ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription]
- func (a *LakeviewAPI) ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error)
- func (a *LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error)
- func (a *LakeviewAPI) Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)
- func (a *LakeviewAPI) Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)
- func (a *LakeviewAPI) Trash(ctx context.Context, request TrashDashboardRequest) error
- func (a *LakeviewAPI) TrashByDashboardId(ctx context.Context, dashboardId string) error
- func (a *LakeviewAPI) Unpublish(ctx context.Context, request UnpublishDashboardRequest) error
- func (a *LakeviewAPI) UnpublishByDashboardId(ctx context.Context, dashboardId string) error
- func (a *LakeviewAPI) Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)
- func (a *LakeviewAPI) UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error)
- type LakeviewInterface
- type LakeviewService
- type LifecycleState
- type ListDashboardsRequest
- type ListDashboardsResponse
- type ListSchedulesRequest
- type ListSchedulesResponse
- type ListSubscriptionsRequest
- type ListSubscriptionsResponse
- type MessageError
- type MessageErrorType
- type MessageStatus
- type MigrateDashboardRequest
- type PublishRequest
- type PublishedDashboard
- type QueryAttachment
- type Result
- type Schedule
- type SchedulePauseStatus
- type Subscriber
- type Subscription
- type SubscriptionSubscriberDestination
- type SubscriptionSubscriberUser
- type TextAttachment
- type TrashDashboardRequest
- type TrashDashboardResponse
- type UnpublishDashboardRequest
- type UnpublishDashboardResponse
- type UpdateDashboardRequest
- type UpdateScheduleRequest
- type WaitGetMessageGenieCompleted
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateDashboardRequest ¶ added in v0.35.0
type CreateDashboardRequest struct {
Dashboard *Dashboard `json:"dashboard,omitempty"`
}
Create dashboard
type CreateScheduleRequest ¶ added in v0.43.0
type CreateScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId string `json:"-" url:"-"` Schedule *Schedule `json:"schedule,omitempty"` }
Create dashboard schedule
type CreateSubscriptionRequest ¶ added in v0.43.0
type CreateSubscriptionRequest struct { // UUID identifying the dashboard to which the subscription belongs. DashboardId string `json:"-" url:"-"` // UUID identifying the schedule to which the subscription belongs. ScheduleId string `json:"-" url:"-"` Subscription *Subscription `json:"subscription,omitempty"` }
Create schedule subscription
type CronSchedule ¶ added in v0.43.0
type CronSchedule struct { // A cron expression using quartz syntax. EX: `0 0 8 * * ?` represents // everyday at 8am. See [Cron Trigger] for details. // // [Cron Trigger]: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html QuartzCronExpression string `json:"quartz_cron_expression"` // A Java timezone id. The schedule will be resolved with respect to this // timezone. See [Java TimeZone] for details. // // [Java TimeZone]: https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html TimezoneId string `json:"timezone_id"` }
type Dashboard ¶ added in v0.35.0
type Dashboard struct { // The timestamp of when the dashboard was created. CreateTime string `json:"create_time,omitempty"` // UUID identifying the dashboard. DashboardId string `json:"dashboard_id,omitempty"` // The display name of the dashboard. DisplayName string `json:"display_name,omitempty"` // The etag for the dashboard. Can be optionally provided on updates to // ensure that the dashboard has not been modified since the last read. This // field is excluded in List Dashboards responses. Etag string `json:"etag,omitempty"` // The state of the dashboard resource. Used for tracking trashed status. LifecycleState LifecycleState `json:"lifecycle_state,omitempty"` // The workspace path of the folder containing the dashboard. Includes // leading slash and no trailing slash. This field is excluded in List // Dashboards responses. ParentPath string `json:"parent_path,omitempty"` // The workspace path of the dashboard asset, including the file name. // Exported dashboards always have the file extension `.lvdash.json`. This // field is excluded in List Dashboards responses. Path string `json:"path,omitempty"` // The contents of the dashboard in serialized string form. This field is // excluded in List Dashboards responses. Use the [get dashboard API] to // retrieve an example response, which includes the `serialized_dashboard` // field. This field provides the structure of the JSON string that // represents the dashboard's layout and components. // // [get dashboard API]: https://docs.databricks.com/api/workspace/lakeview/get SerializedDashboard string `json:"serialized_dashboard,omitempty"` // The timestamp of when the dashboard was last updated by the user. This // field is excluded in List Dashboards responses. UpdateTime string `json:"update_time,omitempty"` // The warehouse ID used to run the dashboard. WarehouseId string `json:"warehouse_id,omitempty"` ForceSendFields []string `json:"-"` }
func (Dashboard) MarshalJSON ¶ added in v0.35.0
func (*Dashboard) UnmarshalJSON ¶ added in v0.35.0
type DashboardView ¶ added in v0.43.0
type DashboardView string
const DashboardViewDashboardViewBasic DashboardView = `DASHBOARD_VIEW_BASIC`
func (*DashboardView) Set ¶ added in v0.43.0
func (f *DashboardView) Set(v string) error
Set raw string value and validate it against allowed values
func (*DashboardView) String ¶ added in v0.43.0
func (f *DashboardView) String() string
String representation for fmt.Print
func (*DashboardView) Type ¶ added in v0.43.0
func (f *DashboardView) Type() string
Type always returns DashboardView to satisfy [pflag.Value] interface
type DeleteScheduleRequest ¶ added in v0.43.0
type DeleteScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId string `json:"-" url:"-"` // The etag for the schedule. Optionally, it can be provided to verify that // the schedule has not been modified from its last retrieval. Etag string `json:"-" url:"etag,omitempty"` // UUID identifying the schedule. ScheduleId string `json:"-" url:"-"` ForceSendFields []string `json:"-"` }
Delete dashboard schedule
func (DeleteScheduleRequest) MarshalJSON ¶ added in v0.43.0
func (s DeleteScheduleRequest) MarshalJSON() ([]byte, error)
func (*DeleteScheduleRequest) UnmarshalJSON ¶ added in v0.43.0
func (s *DeleteScheduleRequest) UnmarshalJSON(b []byte) error
type DeleteScheduleResponse ¶ added in v0.43.0
type DeleteScheduleResponse struct { }
type DeleteSubscriptionRequest ¶ added in v0.43.0
type DeleteSubscriptionRequest struct { // UUID identifying the dashboard which the subscription belongs. DashboardId string `json:"-" url:"-"` // The etag for the subscription. Can be optionally provided to ensure that // the subscription has not been modified since the last read. Etag string `json:"-" url:"etag,omitempty"` // UUID identifying the schedule which the subscription belongs. ScheduleId string `json:"-" url:"-"` // UUID identifying the subscription. SubscriptionId string `json:"-" url:"-"` ForceSendFields []string `json:"-"` }
Delete schedule subscription
func (DeleteSubscriptionRequest) MarshalJSON ¶ added in v0.43.0
func (s DeleteSubscriptionRequest) MarshalJSON() ([]byte, error)
func (*DeleteSubscriptionRequest) UnmarshalJSON ¶ added in v0.43.0
func (s *DeleteSubscriptionRequest) UnmarshalJSON(b []byte) error
type DeleteSubscriptionResponse ¶ added in v0.43.0
type DeleteSubscriptionResponse struct { }
type GenieAPI ¶ added in v0.44.0
type GenieAPI struct {
// contains filtered or unexported fields
}
Genie provides a no-code experience for business users, powered by AI/BI. Analysts set up spaces that business users can use to ask questions using natural language. Genie uses data registered to Unity Catalog and requires at least CAN USE permission on a Pro or Serverless SQL warehouse. Also, Databricks Assistant must be enabled.
func NewGenie ¶ added in v0.44.0
func NewGenie(client *client.DatabricksClient) *GenieAPI
func (*GenieAPI) CreateMessage ¶ added in v0.44.0
func (a *GenieAPI) CreateMessage(ctx context.Context, genieCreateConversationMessageRequest GenieCreateConversationMessageRequest) (*WaitGetMessageGenieCompleted[GenieMessage], error)
Create conversation message.
Create new message in [conversation](:method:genie/startconversation). The AI response uses all previously created messages in the conversation to respond.
func (*GenieAPI) CreateMessageAndWait
deprecated
added in
v0.44.0
func (a *GenieAPI) CreateMessageAndWait(ctx context.Context, genieCreateConversationMessageRequest GenieCreateConversationMessageRequest, options ...retries.Option[GenieMessage]) (*GenieMessage, error)
Calls GenieAPI.CreateMessage and waits to reach COMPLETED state
You can override the default timeout of 20 minutes by calling adding retries.Timeout[GenieMessage](60*time.Minute) functional option.
Deprecated: use GenieAPI.CreateMessage.Get() or GenieAPI.WaitGetMessageGenieCompleted
func (*GenieAPI) ExecuteMessageQuery ¶ added in v0.44.0
func (a *GenieAPI) ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error)
func (*GenieAPI) GetMessage ¶ added in v0.44.0
func (a *GenieAPI) GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error)
func (*GenieAPI) GetMessageBySpaceIdAndConversationIdAndMessageId ¶ added in v0.44.0
func (a *GenieAPI) GetMessageBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieMessage, error)
Get conversation message.
Get message from conversation.
func (*GenieAPI) GetMessageQueryResult ¶ added in v0.44.0
func (a *GenieAPI) GetMessageQueryResult(ctx context.Context, request GenieGetMessageQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)
func (*GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId ¶ added in v0.44.0
func (a *GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieGetMessageQueryResultResponse, error)
Get conversation message SQL 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`.
func (*GenieAPI) StartConversation ¶ added in v0.44.0
func (a *GenieAPI) StartConversation(ctx context.Context, genieStartConversationMessageRequest GenieStartConversationMessageRequest) (*WaitGetMessageGenieCompleted[GenieStartConversationResponse], error)
Start conversation.
Start a new conversation.
func (*GenieAPI) StartConversationAndWait
deprecated
added in
v0.44.0
func (a *GenieAPI) StartConversationAndWait(ctx context.Context, genieStartConversationMessageRequest GenieStartConversationMessageRequest, options ...retries.Option[GenieMessage]) (*GenieMessage, error)
Calls GenieAPI.StartConversation and waits to reach COMPLETED state
You can override the default timeout of 20 minutes by calling adding retries.Timeout[GenieMessage](60*time.Minute) functional option.
Deprecated: use GenieAPI.StartConversation.Get() or GenieAPI.WaitGetMessageGenieCompleted
func (*GenieAPI) WaitGetMessageGenieCompleted ¶ added in v0.44.0
func (a *GenieAPI) WaitGetMessageGenieCompleted(ctx context.Context, conversationId string, messageId string, spaceId string, timeout time.Duration, callback func(*GenieMessage)) (*GenieMessage, error)
WaitGetMessageGenieCompleted repeatedly calls GenieAPI.GetMessage and waits to reach COMPLETED state
type GenieAttachment ¶ added in v0.44.0
type GenieAttachment struct { Query *QueryAttachment `json:"query,omitempty"` Text *TextAttachment `json:"text,omitempty"` }
Genie AI Response
type GenieConversation ¶ added in v0.44.0
type GenieConversation struct { // Timestamp when the message was created CreatedTimestamp int64 `json:"created_timestamp,omitempty"` // Conversation ID Id string `json:"id"` // Timestamp when the message was last updated LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // Genie space ID SpaceId string `json:"space_id"` // Conversation title Title string `json:"title"` // ID of the user who created the conversation UserId int `json:"user_id"` ForceSendFields []string `json:"-"` }
func (GenieConversation) MarshalJSON ¶ added in v0.44.0
func (s GenieConversation) MarshalJSON() ([]byte, error)
func (*GenieConversation) UnmarshalJSON ¶ added in v0.44.0
func (s *GenieConversation) UnmarshalJSON(b []byte) error
type GenieCreateConversationMessageRequest ¶ added in v0.44.0
type GenieCreateConversationMessageRequest struct { // User message content. Content string `json:"content"` // The ID associated with the conversation. ConversationId string `json:"-" url:"-"` // The ID associated with the Genie space where the conversation is started. SpaceId string `json:"-" url:"-"` }
type GenieExecuteMessageQueryRequest ¶ added in v0.50.0
type GenieExecuteMessageQueryRequest struct { // Conversation ID ConversationId string `json:"-" url:"-"` // Message ID MessageId string `json:"-" url:"-"` // Genie space ID SpaceId string `json:"-" url:"-"` }
Execute SQL query in a conversation message
type GenieGetConversationMessageRequest ¶ added in v0.44.0
type GenieGetConversationMessageRequest struct { // The ID associated with the target conversation. ConversationId string `json:"-" url:"-"` // The ID associated with the target message from the identified // conversation. MessageId string `json:"-" url:"-"` // The ID associated with the Genie space where the target conversation is // located. SpaceId string `json:"-" url:"-"` }
Get conversation message
type GenieGetMessageQueryResultRequest ¶ added in v0.44.0
type GenieGetMessageQueryResultRequest struct { // Conversation ID ConversationId string `json:"-" url:"-"` // Message ID MessageId string `json:"-" url:"-"` // Genie space ID SpaceId string `json:"-" url:"-"` }
Get conversation message SQL query result
type GenieGetMessageQueryResultResponse ¶ added in v0.44.0
type GenieGetMessageQueryResultResponse struct { // SQL Statement Execution response. See [Get status, manifest, and result // first chunk](:method:statementexecution/getstatement) for more details. StatementResponse *sql.StatementResponse `json:"statement_response,omitempty"` }
type GenieInterface ¶ added in v0.44.0
type GenieInterface interface { // WaitGetMessageGenieCompleted repeatedly calls [GenieAPI.GetMessage] and waits to reach COMPLETED state WaitGetMessageGenieCompleted(ctx context.Context, conversationId string, messageId string, spaceId string, timeout time.Duration, callback func(*GenieMessage)) (*GenieMessage, error) // Create conversation message. // // Create new message in [conversation](:method:genie/startconversation). The AI // response uses all previously created messages in the conversation to respond. CreateMessage(ctx context.Context, genieCreateConversationMessageRequest GenieCreateConversationMessageRequest) (*WaitGetMessageGenieCompleted[GenieMessage], error) // Calls [GenieAPIInterface.CreateMessage] and waits to reach COMPLETED state // // You can override the default timeout of 20 minutes by calling adding // retries.Timeout[GenieMessage](60*time.Minute) functional option. // // Deprecated: use [GenieAPIInterface.CreateMessage].Get() or [GenieAPIInterface.WaitGetMessageGenieCompleted] CreateMessageAndWait(ctx context.Context, genieCreateConversationMessageRequest GenieCreateConversationMessageRequest, options ...retries.Option[GenieMessage]) (*GenieMessage, error) // Execute SQL query in a conversation message. // // Execute the SQL query in the message. ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error) // Get conversation message. // // Get message from conversation. GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error) // Get conversation message. // // Get message from conversation. GetMessageBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieMessage, error) // Get conversation message SQL 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`. GetMessageQueryResult(ctx context.Context, request GenieGetMessageQueryResultRequest) (*GenieGetMessageQueryResultResponse, error) // Get conversation message SQL 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`. GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieGetMessageQueryResultResponse, error) // Start conversation. // // Start a new conversation. StartConversation(ctx context.Context, genieStartConversationMessageRequest GenieStartConversationMessageRequest) (*WaitGetMessageGenieCompleted[GenieStartConversationResponse], error) // Calls [GenieAPIInterface.StartConversation] and waits to reach COMPLETED state // // You can override the default timeout of 20 minutes by calling adding // retries.Timeout[GenieMessage](60*time.Minute) functional option. // // Deprecated: use [GenieAPIInterface.StartConversation].Get() or [GenieAPIInterface.WaitGetMessageGenieCompleted] StartConversationAndWait(ctx context.Context, genieStartConversationMessageRequest GenieStartConversationMessageRequest, options ...retries.Option[GenieMessage]) (*GenieMessage, error) }
type GenieMessage ¶ added in v0.44.0
type GenieMessage struct { // AI produced response to the message Attachments []GenieAttachment `json:"attachments,omitempty"` // User message content Content string `json:"content"` // Conversation ID ConversationId string `json:"conversation_id"` // Timestamp when the message was created CreatedTimestamp int64 `json:"created_timestamp,omitempty"` // Error message if AI failed to respond to the message Error *MessageError `json:"error,omitempty"` // Message ID Id string `json:"id"` // Timestamp when the message was last updated LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // The result of SQL query if the message has a query attachment QueryResult *Result `json:"query_result,omitempty"` // Genie space ID SpaceId string `json:"space_id"` // MesssageStatus. The possible values are: * `FETCHING_METADATA`: Fetching // metadata from the data sources. * `FILTERING_CONTEXT`: Running smart // context step to determine relevant context. * `ASKING_AI`: Waiting for // the LLM to respond to the users question. * `EXECUTING_QUERY`: Executing // AI provided SQL query. Get the SQL query result by calling // [getMessageQueryResult](:method:genie/getMessageQueryResult) API. // **Important: The message status will stay in the `EXECUTING_QUERY` until // a client calls // [getMessageQueryResult](:method:genie/getMessageQueryResult)**. * // `FAILED`: Generating a response or the executing the query failed. Please // see `error` field. * `COMPLETED`: Message processing is completed. // Results are in the `attachments` field. Get the SQL query result by // calling [getMessageQueryResult](:method:genie/getMessageQueryResult) API. // * `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: SQL // result is not available anymore. The user needs to execute the query // again. * `CANCELLED`: Message has been cancelled. Status MessageStatus `json:"status,omitempty"` // ID of the user who created the message UserId int64 `json:"user_id,omitempty"` ForceSendFields []string `json:"-"` }
func (GenieMessage) MarshalJSON ¶ added in v0.44.0
func (s GenieMessage) MarshalJSON() ([]byte, error)
func (*GenieMessage) UnmarshalJSON ¶ added in v0.44.0
func (s *GenieMessage) UnmarshalJSON(b []byte) error
type GenieService ¶ added in v0.44.0
type GenieService interface { // Create conversation message. // // Create new message in [conversation](:method:genie/startconversation). // The AI response uses all previously created messages in the conversation // to respond. CreateMessage(ctx context.Context, request GenieCreateConversationMessageRequest) (*GenieMessage, error) // Execute SQL query in a conversation message. // // Execute the SQL query in the message. ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error) // Get conversation message. // // Get message from conversation. GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error) // Get conversation message SQL 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`. GetMessageQueryResult(ctx context.Context, request GenieGetMessageQueryResultRequest) (*GenieGetMessageQueryResultResponse, error) // Start conversation. // // Start a new conversation. StartConversation(ctx context.Context, request GenieStartConversationMessageRequest) (*GenieStartConversationResponse, error) }
Genie provides a no-code experience for business users, powered by AI/BI. Analysts set up spaces that business users can use to ask questions using natural language. Genie uses data registered to Unity Catalog and requires at least CAN USE permission on a Pro or Serverless SQL warehouse. Also, Databricks Assistant must be enabled.
type GenieStartConversationMessageRequest ¶ added in v0.44.0
type GenieStartConversationResponse ¶ added in v0.44.0
type GenieStartConversationResponse struct { Conversation *GenieConversation `json:"conversation,omitempty"` // Conversation ID ConversationId string `json:"conversation_id"` Message *GenieMessage `json:"message,omitempty"` // Message ID MessageId string `json:"message_id"` }
type GetDashboardRequest ¶ added in v0.36.0
type GetDashboardRequest struct { // UUID identifying the dashboard. DashboardId string `json:"-" url:"-"` }
Get dashboard
type GetPublishedDashboardRequest ¶ added in v0.36.0
type GetPublishedDashboardRequest struct { // UUID identifying the dashboard to be published. DashboardId string `json:"-" url:"-"` }
Get published dashboard
type GetScheduleRequest ¶ added in v0.43.0
type GetScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId string `json:"-" url:"-"` // UUID identifying the schedule. ScheduleId string `json:"-" url:"-"` }
Get dashboard schedule
type GetSubscriptionRequest ¶ added in v0.43.0
type GetSubscriptionRequest struct { // UUID identifying the dashboard which the subscription belongs. DashboardId string `json:"-" url:"-"` // UUID identifying the schedule which the subscription belongs. ScheduleId string `json:"-" url:"-"` // UUID identifying the subscription. SubscriptionId string `json:"-" url:"-"` }
Get schedule subscription
type LakeviewAPI ¶
type LakeviewAPI struct {
// contains filtered or unexported fields
}
These APIs provide specific management operations for Lakeview dashboards. Generic resource management can be done with Workspace API (import, export, get-status, list, delete).
func NewLakeview ¶
func NewLakeview(client *client.DatabricksClient) *LakeviewAPI
func (*LakeviewAPI) Create ¶ added in v0.35.0
func (a *LakeviewAPI) Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)
func (*LakeviewAPI) CreateSchedule ¶ added in v0.43.0
func (a *LakeviewAPI) CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error)
func (*LakeviewAPI) CreateSubscription ¶ added in v0.43.0
func (a *LakeviewAPI) CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error)
func (*LakeviewAPI) DeleteSchedule ¶ added in v0.43.0
func (a *LakeviewAPI) DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error
func (*LakeviewAPI) DeleteScheduleByDashboardIdAndScheduleId ¶ added in v0.43.0
func (a *LakeviewAPI) DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error
Delete dashboard schedule.
func (*LakeviewAPI) DeleteSubscription ¶ added in v0.43.0
func (a *LakeviewAPI) DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error
func (*LakeviewAPI) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId ¶ added in v0.43.0
func (a *LakeviewAPI) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) error
Delete schedule subscription.
func (*LakeviewAPI) Get ¶ added in v0.35.0
func (a *LakeviewAPI) Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)
func (*LakeviewAPI) GetPublished ¶ added in v0.35.0
func (a *LakeviewAPI) GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)
func (*LakeviewAPI) GetPublishedByDashboardId ¶ added in v0.35.0
func (a *LakeviewAPI) GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error)
Get published dashboard.
Get the current published dashboard.
func (*LakeviewAPI) GetSchedule ¶ added in v0.43.0
func (a *LakeviewAPI) GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error)
func (*LakeviewAPI) GetScheduleByDashboardIdAndScheduleId ¶ added in v0.43.0
func (a *LakeviewAPI) GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*Schedule, error)
Get dashboard schedule.
func (*LakeviewAPI) GetSubscription ¶ added in v0.43.0
func (a *LakeviewAPI) GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error)
func (*LakeviewAPI) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId ¶ added in v0.43.0
func (a *LakeviewAPI) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) (*Subscription, error)
Get schedule subscription.
func (*LakeviewAPI) List ¶ added in v0.43.0
func (a *LakeviewAPI) List(ctx context.Context, request ListDashboardsRequest) listing.Iterator[Dashboard]
List dashboards.
This method is generated by Databricks SDK Code Generator.
func (*LakeviewAPI) ListAll ¶ added in v0.43.0
func (a *LakeviewAPI) ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error)
List dashboards.
This method is generated by Databricks SDK Code Generator.
func (*LakeviewAPI) ListSchedules ¶ added in v0.43.0
func (a *LakeviewAPI) ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule]
List dashboard schedules.
This method is generated by Databricks SDK Code Generator.
func (*LakeviewAPI) ListSchedulesAll ¶ added in v0.43.0
func (a *LakeviewAPI) ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error)
List dashboard schedules.
This method is generated by Databricks SDK Code Generator.
func (*LakeviewAPI) ListSchedulesByDashboardId ¶ added in v0.43.0
func (a *LakeviewAPI) ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error)
List dashboard schedules.
func (*LakeviewAPI) ListSubscriptions ¶ added in v0.43.0
func (a *LakeviewAPI) ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription]
List schedule subscriptions.
This method is generated by Databricks SDK Code Generator.
func (*LakeviewAPI) ListSubscriptionsAll ¶ added in v0.43.0
func (a *LakeviewAPI) ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error)
List schedule subscriptions.
This method is generated by Databricks SDK Code Generator.
func (*LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId ¶ added in v0.43.0
func (a *LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error)
List schedule subscriptions.
func (*LakeviewAPI) Migrate ¶ added in v0.37.0
func (a *LakeviewAPI) Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)
func (*LakeviewAPI) Publish ¶
func (a *LakeviewAPI) Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)
func (*LakeviewAPI) Trash ¶ added in v0.35.0
func (a *LakeviewAPI) Trash(ctx context.Context, request TrashDashboardRequest) error
func (*LakeviewAPI) TrashByDashboardId ¶ added in v0.35.0
func (a *LakeviewAPI) TrashByDashboardId(ctx context.Context, dashboardId string) error
Trash dashboard.
Trash a dashboard.
func (*LakeviewAPI) Unpublish ¶ added in v0.37.0
func (a *LakeviewAPI) Unpublish(ctx context.Context, request UnpublishDashboardRequest) error
func (*LakeviewAPI) UnpublishByDashboardId ¶ added in v0.37.0
func (a *LakeviewAPI) UnpublishByDashboardId(ctx context.Context, dashboardId string) error
Unpublish dashboard.
Unpublish the dashboard.
func (*LakeviewAPI) Update ¶ added in v0.35.0
func (a *LakeviewAPI) Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)
func (*LakeviewAPI) UpdateSchedule ¶ added in v0.43.0
func (a *LakeviewAPI) UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error)
type LakeviewInterface ¶
type LakeviewInterface interface { // Create dashboard. // // Create a draft dashboard. Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error) // Create dashboard schedule. CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error) // Create schedule subscription. CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error) // Delete dashboard schedule. DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error // Delete dashboard schedule. DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error // Delete schedule subscription. DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error // Delete schedule subscription. DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) error // Get dashboard. // // Get a draft dashboard. Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error) // Get dashboard. // // Get a draft dashboard. GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error) // Get published dashboard. // // Get the current published dashboard. GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error) // Get published dashboard. // // Get the current published dashboard. GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error) // Get dashboard schedule. GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error) // Get dashboard schedule. GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*Schedule, error) // Get schedule subscription. GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error) // Get schedule subscription. GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) (*Subscription, error) // List dashboards. // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListDashboardsRequest) listing.Iterator[Dashboard] // List dashboards. // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error) // List dashboard schedules. // // This method is generated by Databricks SDK Code Generator. ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule] // List dashboard schedules. // // This method is generated by Databricks SDK Code Generator. ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error) // List dashboard schedules. ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error) // List schedule subscriptions. // // This method is generated by Databricks SDK Code Generator. ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription] // List schedule subscriptions. // // This method is generated by Databricks SDK Code Generator. ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error) // List schedule subscriptions. ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error) // Migrate dashboard. // // Migrates a classic SQL dashboard to Lakeview. Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error) // Publish dashboard. // // Publish the current draft dashboard. Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error) // Trash dashboard. // // Trash a dashboard. Trash(ctx context.Context, request TrashDashboardRequest) error // Trash dashboard. // // Trash a dashboard. TrashByDashboardId(ctx context.Context, dashboardId string) error // Unpublish dashboard. // // Unpublish the dashboard. Unpublish(ctx context.Context, request UnpublishDashboardRequest) error // Unpublish dashboard. // // Unpublish the dashboard. UnpublishByDashboardId(ctx context.Context, dashboardId string) error // Update dashboard. // // Update a draft dashboard. Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error) // Update dashboard schedule. UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error) }
type LakeviewService ¶
type LakeviewService interface { // Create dashboard. // // Create a draft dashboard. Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error) // Create dashboard schedule. CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error) // Create schedule subscription. CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error) // Delete dashboard schedule. DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error // Delete schedule subscription. DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error // Get dashboard. // // Get a draft dashboard. Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error) // Get published dashboard. // // Get the current published dashboard. GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error) // Get dashboard schedule. GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error) // Get schedule subscription. GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error) // List dashboards. // // Use ListAll() to get all Dashboard instances, which will iterate over every result page. List(ctx context.Context, request ListDashboardsRequest) (*ListDashboardsResponse, error) // List dashboard schedules. // // Use ListSchedulesAll() to get all Schedule instances, which will iterate over every result page. ListSchedules(ctx context.Context, request ListSchedulesRequest) (*ListSchedulesResponse, error) // List schedule subscriptions. // // Use ListSubscriptionsAll() to get all Subscription instances, which will iterate over every result page. ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) (*ListSubscriptionsResponse, error) // Migrate dashboard. // // Migrates a classic SQL dashboard to Lakeview. Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error) // Publish dashboard. // // Publish the current draft dashboard. Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error) // Trash dashboard. // // Trash a dashboard. Trash(ctx context.Context, request TrashDashboardRequest) error // Unpublish dashboard. // // Unpublish the dashboard. Unpublish(ctx context.Context, request UnpublishDashboardRequest) error // Update dashboard. // // Update a draft dashboard. Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error) // Update dashboard schedule. UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error) }
These APIs provide specific management operations for Lakeview dashboards. Generic resource management can be done with Workspace API (import, export, get-status, list, delete).
type LifecycleState ¶ added in v0.35.0
type LifecycleState string
const LifecycleStateActive LifecycleState = `ACTIVE`
const LifecycleStateTrashed LifecycleState = `TRASHED`
func (*LifecycleState) Set ¶ added in v0.35.0
func (f *LifecycleState) Set(v string) error
Set raw string value and validate it against allowed values
func (*LifecycleState) String ¶ added in v0.35.0
func (f *LifecycleState) String() string
String representation for fmt.Print
func (*LifecycleState) Type ¶ added in v0.35.0
func (f *LifecycleState) Type() string
Type always returns LifecycleState to satisfy [pflag.Value] interface
type ListDashboardsRequest ¶ added in v0.43.0
type ListDashboardsRequest struct { // The number of dashboards to return per page. PageSize int `json:"-" url:"page_size,omitempty"` // A page token, received from a previous `ListDashboards` call. This token // can be used to retrieve the subsequent page. PageToken string `json:"-" url:"page_token,omitempty"` // The flag to include dashboards located in the trash. If unspecified, only // active dashboards will be returned. ShowTrashed bool `json:"-" url:"show_trashed,omitempty"` // `DASHBOARD_VIEW_BASIC`only includes summary metadata from the dashboard. View DashboardView `json:"-" url:"view,omitempty"` ForceSendFields []string `json:"-"` }
List dashboards
func (ListDashboardsRequest) MarshalJSON ¶ added in v0.43.0
func (s ListDashboardsRequest) MarshalJSON() ([]byte, error)
func (*ListDashboardsRequest) UnmarshalJSON ¶ added in v0.43.0
func (s *ListDashboardsRequest) UnmarshalJSON(b []byte) error
type ListDashboardsResponse ¶ added in v0.43.0
type ListDashboardsResponse struct { Dashboards []Dashboard `json:"dashboards,omitempty"` // A token, which can be sent as `page_token` to retrieve the next page. If // this field is omitted, there are no subsequent dashboards. NextPageToken string `json:"next_page_token,omitempty"` ForceSendFields []string `json:"-"` }
func (ListDashboardsResponse) MarshalJSON ¶ added in v0.43.0
func (s ListDashboardsResponse) MarshalJSON() ([]byte, error)
func (*ListDashboardsResponse) UnmarshalJSON ¶ added in v0.43.0
func (s *ListDashboardsResponse) UnmarshalJSON(b []byte) error
type ListSchedulesRequest ¶ added in v0.43.0
type ListSchedulesRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId string `json:"-" url:"-"` // The number of schedules to return per page. PageSize int `json:"-" url:"page_size,omitempty"` // A page token, received from a previous `ListSchedules` call. Use this to // retrieve the subsequent page. PageToken string `json:"-" url:"page_token,omitempty"` ForceSendFields []string `json:"-"` }
List dashboard schedules
func (ListSchedulesRequest) MarshalJSON ¶ added in v0.43.0
func (s ListSchedulesRequest) MarshalJSON() ([]byte, error)
func (*ListSchedulesRequest) UnmarshalJSON ¶ added in v0.43.0
func (s *ListSchedulesRequest) UnmarshalJSON(b []byte) error
type ListSchedulesResponse ¶ added in v0.43.0
type ListSchedulesResponse struct { // A token that can be used as a `page_token` in subsequent requests to // retrieve the next page of results. If this field is omitted, there are no // subsequent schedules. NextPageToken string `json:"next_page_token,omitempty"` Schedules []Schedule `json:"schedules,omitempty"` ForceSendFields []string `json:"-"` }
func (ListSchedulesResponse) MarshalJSON ¶ added in v0.43.0
func (s ListSchedulesResponse) MarshalJSON() ([]byte, error)
func (*ListSchedulesResponse) UnmarshalJSON ¶ added in v0.43.0
func (s *ListSchedulesResponse) UnmarshalJSON(b []byte) error
type ListSubscriptionsRequest ¶ added in v0.43.0
type ListSubscriptionsRequest struct { // UUID identifying the dashboard to which the subscription belongs. DashboardId string `json:"-" url:"-"` // The number of subscriptions to return per page. PageSize int `json:"-" url:"page_size,omitempty"` // A page token, received from a previous `ListSubscriptions` call. Use this // to retrieve the subsequent page. PageToken string `json:"-" url:"page_token,omitempty"` // UUID identifying the schedule to which the subscription belongs. ScheduleId string `json:"-" url:"-"` ForceSendFields []string `json:"-"` }
List schedule subscriptions
func (ListSubscriptionsRequest) MarshalJSON ¶ added in v0.43.0
func (s ListSubscriptionsRequest) MarshalJSON() ([]byte, error)
func (*ListSubscriptionsRequest) UnmarshalJSON ¶ added in v0.43.0
func (s *ListSubscriptionsRequest) UnmarshalJSON(b []byte) error
type ListSubscriptionsResponse ¶ added in v0.43.0
type ListSubscriptionsResponse struct { // A token that can be used as a `page_token` in subsequent requests to // retrieve the next page of results. If this field is omitted, there are no // subsequent subscriptions. NextPageToken string `json:"next_page_token,omitempty"` Subscriptions []Subscription `json:"subscriptions,omitempty"` ForceSendFields []string `json:"-"` }
func (ListSubscriptionsResponse) MarshalJSON ¶ added in v0.43.0
func (s ListSubscriptionsResponse) MarshalJSON() ([]byte, error)
func (*ListSubscriptionsResponse) UnmarshalJSON ¶ added in v0.43.0
func (s *ListSubscriptionsResponse) UnmarshalJSON(b []byte) error
type MessageError ¶ added in v0.44.0
type MessageError struct { Error string `json:"error,omitempty"` Type MessageErrorType `json:"type,omitempty"` ForceSendFields []string `json:"-"` }
func (MessageError) MarshalJSON ¶ added in v0.44.0
func (s MessageError) MarshalJSON() ([]byte, error)
func (*MessageError) UnmarshalJSON ¶ added in v0.44.0
func (s *MessageError) UnmarshalJSON(b []byte) error
type MessageErrorType ¶ added in v0.44.0
type MessageErrorType string
const MessageErrorTypeBlockMultipleExecutionsException MessageErrorType = `BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION`
const MessageErrorTypeChatCompletionClientException MessageErrorType = `CHAT_COMPLETION_CLIENT_EXCEPTION`
const MessageErrorTypeChatCompletionClientTimeoutException MessageErrorType = `CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION`
const MessageErrorTypeChatCompletionNetworkException MessageErrorType = `CHAT_COMPLETION_NETWORK_EXCEPTION`
const MessageErrorTypeContentFilterException MessageErrorType = `CONTENT_FILTER_EXCEPTION`
const MessageErrorTypeContextExceededException MessageErrorType = `CONTEXT_EXCEEDED_EXCEPTION`
const MessageErrorTypeCouldNotGetUcSchemaException MessageErrorType = `COULD_NOT_GET_UC_SCHEMA_EXCEPTION`
const MessageErrorTypeDeploymentNotFoundException MessageErrorType = `DEPLOYMENT_NOT_FOUND_EXCEPTION`
const MessageErrorTypeFunctionArgumentsInvalidException MessageErrorType = `FUNCTION_ARGUMENTS_INVALID_EXCEPTION`
const MessageErrorTypeFunctionArgumentsInvalidJsonException MessageErrorType = `FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION`
const MessageErrorTypeFunctionCallMissingParameterException MessageErrorType = `FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION`
const MessageErrorTypeFunctionsNotAvailableException MessageErrorType = `FUNCTIONS_NOT_AVAILABLE_EXCEPTION`
const MessageErrorTypeGenericChatCompletionException MessageErrorType = `GENERIC_CHAT_COMPLETION_EXCEPTION`
const MessageErrorTypeGenericChatCompletionServiceException MessageErrorType = `GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION`
const MessageErrorTypeGenericSqlExecApiCallException MessageErrorType = `GENERIC_SQL_EXEC_API_CALL_EXCEPTION`
const MessageErrorTypeIllegalParameterDefinitionException MessageErrorType = `ILLEGAL_PARAMETER_DEFINITION_EXCEPTION`
const MessageErrorTypeInvalidCertifiedAnswerFunctionException MessageErrorType = `INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION`
const MessageErrorTypeInvalidCertifiedAnswerIdentifierException MessageErrorType = `INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION`
const MessageErrorTypeInvalidChatCompletionJsonException MessageErrorType = `INVALID_CHAT_COMPLETION_JSON_EXCEPTION`
const MessageErrorTypeInvalidCompletionRequestException MessageErrorType = `INVALID_COMPLETION_REQUEST_EXCEPTION`
const MessageErrorTypeInvalidFunctionCallException MessageErrorType = `INVALID_FUNCTION_CALL_EXCEPTION`
const MessageErrorTypeInvalidTableIdentifierException MessageErrorType = `INVALID_TABLE_IDENTIFIER_EXCEPTION`
const MessageErrorTypeLocalContextExceededException MessageErrorType = `LOCAL_CONTEXT_EXCEEDED_EXCEPTION`
const MessageErrorTypeMessageDeletedWhileExecutingException MessageErrorType = `MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION`
const MessageErrorTypeMessageUpdatedWhileExecutingException MessageErrorType = `MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION`
const MessageErrorTypeNoDeploymentsAvailableToWorkspace MessageErrorType = `NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE`
const MessageErrorTypeNoQueryToVisualizeException MessageErrorType = `NO_QUERY_TO_VISUALIZE_EXCEPTION`
const MessageErrorTypeNoTablesToQueryException MessageErrorType = `NO_TABLES_TO_QUERY_EXCEPTION`
const MessageErrorTypeRateLimitExceededGenericException MessageErrorType = `RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION`
const MessageErrorTypeRateLimitExceededSpecifiedWaitException MessageErrorType = `RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION`
const MessageErrorTypeReplyProcessTimeoutException MessageErrorType = `REPLY_PROCESS_TIMEOUT_EXCEPTION`
const MessageErrorTypeRetryableProcessingException MessageErrorType = `RETRYABLE_PROCESSING_EXCEPTION`
const MessageErrorTypeSqlExecutionException MessageErrorType = `SQL_EXECUTION_EXCEPTION`
const MessageErrorTypeTablesMissingException MessageErrorType = `TABLES_MISSING_EXCEPTION`
const MessageErrorTypeTooManyCertifiedAnswersException MessageErrorType = `TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION`
const MessageErrorTypeTooManyTablesException MessageErrorType = `TOO_MANY_TABLES_EXCEPTION`
const MessageErrorTypeUnexpectedReplyProcessException MessageErrorType = `UNEXPECTED_REPLY_PROCESS_EXCEPTION`
const MessageErrorTypeUnknownAiModel MessageErrorType = `UNKNOWN_AI_MODEL`
const MessageErrorTypeWarehouseAccessMissingException MessageErrorType = `WAREHOUSE_ACCESS_MISSING_EXCEPTION`
const MessageErrorTypeWarehouseNotFoundException MessageErrorType = `WAREHOUSE_NOT_FOUND_EXCEPTION`
func (*MessageErrorType) Set ¶ added in v0.44.0
func (f *MessageErrorType) Set(v string) error
Set raw string value and validate it against allowed values
func (*MessageErrorType) String ¶ added in v0.44.0
func (f *MessageErrorType) String() string
String representation for fmt.Print
func (*MessageErrorType) Type ¶ added in v0.44.0
func (f *MessageErrorType) Type() string
Type always returns MessageErrorType to satisfy [pflag.Value] interface
type MessageStatus ¶ added in v0.44.0
type MessageStatus string
MesssageStatus. The possible values are: * `FETCHING_METADATA`: Fetching metadata from the data sources. * `FILTERING_CONTEXT`: Running smart context step to determine relevant context. * `ASKING_AI`: Waiting for the LLM to respond to the users question. * `EXECUTING_QUERY`: Executing AI provided SQL query. Get the SQL query result by calling [getMessageQueryResult](:method:genie/getMessageQueryResult) API. **Important: The message status will stay in the `EXECUTING_QUERY` until a client calls [getMessageQueryResult](:method:genie/getMessageQueryResult)**. * `FAILED`: Generating a response or the executing the query failed. Please see `error` field. * `COMPLETED`: Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageQueryResult](:method:genie/getMessageQueryResult) API. * `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: SQL result is not available anymore. The user needs to execute the query again. * `CANCELLED`: Message has been cancelled.
const MessageStatusAskingAi MessageStatus = `ASKING_AI`
Waiting for the LLM to respond to the users question.
const MessageStatusCancelled MessageStatus = `CANCELLED`
Message has been cancelled.
const MessageStatusCompleted MessageStatus = `COMPLETED`
Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageQueryResult](:method:genie/getMessageQueryResult) API.
const MessageStatusExecutingQuery MessageStatus = `EXECUTING_QUERY`
Executing AI provided SQL query. Get the SQL query result by calling [getMessageQueryResult](:method:genie/getMessageQueryResult) API. **Important: The message status will stay in the `EXECUTING_QUERY` until a client calls [getMessageQueryResult](:method:genie/getMessageQueryResult)**.
const MessageStatusFailed MessageStatus = `FAILED`
Generating a response or the executing the query failed. Please see `error` field.
const MessageStatusFetchingMetadata MessageStatus = `FETCHING_METADATA`
Fetching metadata from the data sources.
const MessageStatusFilteringContext MessageStatus = `FILTERING_CONTEXT`
Running smart context step to determine relevant context.
const MessageStatusQueryResultExpired MessageStatus = `QUERY_RESULT_EXPIRED`
SQL result is not available anymore. The user needs to execute the query again.
const MessageStatusSubmitted MessageStatus = `SUBMITTED`
Message has been submitted.
func (*MessageStatus) Set ¶ added in v0.44.0
func (f *MessageStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*MessageStatus) String ¶ added in v0.44.0
func (f *MessageStatus) String() string
String representation for fmt.Print
func (*MessageStatus) Type ¶ added in v0.44.0
func (f *MessageStatus) Type() string
Type always returns MessageStatus to satisfy [pflag.Value] interface
type MigrateDashboardRequest ¶ added in v0.37.0
type MigrateDashboardRequest struct { // Display name for the new Lakeview dashboard. DisplayName string `json:"display_name,omitempty"` // The workspace path of the folder to contain the migrated Lakeview // dashboard. ParentPath string `json:"parent_path,omitempty"` // UUID of the dashboard to be migrated. SourceDashboardId string `json:"source_dashboard_id"` ForceSendFields []string `json:"-"` }
func (MigrateDashboardRequest) MarshalJSON ¶ added in v0.37.0
func (s MigrateDashboardRequest) MarshalJSON() ([]byte, error)
func (*MigrateDashboardRequest) UnmarshalJSON ¶ added in v0.37.0
func (s *MigrateDashboardRequest) UnmarshalJSON(b []byte) error
type PublishRequest ¶
type PublishRequest struct { // UUID identifying the dashboard to be published. DashboardId string `json:"-" url:"-"` // Flag to indicate if the publisher's credentials should be embedded in the // published dashboard. These embedded credentials will be used to execute // the published dashboard's queries. EmbedCredentials bool `json:"embed_credentials,omitempty"` // The ID of the warehouse that can be used to override the warehouse which // was set in the draft. WarehouseId string `json:"warehouse_id,omitempty"` ForceSendFields []string `json:"-"` }
func (PublishRequest) MarshalJSON ¶
func (s PublishRequest) MarshalJSON() ([]byte, error)
func (*PublishRequest) UnmarshalJSON ¶
func (s *PublishRequest) UnmarshalJSON(b []byte) error
type PublishedDashboard ¶ added in v0.35.0
type PublishedDashboard struct { // The display name of the published dashboard. DisplayName string `json:"display_name,omitempty"` // Indicates whether credentials are embedded in the published dashboard. EmbedCredentials bool `json:"embed_credentials,omitempty"` // The timestamp of when the published dashboard was last revised. RevisionCreateTime string `json:"revision_create_time,omitempty"` // The warehouse ID used to run the published dashboard. WarehouseId string `json:"warehouse_id,omitempty"` ForceSendFields []string `json:"-"` }
func (PublishedDashboard) MarshalJSON ¶ added in v0.35.0
func (s PublishedDashboard) MarshalJSON() ([]byte, error)
func (*PublishedDashboard) UnmarshalJSON ¶ added in v0.35.0
func (s *PublishedDashboard) UnmarshalJSON(b []byte) error
type QueryAttachment ¶ added in v0.44.0
type QueryAttachment struct { // Description of the query Description string `json:"description,omitempty"` Id string `json:"id,omitempty"` // If the query was created on an instruction (trusted asset) we link to the // id InstructionId string `json:"instruction_id,omitempty"` // Always store the title next to the id in case the original instruction // title changes or the instruction is deleted. InstructionTitle string `json:"instruction_title,omitempty"` // Time when the user updated the query last LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // AI generated SQL query Query string `json:"query,omitempty"` // Name of the query Title string `json:"title,omitempty"` ForceSendFields []string `json:"-"` }
func (QueryAttachment) MarshalJSON ¶ added in v0.44.0
func (s QueryAttachment) MarshalJSON() ([]byte, error)
func (*QueryAttachment) UnmarshalJSON ¶ added in v0.44.0
func (s *QueryAttachment) UnmarshalJSON(b []byte) error
type Result ¶ added in v0.44.0
type Result struct { // If result is truncated IsTruncated bool `json:"is_truncated,omitempty"` // Row count of the result RowCount int64 `json:"row_count,omitempty"` // Statement Execution API statement id. Use [Get status, manifest, and // result first chunk](:method:statementexecution/getstatement) to get the // full result data. StatementId string `json:"statement_id,omitempty"` ForceSendFields []string `json:"-"` }
func (Result) MarshalJSON ¶ added in v0.44.0
func (*Result) UnmarshalJSON ¶ added in v0.44.0
type Schedule ¶ added in v0.43.0
type Schedule struct { // A timestamp indicating when the schedule was created. CreateTime string `json:"create_time,omitempty"` // The cron expression describing the frequency of the periodic refresh for // this schedule. CronSchedule CronSchedule `json:"cron_schedule"` // UUID identifying the dashboard to which the schedule belongs. DashboardId string `json:"dashboard_id,omitempty"` // The display name for schedule. DisplayName string `json:"display_name,omitempty"` // The etag for the schedule. Must be left empty on create, must be provided // on updates to ensure that the schedule has not been modified since the // last read, and can be optionally provided on delete. Etag string `json:"etag,omitempty"` // The status indicates whether this schedule is paused or not. PauseStatus SchedulePauseStatus `json:"pause_status,omitempty"` // UUID identifying the schedule. ScheduleId string `json:"schedule_id,omitempty"` // A timestamp indicating when the schedule was last updated. UpdateTime string `json:"update_time,omitempty"` // The warehouse id to run the dashboard with for the schedule. WarehouseId string `json:"warehouse_id,omitempty"` ForceSendFields []string `json:"-"` }
func (Schedule) MarshalJSON ¶ added in v0.43.0
func (*Schedule) UnmarshalJSON ¶ added in v0.43.0
type SchedulePauseStatus ¶ added in v0.43.0
type SchedulePauseStatus string
const SchedulePauseStatusPaused SchedulePauseStatus = `PAUSED`
const SchedulePauseStatusUnpaused SchedulePauseStatus = `UNPAUSED`
func (*SchedulePauseStatus) Set ¶ added in v0.43.0
func (f *SchedulePauseStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*SchedulePauseStatus) String ¶ added in v0.43.0
func (f *SchedulePauseStatus) String() string
String representation for fmt.Print
func (*SchedulePauseStatus) Type ¶ added in v0.43.0
func (f *SchedulePauseStatus) Type() string
Type always returns SchedulePauseStatus to satisfy [pflag.Value] interface
type Subscriber ¶ added in v0.43.0
type Subscriber struct { // The destination to receive the subscription email. This parameter is // mutually exclusive with `user_subscriber`. DestinationSubscriber *SubscriptionSubscriberDestination `json:"destination_subscriber,omitempty"` // The user to receive the subscription email. This parameter is mutually // exclusive with `destination_subscriber`. UserSubscriber *SubscriptionSubscriberUser `json:"user_subscriber,omitempty"` }
type Subscription ¶ added in v0.43.0
type Subscription struct { // A timestamp indicating when the subscription was created. CreateTime string `json:"create_time,omitempty"` // UserId of the user who adds subscribers (users or notification // destinations) to the dashboard's schedule. CreatedByUserId int64 `json:"created_by_user_id,omitempty"` // UUID identifying the dashboard to which the subscription belongs. DashboardId string `json:"dashboard_id,omitempty"` // The etag for the subscription. Must be left empty on create, can be // optionally provided on delete to ensure that the subscription has not // been deleted since the last read. Etag string `json:"etag,omitempty"` // UUID identifying the schedule to which the subscription belongs. ScheduleId string `json:"schedule_id,omitempty"` // Subscriber details for users and destinations to be added as subscribers // to the schedule. Subscriber Subscriber `json:"subscriber"` // UUID identifying the subscription. SubscriptionId string `json:"subscription_id,omitempty"` // A timestamp indicating when the subscription was last updated. UpdateTime string `json:"update_time,omitempty"` ForceSendFields []string `json:"-"` }
func (Subscription) MarshalJSON ¶ added in v0.43.0
func (s Subscription) MarshalJSON() ([]byte, error)
func (*Subscription) UnmarshalJSON ¶ added in v0.43.0
func (s *Subscription) UnmarshalJSON(b []byte) error
type SubscriptionSubscriberDestination ¶ added in v0.43.0
type SubscriptionSubscriberDestination struct { // The canonical identifier of the destination to receive email // notification. DestinationId string `json:"destination_id"` }
type SubscriptionSubscriberUser ¶ added in v0.43.0
type SubscriptionSubscriberUser struct { // UserId of the subscriber. UserId int64 `json:"user_id"` }
type TextAttachment ¶ added in v0.44.0
type TextAttachment struct { // AI generated message Content string `json:"content,omitempty"` Id string `json:"id,omitempty"` ForceSendFields []string `json:"-"` }
func (TextAttachment) MarshalJSON ¶ added in v0.44.0
func (s TextAttachment) MarshalJSON() ([]byte, error)
func (*TextAttachment) UnmarshalJSON ¶ added in v0.44.0
func (s *TextAttachment) UnmarshalJSON(b []byte) error
type TrashDashboardRequest ¶ added in v0.36.0
type TrashDashboardRequest struct { // UUID identifying the dashboard. DashboardId string `json:"-" url:"-"` }
Trash dashboard
type TrashDashboardResponse ¶ added in v0.35.0
type TrashDashboardResponse struct { }
type UnpublishDashboardRequest ¶ added in v0.37.0
type UnpublishDashboardRequest struct { // UUID identifying the dashboard to be published. DashboardId string `json:"-" url:"-"` }
Unpublish dashboard
type UnpublishDashboardResponse ¶ added in v0.37.0
type UnpublishDashboardResponse struct { }
type UpdateDashboardRequest ¶ added in v0.35.0
type UpdateDashboardRequest struct { Dashboard *Dashboard `json:"dashboard,omitempty"` // UUID identifying the dashboard. DashboardId string `json:"-" url:"-"` }
Update dashboard
type UpdateScheduleRequest ¶ added in v0.43.0
type UpdateScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId string `json:"-" url:"-"` Schedule *Schedule `json:"schedule,omitempty"` // UUID identifying the schedule. ScheduleId string `json:"-" url:"-"` }
Update dashboard schedule
type WaitGetMessageGenieCompleted ¶ added in v0.44.0
type WaitGetMessageGenieCompleted[R any] struct { Response *R ConversationId string `json:"conversation_id"` MessageId string `json:"message_id"` SpaceId string `json:"space_id"` Poll func(time.Duration, func(*GenieMessage)) (*GenieMessage, error) // contains filtered or unexported fields }
WaitGetMessageGenieCompleted is a wrapper that calls GenieAPI.WaitGetMessageGenieCompleted and waits to reach COMPLETED state.
func (*WaitGetMessageGenieCompleted[R]) Get ¶ added in v0.44.0
func (w *WaitGetMessageGenieCompleted[R]) Get() (*GenieMessage, error)
Get the GenieMessage with the default timeout of 20 minutes.
func (*WaitGetMessageGenieCompleted[R]) GetWithTimeout ¶ added in v0.44.0
func (w *WaitGetMessageGenieCompleted[R]) GetWithTimeout(timeout time.Duration) (*GenieMessage, error)
Get the GenieMessage with custom timeout.
func (*WaitGetMessageGenieCompleted[R]) OnProgress ¶ added in v0.44.0
func (w *WaitGetMessageGenieCompleted[R]) OnProgress(callback func(*GenieMessage)) *WaitGetMessageGenieCompleted[R]
OnProgress invokes a callback every time it polls for the status update.