Documentation
¶
Overview ¶
These APIs allow you to manage Genie, Lakeview, Lakeview Embedded, Query Execution, etc.
Index ¶
- type AuthorizationDetails
- type AuthorizationDetailsGrantRule
- type CancelPublishedQueryExecutionRequest
- type CancelQueryExecutionResponse
- type CancelQueryExecutionResponseStatus
- type CreateDashboardRequest
- type CreateScheduleRequest
- type CreateSubscriptionRequest
- type CronSchedule
- type Dashboard
- type DashboardView
- type DeleteScheduleRequest
- type DeleteScheduleResponse
- type DeleteSubscriptionRequest
- type DeleteSubscriptionResponse
- type Empty
- type ExecutePublishedDashboardQueryRequest
- type ExecuteQueryResponse
- 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) ExecuteMessageAttachmentQuery(ctx context.Context, request GenieExecuteMessageAttachmentQueryRequest) (*GenieGetMessageQueryResultResponse, error)
- func (a *GenieAPI) ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error)
- func (a *GenieAPI) GenerateDownloadFullQueryResult(ctx context.Context, request GenieGenerateDownloadFullQueryResultRequest) (*GenieGenerateDownloadFullQueryResultResponse, error)
- func (a *GenieAPI) GetDownloadFullQueryResult(ctx context.Context, request GenieGetDownloadFullQueryResultRequest) (*GenieGetDownloadFullQueryResultResponse, error)
- func (a *GenieAPI) GetDownloadFullQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentIdAndDownloadId(ctx context.Context, spaceId string, conversationId string, messageId string, ...) (*GenieGetDownloadFullQueryResultResponse, error)
- func (a *GenieAPI) GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error)
- func (a *GenieAPI) GetMessageAttachmentQueryResult(ctx context.Context, request GenieGetMessageAttachmentQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)
- func (a *GenieAPI) GetMessageAttachmentQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, ...) (*GenieGetMessageQueryResultResponse, 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) GetMessageQueryResultByAttachment(ctx context.Context, request GenieGetQueryResultByAttachmentRequest) (*GenieGetMessageQueryResultResponse, error)
- func (a *GenieAPI) GetMessageQueryResultByAttachmentBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, ...) (*GenieGetMessageQueryResultResponse, error)
- func (a *GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieGetMessageQueryResultResponse, error)
- func (a *GenieAPI) GetSpace(ctx context.Context, request GenieGetSpaceRequest) (*GenieSpace, error)
- func (a *GenieAPI) GetSpaceBySpaceId(ctx context.Context, spaceId string) (*GenieSpace, 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 GenieExecuteMessageAttachmentQueryRequest
- type GenieExecuteMessageQueryRequest
- type GenieGenerateDownloadFullQueryResultRequest
- type GenieGenerateDownloadFullQueryResultResponse
- type GenieGetConversationMessageRequest
- type GenieGetDownloadFullQueryResultRequest
- type GenieGetDownloadFullQueryResultResponse
- type GenieGetMessageAttachmentQueryResultRequest
- type GenieGetMessageQueryResultRequest
- type GenieGetMessageQueryResultResponse
- type GenieGetQueryResultByAttachmentRequest
- type GenieGetSpaceRequest
- type GenieInterface
- type GenieMessage
- type GenieQueryAttachment
- type GenieResultMetadata
- type GenieService
- type GenieSpace
- type GenieStartConversationMessageRequest
- type GenieStartConversationResponse
- type GetDashboardRequest
- type GetPublishedDashboardEmbeddedRequest
- type GetPublishedDashboardEmbeddedResponse
- type GetPublishedDashboardRequest
- type GetPublishedDashboardTokenInfoRequest
- type GetPublishedDashboardTokenInfoResponse
- 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 LakeviewEmbeddedAPI
- func (a *LakeviewEmbeddedAPI) GetPublishedDashboardEmbedded(ctx context.Context, request GetPublishedDashboardEmbeddedRequest) error
- func (a *LakeviewEmbeddedAPI) GetPublishedDashboardEmbeddedByDashboardId(ctx context.Context, dashboardId string) error
- func (a *LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfo(ctx context.Context, request GetPublishedDashboardTokenInfoRequest) (*GetPublishedDashboardTokenInfoResponse, error)
- func (a *LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfoByDashboardId(ctx context.Context, dashboardId string) (*GetPublishedDashboardTokenInfoResponse, error)
- type LakeviewEmbeddedInterface
- type LakeviewEmbeddedService
- 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 PendingStatus
- type PollPublishedQueryStatusRequest
- type PollQueryStatusResponse
- type PollQueryStatusResponseData
- type PublishRequest
- type PublishedDashboard
- type QueryExecutionAPI
- func (a *QueryExecutionAPI) CancelPublishedQueryExecution(ctx context.Context, request CancelPublishedQueryExecutionRequest) (*CancelQueryExecutionResponse, error)
- func (a *QueryExecutionAPI) ExecutePublishedDashboardQuery(ctx context.Context, request ExecutePublishedDashboardQueryRequest) error
- func (a *QueryExecutionAPI) PollPublishedQueryStatus(ctx context.Context, request PollPublishedQueryStatusRequest) (*PollQueryStatusResponse, error)
- type QueryExecutionInterface
- type QueryExecutionService
- type QueryResponseStatus
- type Result
- type Schedule
- type SchedulePauseStatus
- type Subscriber
- type Subscription
- type SubscriptionSubscriberDestination
- type SubscriptionSubscriberUser
- type SuccessStatus
- 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 AuthorizationDetails ¶ added in v0.63.0
type AuthorizationDetails struct { // Represents downscoped permission rules with specific access rights. This // field is specific to `workspace_rule_set` constraint. GrantRules []AuthorizationDetailsGrantRule `json:"grant_rules,omitempty"` // The acl path of the tree store resource resource. ResourceLegacyAclPath string `json:"resource_legacy_acl_path,omitempty"` // The resource name to which the authorization rule applies. This field is // specific to `workspace_rule_set` constraint. Format: // `workspaces/{workspace_id}/dashboards/{dashboard_id}` ResourceName string `json:"resource_name,omitempty"` // The type of authorization downscoping policy. Ex: `workspace_rule_set` // defines access rules for a specific workspace resource Type string `json:"type,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
func (AuthorizationDetails) MarshalJSON ¶ added in v0.63.0
func (s AuthorizationDetails) MarshalJSON() ([]byte, error)
func (*AuthorizationDetails) UnmarshalJSON ¶ added in v0.63.0
func (s *AuthorizationDetails) UnmarshalJSON(b []byte) error
type AuthorizationDetailsGrantRule ¶ added in v0.63.0
type AuthorizationDetailsGrantRule struct { // Permission sets for dashboard are defined in // iam-common/rbac-common/permission-sets/definitions/TreeStoreBasePermissionSets // Ex: `permissionSets/dashboard.runner` PermissionSet string `json:"permission_set,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
func (AuthorizationDetailsGrantRule) MarshalJSON ¶ added in v0.63.0
func (s AuthorizationDetailsGrantRule) MarshalJSON() ([]byte, error)
func (*AuthorizationDetailsGrantRule) UnmarshalJSON ¶ added in v0.63.0
func (s *AuthorizationDetailsGrantRule) UnmarshalJSON(b []byte) error
type CancelPublishedQueryExecutionRequest ¶ added in v0.57.0
type CancelPublishedQueryExecutionRequest struct { DashboardName string `json:"-" url:"dashboard_name"` DashboardRevisionId string `json:"-" url:"dashboard_revision_id"` // Example: // EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ Tokens []string `json:"-" url:"tokens,omitempty"` }
Cancel the results for the a query for a published, embedded dashboard
type CancelQueryExecutionResponse ¶ added in v0.57.0
type CancelQueryExecutionResponse struct {
Status []CancelQueryExecutionResponseStatus `json:"status,omitempty"`
}
type CancelQueryExecutionResponseStatus ¶ added in v0.57.0
type CancelQueryExecutionResponseStatus struct { // The token to poll for result asynchronously Example: // EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ DataToken string `json:"data_token"` // Represents an empty message, similar to google.protobuf.Empty, which is // not available in the firm right now. Pending *Empty `json:"pending,omitempty"` // Represents an empty message, similar to google.protobuf.Empty, which is // not available in the firm right now. Success *Empty `json:"success,omitempty"` }
type CreateDashboardRequest ¶ added in v0.35.0
type CreateDashboardRequest struct {
Dashboard Dashboard `json:"dashboard"`
}
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"` }
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"` }
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:"-" url:"-"` }
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:"-" url:"-"` }
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:"-" url:"-"` }
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 Empty ¶ added in v0.57.0
type Empty struct { }
Represents an empty message, similar to google.protobuf.Empty, which is not available in the firm right now.
type ExecutePublishedDashboardQueryRequest ¶ added in v0.57.0
type ExecutePublishedDashboardQueryRequest struct { // Dashboard name and revision_id is required to retrieve // PublishedDatasetDataModel which contains the list of datasets, // warehouse_id, and embedded_credentials DashboardName string `json:"dashboard_name"` DashboardRevisionId string `json:"dashboard_revision_id"` // A dashboard schedule can override the warehouse used as compute for // processing the published dashboard queries OverrideWarehouseId string `json:"override_warehouse_id,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
Execute query request for published Dashboards. Since published dashboards have the option of running as the publisher, the datasets, warehouse_id are excluded from the request and instead read from the source (lakeview-config) via the additional parameters (dashboardName and dashboardRevisionId)
func (ExecutePublishedDashboardQueryRequest) MarshalJSON ¶ added in v0.57.0
func (s ExecutePublishedDashboardQueryRequest) MarshalJSON() ([]byte, error)
func (*ExecutePublishedDashboardQueryRequest) UnmarshalJSON ¶ added in v0.57.0
func (s *ExecutePublishedDashboardQueryRequest) UnmarshalJSON(b []byte) error
type ExecuteQueryResponse ¶ added in v0.57.0
type ExecuteQueryResponse 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 a [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) ExecuteMessageAttachmentQuery ¶ added in v0.60.0
func (a *GenieAPI) ExecuteMessageAttachmentQuery(ctx context.Context, request GenieExecuteMessageAttachmentQueryRequest) (*GenieGetMessageQueryResultResponse, error)
func (*GenieAPI) ExecuteMessageQuery ¶ added in v0.44.0
func (a *GenieAPI) ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error)
func (*GenieAPI) GenerateDownloadFullQueryResult ¶ added in v0.61.0
func (a *GenieAPI) GenerateDownloadFullQueryResult(ctx context.Context, request GenieGenerateDownloadFullQueryResultRequest) (*GenieGenerateDownloadFullQueryResultResponse, error)
func (*GenieAPI) GetDownloadFullQueryResult ¶ added in v0.63.0
func (a *GenieAPI) GetDownloadFullQueryResult(ctx context.Context, request GenieGetDownloadFullQueryResultRequest) (*GenieGetDownloadFullQueryResultResponse, error)
func (*GenieAPI) GetDownloadFullQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentIdAndDownloadId ¶ added in v0.63.0
func (a *GenieAPI) GetDownloadFullQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentIdAndDownloadId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string, downloadId string) (*GenieGetDownloadFullQueryResultResponse, error)
Get download full query result.
After [Generating a Full Query Result Download](:method:genie/getdownloadfullqueryresult) and successfully receiving a `download_id`, use this API to poll the download progress. When the download is complete, the API returns one or more external links to the query result files. Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition. You must not set an Authorization header in download requests. When using the `EXTERNAL_LINKS` disposition, Databricks returns presigned URLs that grant temporary access to data. See [Execute Statement](:method:statementexecution/executestatement) for more details.
func (*GenieAPI) GetMessage ¶ added in v0.44.0
func (a *GenieAPI) GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error)
func (*GenieAPI) GetMessageAttachmentQueryResult ¶ added in v0.60.0
func (a *GenieAPI) GetMessageAttachmentQueryResult(ctx context.Context, request GenieGetMessageAttachmentQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)
func (*GenieAPI) GetMessageAttachmentQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentId ¶ added in v0.60.0
func (a *GenieAPI) GetMessageAttachmentQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error)
Get message attachment 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` OR `COMPLETED`.
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) GetMessageQueryResultByAttachment ¶ added in v0.58.0
func (a *GenieAPI) GetMessageQueryResultByAttachment(ctx context.Context, request GenieGetQueryResultByAttachmentRequest) (*GenieGetMessageQueryResultResponse, error)
func (*GenieAPI) GetMessageQueryResultByAttachmentBySpaceIdAndConversationIdAndMessageIdAndAttachmentId ¶ added in v0.58.0
func (a *GenieAPI) GetMessageQueryResultByAttachmentBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error)
[Deprecated] 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` OR `COMPLETED`.
func (*GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId ¶ added in v0.44.0
func (a *GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieGetMessageQueryResultResponse, error)
[Deprecated] 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) GetSpace ¶ added in v0.59.0
func (a *GenieAPI) GetSpace(ctx context.Context, request GenieGetSpaceRequest) (*GenieSpace, error)
func (*GenieAPI) GetSpaceBySpaceId ¶ added in v0.59.0
Get Genie Space.
Get details of a Genie Space.
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 { // Attachment ID AttachmentId string `json:"attachment_id,omitempty"` // Query Attachment if Genie responds with a SQL query Query *GenieQueryAttachment `json:"query,omitempty"` // Text Attachment if Genie responds with text Text *TextAttachment `json:"text,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
Genie AI Response
func (GenieAttachment) MarshalJSON ¶ added in v0.59.0
func (s GenieAttachment) MarshalJSON() ([]byte, error)
func (*GenieAttachment) UnmarshalJSON ¶ added in v0.59.0
func (s *GenieAttachment) UnmarshalJSON(b []byte) error
type GenieConversation ¶ added in v0.44.0
type GenieConversation struct { // Conversation ID ConversationId string `json:"conversation_id"` // Timestamp when the message was created CreatedTimestamp int64 `json:"created_timestamp,omitempty"` // Conversation ID. Legacy identifier, use conversation_id instead 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:"-" url:"-"` }
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 GenieExecuteMessageAttachmentQueryRequest ¶ added in v0.60.0
type GenieExecuteMessageAttachmentQueryRequest struct { // Attachment ID AttachmentId string `json:"-" url:"-"` // Conversation ID ConversationId string `json:"-" url:"-"` // Message ID MessageId string `json:"-" url:"-"` // Genie space ID SpaceId string `json:"-" url:"-"` }
Execute message attachment SQL query
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:"-"` }
[Deprecated] Execute SQL query in a conversation message
type GenieGenerateDownloadFullQueryResultRequest ¶ added in v0.61.0
type GenieGenerateDownloadFullQueryResultRequest struct { // Attachment ID AttachmentId string `json:"-" url:"-"` // Conversation ID ConversationId string `json:"-" url:"-"` // Message ID MessageId string `json:"-" url:"-"` // Genie space ID SpaceId string `json:"-" url:"-"` }
Generate full query result download
type GenieGenerateDownloadFullQueryResultResponse ¶ added in v0.61.0
type GenieGenerateDownloadFullQueryResultResponse struct { // Download ID. Use this ID to track the download request in subsequent // polling calls DownloadId string `json:"download_id,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
func (GenieGenerateDownloadFullQueryResultResponse) MarshalJSON ¶ added in v0.61.0
func (s GenieGenerateDownloadFullQueryResultResponse) MarshalJSON() ([]byte, error)
func (*GenieGenerateDownloadFullQueryResultResponse) UnmarshalJSON ¶ added in v0.61.0
func (s *GenieGenerateDownloadFullQueryResultResponse) UnmarshalJSON(b []byte) error
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 GenieGetDownloadFullQueryResultRequest ¶ added in v0.63.0
type GenieGetDownloadFullQueryResultRequest struct { // Attachment ID AttachmentId string `json:"-" url:"-"` // Conversation ID ConversationId string `json:"-" url:"-"` // Download ID. This ID is provided by the [Generate Download // endpoint](:method:genie/generateDownloadFullQueryResult) DownloadId string `json:"-" url:"-"` // Message ID MessageId string `json:"-" url:"-"` // Genie space ID SpaceId string `json:"-" url:"-"` }
Get download full query result
type GenieGetDownloadFullQueryResultResponse ¶ added in v0.63.0
type GenieGetDownloadFullQueryResultResponse 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 GenieGetMessageAttachmentQueryResultRequest ¶ added in v0.60.0
type GenieGetMessageAttachmentQueryResultRequest struct { // Attachment ID AttachmentId string `json:"-" url:"-"` // Conversation ID ConversationId string `json:"-" url:"-"` // Message ID MessageId string `json:"-" url:"-"` // Genie space ID SpaceId string `json:"-" url:"-"` }
Get message attachment SQL query result
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:"-"` }
[Deprecated] 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 GenieGetQueryResultByAttachmentRequest ¶ added in v0.58.0
type GenieGetQueryResultByAttachmentRequest struct { // Attachment ID AttachmentId string `json:"-" url:"-"` // Conversation ID ConversationId string `json:"-" url:"-"` // Message ID MessageId string `json:"-" url:"-"` // Genie space ID SpaceId string `json:"-" url:"-"` }
[Deprecated] Get conversation message SQL query result
type GenieGetSpaceRequest ¶ added in v0.59.0
type GenieGetSpaceRequest struct { // The ID associated with the Genie space SpaceId string `json:"-" url:"-"` }
Get Genie Space
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 a [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 message attachment SQL query. // // Execute the SQL for a message query attachment. Use this API when the query // attachment has expired and needs to be re-executed. ExecuteMessageAttachmentQuery(ctx context.Context, request GenieExecuteMessageAttachmentQueryRequest) (*GenieGetMessageQueryResultResponse, error) // [Deprecated] Execute SQL query in a conversation message. // // Execute the SQL query in the message. ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error) // Generate full query result download. // // Initiates a new SQL execution and returns a `download_id` that you can use to // track the progress of the download. The query result is stored in an external // link and can be retrieved using the [Get Download Full Query // Result](:method:genie/getdownloadfullqueryresult) API. Warning: Databricks // strongly recommends that you protect the URLs that are returned by the // `EXTERNAL_LINKS` disposition. See [Execute // Statement](:method:statementexecution/executestatement) for more details. GenerateDownloadFullQueryResult(ctx context.Context, request GenieGenerateDownloadFullQueryResultRequest) (*GenieGenerateDownloadFullQueryResultResponse, error) // Get download full query result. // // After [Generating a Full Query Result // Download](:method:genie/getdownloadfullqueryresult) and successfully // receiving a `download_id`, use this API to poll the download progress. When // the download is complete, the API returns one or more external links to the // query result files. Warning: Databricks strongly recommends that you protect // the URLs that are returned by the `EXTERNAL_LINKS` disposition. You must not // set an Authorization header in download requests. When using the // `EXTERNAL_LINKS` disposition, Databricks returns presigned URLs that grant // temporary access to data. See [Execute // Statement](:method:statementexecution/executestatement) for more details. GetDownloadFullQueryResult(ctx context.Context, request GenieGetDownloadFullQueryResultRequest) (*GenieGetDownloadFullQueryResultResponse, error) // Get download full query result. // // After [Generating a Full Query Result // Download](:method:genie/getdownloadfullqueryresult) and successfully // receiving a `download_id`, use this API to poll the download progress. When // the download is complete, the API returns one or more external links to the // query result files. Warning: Databricks strongly recommends that you protect // the URLs that are returned by the `EXTERNAL_LINKS` disposition. You must not // set an Authorization header in download requests. When using the // `EXTERNAL_LINKS` disposition, Databricks returns presigned URLs that grant // temporary access to data. See [Execute // Statement](:method:statementexecution/executestatement) for more details. GetDownloadFullQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentIdAndDownloadId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string, downloadId string) (*GenieGetDownloadFullQueryResultResponse, 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 message attachment 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` OR `COMPLETED`. GetMessageAttachmentQueryResult(ctx context.Context, request GenieGetMessageAttachmentQueryResultRequest) (*GenieGetMessageQueryResultResponse, error) // Get message attachment 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` OR `COMPLETED`. GetMessageAttachmentQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error) // [Deprecated] 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) // [Deprecated] 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) // [Deprecated] 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` OR `COMPLETED`. GetMessageQueryResultByAttachment(ctx context.Context, request GenieGetQueryResultByAttachmentRequest) (*GenieGetMessageQueryResultResponse, error) // [Deprecated] 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` OR `COMPLETED`. GetMessageQueryResultByAttachmentBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error) // Get Genie Space. // // Get details of a Genie Space. GetSpace(ctx context.Context, request GenieGetSpaceRequest) (*GenieSpace, error) // Get Genie Space. // // Get details of a Genie Space. GetSpaceBySpaceId(ctx context.Context, spaceId string) (*GenieSpace, 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-generated 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 Genie failed to respond to the message Error *MessageError `json:"error,omitempty"` // Message ID. Legacy identifier, use message_id instead Id string `json:"id"` // Timestamp when the message was last updated LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // Message ID MessageId string `json:"message_id"` // The result of SQL query if the message includes a query attachment. // Deprecated. Use `query_result_metadata` in `GenieQueryAttachment` // instead. QueryResult *Result `json:"query_result,omitempty"` // Genie space ID SpaceId string `json:"space_id"` // MessageStatus. 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 user's question. * `PENDING_WAREHOUSE`: Waiting // for warehouse before the SQL query can start executing. * // `EXECUTING_QUERY`: Executing a generated SQL query. Get the SQL query // result by calling // [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) // API. * `FAILED`: The response generation or query execution failed. See // `error` field. * `COMPLETED`: Message processing is completed. Results // are in the `attachments` field. Get the SQL query result by calling // [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) // API. * `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: // SQL result is not available anymore. The user needs to rerun the query. // Rerun the SQL query result by calling // [executeMessageAttachmentQuery](:method:genie/executeMessageAttachmentQuery) // API. * `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:"-" url:"-"` }
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 GenieQueryAttachment ¶ added in v0.59.0
type GenieQueryAttachment struct { // Description of the query Description string `json:"description,omitempty"` Id string `json:"id,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"` // Metadata associated with the query result. QueryResultMetadata *GenieResultMetadata `json:"query_result_metadata,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"` // Name of the query Title string `json:"title,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
func (GenieQueryAttachment) MarshalJSON ¶ added in v0.59.0
func (s GenieQueryAttachment) MarshalJSON() ([]byte, error)
func (*GenieQueryAttachment) UnmarshalJSON ¶ added in v0.59.0
func (s *GenieQueryAttachment) UnmarshalJSON(b []byte) error
type GenieResultMetadata ¶ added in v0.59.0
type GenieResultMetadata struct { // Indicates whether the result set is truncated. IsTruncated bool `json:"is_truncated,omitempty"` // The number of rows in the result set. RowCount int64 `json:"row_count,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
func (GenieResultMetadata) MarshalJSON ¶ added in v0.59.0
func (s GenieResultMetadata) MarshalJSON() ([]byte, error)
func (*GenieResultMetadata) UnmarshalJSON ¶ added in v0.59.0
func (s *GenieResultMetadata) UnmarshalJSON(b []byte) error
type GenieService ¶ added in v0.44.0
type GenieService interface { // Create conversation message. // // Create new message in a [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 message attachment SQL query. // // Execute the SQL for a message query attachment. Use this API when the // query attachment has expired and needs to be re-executed. ExecuteMessageAttachmentQuery(ctx context.Context, request GenieExecuteMessageAttachmentQueryRequest) (*GenieGetMessageQueryResultResponse, error) // [Deprecated] Execute SQL query in a conversation message. // // Execute the SQL query in the message. ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error) // Generate full query result download. // // Initiates a new SQL execution and returns a `download_id` that you can // use to track the progress of the download. The query result is stored in // an external link and can be retrieved using the [Get Download Full Query // Result](:method:genie/getdownloadfullqueryresult) API. Warning: // Databricks strongly recommends that you protect the URLs that are // returned by the `EXTERNAL_LINKS` disposition. See [Execute // Statement](:method:statementexecution/executestatement) for more details. GenerateDownloadFullQueryResult(ctx context.Context, request GenieGenerateDownloadFullQueryResultRequest) (*GenieGenerateDownloadFullQueryResultResponse, error) // Get download full query result. // // After [Generating a Full Query Result // Download](:method:genie/getdownloadfullqueryresult) and successfully // receiving a `download_id`, use this API to poll the download progress. // When the download is complete, the API returns one or more external links // to the query result files. Warning: Databricks strongly recommends that // you protect the URLs that are returned by the `EXTERNAL_LINKS` // disposition. You must not set an Authorization header in download // requests. When using the `EXTERNAL_LINKS` disposition, Databricks returns // presigned URLs that grant temporary access to data. See [Execute // Statement](:method:statementexecution/executestatement) for more details. GetDownloadFullQueryResult(ctx context.Context, request GenieGetDownloadFullQueryResultRequest) (*GenieGetDownloadFullQueryResultResponse, error) // Get conversation message. // // Get message from conversation. GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error) // Get message attachment 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` OR `COMPLETED`. GetMessageAttachmentQueryResult(ctx context.Context, request GenieGetMessageAttachmentQueryResultRequest) (*GenieGetMessageQueryResultResponse, error) // [Deprecated] 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) // [Deprecated] 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` OR `COMPLETED`. GetMessageQueryResultByAttachment(ctx context.Context, request GenieGetQueryResultByAttachmentRequest) (*GenieGetMessageQueryResultResponse, error) // Get Genie Space. // // Get details of a Genie Space. GetSpace(ctx context.Context, request GenieGetSpaceRequest) (*GenieSpace, 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 GenieSpace ¶ added in v0.59.0
type GenieSpace struct { // Description of the Genie Space Description string `json:"description,omitempty"` // Genie space ID SpaceId string `json:"space_id"` // Title of the Genie Space Title string `json:"title"` ForceSendFields []string `json:"-" url:"-"` }
func (GenieSpace) MarshalJSON ¶ added in v0.59.0
func (s GenieSpace) MarshalJSON() ([]byte, error)
func (*GenieSpace) UnmarshalJSON ¶ added in v0.59.0
func (s *GenieSpace) UnmarshalJSON(b []byte) error
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 GetPublishedDashboardEmbeddedRequest ¶ added in v0.57.0
type GetPublishedDashboardEmbeddedRequest struct { // UUID identifying the published dashboard. DashboardId string `json:"-" url:"-"` }
Read a published dashboard in an embedded ui.
type GetPublishedDashboardEmbeddedResponse ¶ added in v0.57.0
type GetPublishedDashboardEmbeddedResponse struct { }
type GetPublishedDashboardRequest ¶ added in v0.36.0
type GetPublishedDashboardRequest struct { // UUID identifying the published dashboard. DashboardId string `json:"-" url:"-"` }
Get published dashboard
type GetPublishedDashboardTokenInfoRequest ¶ added in v0.63.0
type GetPublishedDashboardTokenInfoRequest struct { // UUID identifying the published dashboard. DashboardId string `json:"-" url:"-"` // Provided external value to be included in the custom claim. ExternalValue string `json:"-" url:"external_value,omitempty"` // Provided external viewer id to be included in the custom claim. ExternalViewerId string `json:"-" url:"external_viewer_id,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
Read an information of a published dashboard to mint an OAuth token.
func (GetPublishedDashboardTokenInfoRequest) MarshalJSON ¶ added in v0.63.0
func (s GetPublishedDashboardTokenInfoRequest) MarshalJSON() ([]byte, error)
func (*GetPublishedDashboardTokenInfoRequest) UnmarshalJSON ¶ added in v0.63.0
func (s *GetPublishedDashboardTokenInfoRequest) UnmarshalJSON(b []byte) error
type GetPublishedDashboardTokenInfoResponse ¶ added in v0.63.0
type GetPublishedDashboardTokenInfoResponse struct { // Authorization constraints for accessing the published dashboard. // Currently includes `workspace_rule_set` and could be enriched with // `unity_catalog_privileges` before oAuth token generation. AuthorizationDetails []AuthorizationDetails `json:"authorization_details,omitempty"` // Custom claim generated from external_value and external_viewer_id. // Format: // `urn:aibi:external_data:<external_value>:<external_viewer_id>:<dashboard_id>` CustomClaim string `json:"custom_claim,omitempty"` // Scope defining access permissions. Scope string `json:"scope,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
func (GetPublishedDashboardTokenInfoResponse) MarshalJSON ¶ added in v0.63.0
func (s GetPublishedDashboardTokenInfoResponse) MarshalJSON() ([]byte, error)
func (*GetPublishedDashboardTokenInfoResponse) UnmarshalJSON ¶ added in v0.63.0
func (s *GetPublishedDashboardTokenInfoResponse) UnmarshalJSON(b []byte) error
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.
func (*LakeviewAPI) ListAll ¶ added in v0.43.0
func (a *LakeviewAPI) ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error)
List dashboards.
func (*LakeviewAPI) ListSchedules ¶ added in v0.43.0
func (a *LakeviewAPI) ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule]
List dashboard schedules.
func (*LakeviewAPI) ListSchedulesAll ¶ added in v0.43.0
func (a *LakeviewAPI) ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error)
List dashboard schedules.
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.
func (*LakeviewAPI) ListSubscriptionsAll ¶ added in v0.43.0
func (a *LakeviewAPI) ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error)
List schedule subscriptions.
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 LakeviewEmbeddedAPI ¶ added in v0.57.0
type LakeviewEmbeddedAPI struct {
// contains filtered or unexported fields
}
Token-based Lakeview APIs for embedding dashboards in external applications.
func NewLakeviewEmbedded ¶ added in v0.57.0
func NewLakeviewEmbedded(client *client.DatabricksClient) *LakeviewEmbeddedAPI
func (*LakeviewEmbeddedAPI) GetPublishedDashboardEmbedded ¶ added in v0.57.0
func (a *LakeviewEmbeddedAPI) GetPublishedDashboardEmbedded(ctx context.Context, request GetPublishedDashboardEmbeddedRequest) error
func (*LakeviewEmbeddedAPI) GetPublishedDashboardEmbeddedByDashboardId ¶ added in v0.57.0
func (a *LakeviewEmbeddedAPI) GetPublishedDashboardEmbeddedByDashboardId(ctx context.Context, dashboardId string) error
Read a published dashboard in an embedded ui.
Get the current published dashboard within an embedded context.
func (*LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfo ¶ added in v0.63.0
func (a *LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfo(ctx context.Context, request GetPublishedDashboardTokenInfoRequest) (*GetPublishedDashboardTokenInfoResponse, error)
func (*LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfoByDashboardId ¶ added in v0.63.0
func (a *LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfoByDashboardId(ctx context.Context, dashboardId string) (*GetPublishedDashboardTokenInfoResponse, error)
Read an information of a published dashboard to mint an OAuth token.
Get a required authorization details and scopes of a published dashboard to mint an OAuth token. The `authorization_details` can be enriched to apply additional restriction.
Example: Adding the following `authorization_details` object to downscope the viewer permission to specific table ``` { type: "unity_catalog_privileges", privileges: ["SELECT"], object_type: "TABLE", object_full_path: "main.default.testdata" } ```
type LakeviewEmbeddedInterface ¶ added in v0.57.0
type LakeviewEmbeddedInterface interface { // Read a published dashboard in an embedded ui. // // Get the current published dashboard within an embedded context. GetPublishedDashboardEmbedded(ctx context.Context, request GetPublishedDashboardEmbeddedRequest) error // Read a published dashboard in an embedded ui. // // Get the current published dashboard within an embedded context. GetPublishedDashboardEmbeddedByDashboardId(ctx context.Context, dashboardId string) error // Read an information of a published dashboard to mint an OAuth token. // // Get a required authorization details and scopes of a published dashboard to // mint an OAuth token. The `authorization_details` can be enriched to apply // additional restriction. // // Example: Adding the following `authorization_details` object to downscope the // viewer permission to specific table “` { type: "unity_catalog_privileges", // privileges: ["SELECT"], object_type: "TABLE", object_full_path: // "main.default.testdata" } “` GetPublishedDashboardTokenInfo(ctx context.Context, request GetPublishedDashboardTokenInfoRequest) (*GetPublishedDashboardTokenInfoResponse, error) // Read an information of a published dashboard to mint an OAuth token. // // Get a required authorization details and scopes of a published dashboard to // mint an OAuth token. The `authorization_details` can be enriched to apply // additional restriction. // // Example: Adding the following `authorization_details` object to downscope the // viewer permission to specific table “` { type: "unity_catalog_privileges", // privileges: ["SELECT"], object_type: "TABLE", object_full_path: // "main.default.testdata" } “` GetPublishedDashboardTokenInfoByDashboardId(ctx context.Context, dashboardId string) (*GetPublishedDashboardTokenInfoResponse, error) }
type LakeviewEmbeddedService ¶ added in v0.57.0
type LakeviewEmbeddedService interface { // Read a published dashboard in an embedded ui. // // Get the current published dashboard within an embedded context. GetPublishedDashboardEmbedded(ctx context.Context, request GetPublishedDashboardEmbeddedRequest) error // Read an information of a published dashboard to mint an OAuth token. // // Get a required authorization details and scopes of a published dashboard // to mint an OAuth token. The `authorization_details` can be enriched to // apply additional restriction. // // Example: Adding the following `authorization_details` object to downscope // the viewer permission to specific table “` { type: // "unity_catalog_privileges", privileges: ["SELECT"], object_type: "TABLE", // object_full_path: "main.default.testdata" } “` GetPublishedDashboardTokenInfo(ctx context.Context, request GetPublishedDashboardTokenInfoRequest) (*GetPublishedDashboardTokenInfoResponse, error) }
Token-based Lakeview APIs for embedding dashboards in external applications.
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:"-" url:"-"` }
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:"-" url:"-"` }
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 schedules 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:"-" url:"-"` }
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:"-" url:"-"` }
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 which the subscriptions 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 which the subscriptions belongs. ScheduleId string `json:"-" url:"-"` ForceSendFields []string `json:"-" url:"-"` }
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:"-" url:"-"` }
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:"-" url:"-"` }
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 MessageErrorTypeCouldNotGetModelDeploymentsException MessageErrorType = `COULD_NOT_GET_MODEL_DEPLOYMENTS_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 MessageErrorTypeFunctionArgumentsInvalidTypeException MessageErrorType = `FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION`
const MessageErrorTypeFunctionCallMissingParameterException MessageErrorType = `FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION`
const MessageErrorTypeFunctionsNotAvailableException MessageErrorType = `FUNCTIONS_NOT_AVAILABLE_EXCEPTION`
const MessageErrorTypeGeneratedSqlQueryTooLongException MessageErrorType = `GENERATED_SQL_QUERY_TOO_LONG_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 MessageErrorTypeMessageCancelledWhileExecutingException MessageErrorType = `MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION`
const MessageErrorTypeMessageDeletedWhileExecutingException MessageErrorType = `MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION`
const MessageErrorTypeMessageUpdatedWhileExecutingException MessageErrorType = `MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION`
const MessageErrorTypeMissingSqlQueryException MessageErrorType = `MISSING_SQL_QUERY_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 MessageErrorTypeStopProcessDueToAutoRegenerate MessageErrorType = `STOP_PROCESS_DUE_TO_AUTO_REGENERATE`
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
MessageStatus. 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 user's question. * `PENDING_WAREHOUSE`: Waiting for warehouse before the SQL query can start executing. * `EXECUTING_QUERY`: Executing a generated SQL query. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API. * `FAILED`: The response generation or query execution failed. See `error` field. * `COMPLETED`: Message processing is completed. Results are in the `attachments` field. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API. * `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: SQL result is not available anymore. The user needs to rerun the query. Rerun the SQL query result by calling [executeMessageAttachmentQuery](:method:genie/executeMessageAttachmentQuery) API. * `CANCELLED`: Message has been cancelled.
const MessageStatusAskingAi MessageStatus = `ASKING_AI`
Waiting for the LLM to respond to the user's 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 [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API.
const MessageStatusExecutingQuery MessageStatus = `EXECUTING_QUERY`
Executing a generated SQL query. Get the SQL query result by calling [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API.
const MessageStatusFailed MessageStatus = `FAILED`
The response generation or query execution failed. 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 MessageStatusPendingWarehouse MessageStatus = `PENDING_WAREHOUSE`
Waiting for warehouse before the SQL query can start executing.
const MessageStatusQueryResultExpired MessageStatus = `QUERY_RESULT_EXPIRED`
SQL result is not available anymore. The user needs to rerun the query. Rerun the SQL query result by calling [executeMessageAttachmentQuery](:method:genie/executeMessageAttachmentQuery) API.
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"` // Flag to indicate if mustache parameter syntax ({{ param }}) should be // auto-updated to named syntax (:param) when converting datasets in the // dashboard. UpdateParameterSyntax bool `json:"update_parameter_syntax,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
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 PendingStatus ¶ added in v0.57.0
type PendingStatus struct { // The token to poll for result asynchronously Example: // EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ DataToken string `json:"data_token"` }
type PollPublishedQueryStatusRequest ¶ added in v0.57.0
type PollPublishedQueryStatusRequest struct { DashboardName string `json:"-" url:"dashboard_name"` DashboardRevisionId string `json:"-" url:"dashboard_revision_id"` // Example: // EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ Tokens []string `json:"-" url:"tokens,omitempty"` }
Poll the results for the a query for a published, embedded dashboard
type PollQueryStatusResponse ¶ added in v0.57.0
type PollQueryStatusResponse struct {
Data []PollQueryStatusResponseData `json:"data,omitempty"`
}
type PollQueryStatusResponseData ¶ added in v0.57.0
type PollQueryStatusResponseData struct {
Status QueryResponseStatus `json:"status"`
}
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:"-" url:"-"` }
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:"-" url:"-"` }
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 QueryExecutionAPI ¶ added in v0.57.0
type QueryExecutionAPI struct {
// contains filtered or unexported fields
}
Query execution APIs for AI / BI Dashboards
func NewQueryExecution ¶ added in v0.57.0
func NewQueryExecution(client *client.DatabricksClient) *QueryExecutionAPI
func (*QueryExecutionAPI) CancelPublishedQueryExecution ¶ added in v0.57.0
func (a *QueryExecutionAPI) CancelPublishedQueryExecution(ctx context.Context, request CancelPublishedQueryExecutionRequest) (*CancelQueryExecutionResponse, error)
func (*QueryExecutionAPI) ExecutePublishedDashboardQuery ¶ added in v0.57.0
func (a *QueryExecutionAPI) ExecutePublishedDashboardQuery(ctx context.Context, request ExecutePublishedDashboardQueryRequest) error
func (*QueryExecutionAPI) PollPublishedQueryStatus ¶ added in v0.57.0
func (a *QueryExecutionAPI) PollPublishedQueryStatus(ctx context.Context, request PollPublishedQueryStatusRequest) (*PollQueryStatusResponse, error)
type QueryExecutionInterface ¶ added in v0.57.0
type QueryExecutionInterface interface { // Cancel the results for the a query for a published, embedded dashboard. CancelPublishedQueryExecution(ctx context.Context, request CancelPublishedQueryExecutionRequest) (*CancelQueryExecutionResponse, error) // Execute a query for a published dashboard. ExecutePublishedDashboardQuery(ctx context.Context, request ExecutePublishedDashboardQueryRequest) error // Poll the results for the a query for a published, embedded dashboard. PollPublishedQueryStatus(ctx context.Context, request PollPublishedQueryStatusRequest) (*PollQueryStatusResponse, error) }
type QueryExecutionService ¶ added in v0.57.0
type QueryExecutionService interface { // Cancel the results for the a query for a published, embedded dashboard. CancelPublishedQueryExecution(ctx context.Context, request CancelPublishedQueryExecutionRequest) (*CancelQueryExecutionResponse, error) // Execute a query for a published dashboard. ExecutePublishedDashboardQuery(ctx context.Context, request ExecutePublishedDashboardQueryRequest) error // Poll the results for the a query for a published, embedded dashboard. PollPublishedQueryStatus(ctx context.Context, request PollPublishedQueryStatusRequest) (*PollQueryStatusResponse, error) }
Query execution APIs for AI / BI Dashboards
type QueryResponseStatus ¶ added in v0.57.0
type QueryResponseStatus struct { // Represents an empty message, similar to google.protobuf.Empty, which is // not available in the firm right now. Canceled *Empty `json:"canceled,omitempty"` // Represents an empty message, similar to google.protobuf.Empty, which is // not available in the firm right now. Closed *Empty `json:"closed,omitempty"` Pending *PendingStatus `json:"pending,omitempty"` // The statement id in format(01eef5da-c56e-1f36-bafa-21906587d6ba) The // statement_id should be identical to data_token in SuccessStatus and // PendingStatus. This field is created for audit logging purpose to record // the statement_id of all QueryResponseStatus. StatementId string `json:"statement_id,omitempty"` Success *SuccessStatus `json:"success,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
func (QueryResponseStatus) MarshalJSON ¶ added in v0.57.0
func (s QueryResponseStatus) MarshalJSON() ([]byte, error)
func (*QueryResponseStatus) UnmarshalJSON ¶ added in v0.57.0
func (s *QueryResponseStatus) 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:"-" url:"-"` }
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:"-" url:"-"` }
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:"-" url:"-"` }
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 SuccessStatus ¶ added in v0.57.0
type SuccessStatus struct { // The token to poll for result asynchronously Example: // EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ DataToken string `json:"data_token"` // Whether the query result is truncated (either by byte limit or row limit) Truncated bool `json:"truncated,omitempty"` ForceSendFields []string `json:"-" url:"-"` }
func (SuccessStatus) MarshalJSON ¶ added in v0.57.0
func (s SuccessStatus) MarshalJSON() ([]byte, error)
func (*SuccessStatus) UnmarshalJSON ¶ added in v0.57.0
func (s *SuccessStatus) UnmarshalJSON(b []byte) error
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:"-" url:"-"` }
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 published dashboard. 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"` // 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"` // 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.