Documentation
¶
Overview ¶
These APIs allow you to manage Genie, Lakeview, Lakeview Embedded, etc.
Index ¶
- type AuthorizationDetails
- type AuthorizationDetailsGrantRule
- type CreateDashboardRequest
- type CreateScheduleRequest
- type CreateSubscriptionRequest
- type CronSchedule
- type Dashboard
- type DashboardView
- type DeleteScheduleRequest
- type DeleteSubscriptionRequest
- type DownloadMessageAttachmentVisualizationRequest
- type DownloadMessageAttachmentVisualizationResponse
- type EvaluationStatusType
- 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) CreateMessageComment(ctx context.Context, request GenieCreateMessageCommentRequest) (*GenieMessageComment, error)
- func (a *GenieAPI) CreateSpace(ctx context.Context, request GenieCreateSpaceRequest) (*GenieSpace, error)
- func (a *GenieAPI) DeleteConversation(ctx context.Context, request GenieDeleteConversationRequest) error
- func (a *GenieAPI) DeleteConversationBySpaceIdAndConversationId(ctx context.Context, spaceId string, conversationId string) error
- func (a *GenieAPI) DeleteConversationMessage(ctx context.Context, request GenieDeleteConversationMessageRequest) error
- func (a *GenieAPI) DownloadMessageAttachmentVisualization(ctx context.Context, request DownloadMessageAttachmentVisualizationRequest) (*DownloadMessageAttachmentVisualizationResponse, error)
- 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) GenieCancelResponse(ctx context.Context, request GenieCancelResponseRequest) (*GenieMessage, error)
- func (a *GenieAPI) GenieCreateEvalRun(ctx context.Context, request GenieCreateEvalRunRequest) (*GenieEvalRunResponse, error)
- func (a *GenieAPI) GenieGetEvalResultDetails(ctx context.Context, request GenieGetEvalResultDetailsRequest) (*GenieEvalResultDetails, error)
- func (a *GenieAPI) GenieGetEvalRun(ctx context.Context, request GenieGetEvalRunRequest) (*GenieEvalRunResponse, error)
- func (a *GenieAPI) GenieListEvalResults(ctx context.Context, request GenieListEvalResultsRequest) (*GenieListEvalResultsResponse, error)
- func (a *GenieAPI) GenieListEvalRuns(ctx context.Context, request GenieListEvalRunsRequest) (*GenieListEvalRunsResponse, 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) ListConversationComments(ctx context.Context, request GenieListConversationCommentsRequest) (*GenieListConversationCommentsResponse, error)
- func (a *GenieAPI) ListConversationMessages(ctx context.Context, request GenieListConversationMessagesRequest) (*GenieListConversationMessagesResponse, error)
- func (a *GenieAPI) ListConversations(ctx context.Context, request GenieListConversationsRequest) (*GenieListConversationsResponse, error)
- func (a *GenieAPI) ListConversationsBySpaceId(ctx context.Context, spaceId string) (*GenieListConversationsResponse, error)
- func (a *GenieAPI) ListMessageComments(ctx context.Context, request GenieListMessageCommentsRequest) (*GenieListMessageCommentsResponse, error)
- func (a *GenieAPI) ListSpaces(ctx context.Context, request GenieListSpacesRequest) (*GenieListSpacesResponse, error)
- func (a *GenieAPI) SendMessageFeedback(ctx context.Context, request GenieSendMessageFeedbackRequest) error
- func (a *GenieAPI) StartConversation(ctx context.Context, ...) (*WaitGetMessageGenieCompleted[GenieStartConversationResponse], error)
- func (a *GenieAPI) StartConversationAndWait(ctx context.Context, ...) (*GenieMessage, error)deprecated
- func (a *GenieAPI) TrashSpace(ctx context.Context, request GenieTrashSpaceRequest) error
- func (a *GenieAPI) TrashSpaceBySpaceId(ctx context.Context, spaceId string) error
- func (a *GenieAPI) UpdateSpace(ctx context.Context, request GenieUpdateSpaceRequest) (*GenieSpace, error)
- func (a *GenieAPI) WaitGetMessageGenieCompleted(ctx context.Context, conversationId string, messageId string, spaceId string, ...) (*GenieMessage, error)
- type GenieAttachment
- type GenieCancelResponseRequest
- type GenieConversation
- type GenieConversationSummary
- type GenieConversationType
- type GenieCreateConversationMessageRequest
- type GenieCreateEvalRunRequest
- type GenieCreateMessageCommentRequest
- type GenieCreateSpaceRequest
- type GenieDeleteConversationMessageRequest
- type GenieDeleteConversationRequest
- type GenieEvalAssessment
- type GenieEvalResponse
- type GenieEvalResponseType
- type GenieEvalResult
- type GenieEvalResultDetails
- type GenieEvalRunResponse
- type GenieExecuteMessageAttachmentQueryRequest
- type GenieExecuteMessageQueryRequest
- type GenieFeedback
- type GenieFeedbackRating
- type GenieGenerateDownloadFullQueryResultRequest
- type GenieGenerateDownloadFullQueryResultResponse
- type GenieGetConversationMessageRequest
- type GenieGetDownloadFullQueryResultRequest
- type GenieGetDownloadFullQueryResultResponse
- type GenieGetEvalResultDetailsRequest
- type GenieGetEvalRunRequest
- type GenieGetMessageAttachmentQueryResultRequest
- type GenieGetMessageQueryResultRequest
- type GenieGetMessageQueryResultResponse
- type GenieGetQueryResultByAttachmentRequest
- type GenieGetSpaceRequest
- type GenieInterface
- type GenieListConversationCommentsRequest
- type GenieListConversationCommentsResponse
- type GenieListConversationMessagesRequest
- type GenieListConversationMessagesResponse
- type GenieListConversationsRequest
- type GenieListConversationsResponse
- type GenieListEvalResultsRequest
- type GenieListEvalResultsResponse
- type GenieListEvalRunsRequest
- type GenieListEvalRunsResponse
- type GenieListMessageCommentsRequest
- type GenieListMessageCommentsResponse
- type GenieListSpacesRequest
- type GenieListSpacesResponse
- type GenieMessage
- type GenieMessageComment
- type GenieQueryAttachment
- type GenieResultMetadata
- type GenieSendMessageFeedbackRequest
- type GenieServicedeprecated
- type GenieSpace
- type GenieStartConversationMessageRequest
- type GenieStartConversationResponse
- type GenieSuggestedQuestionsAttachment
- type GenieTrashSpaceRequest
- type GenieUpdateSpaceRequest
- type GenieVizAttachment
- type GetDashboardRequest
- 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) Revert(ctx context.Context, request RevertDashboardRequest) (*RevertDashboardResponse, 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) GetPublishedDashboardTokenInfo(ctx context.Context, request GetPublishedDashboardTokenInfoRequest) (*GetPublishedDashboardTokenInfoResponse, error)
- func (a *LakeviewEmbeddedAPI) GetPublishedDashboardTokenInfoByDashboardId(ctx context.Context, dashboardId string) (*GetPublishedDashboardTokenInfoResponse, error)
- type LakeviewEmbeddedInterface
- type LakeviewEmbeddedServicedeprecated
- type LakeviewInterface
- type LakeviewServicedeprecated
- type LifecycleState
- type ListDashboardsRequest
- type ListDashboardsResponse
- type ListSchedulesRequest
- type ListSchedulesResponse
- type ListSubscriptionsRequest
- type ListSubscriptionsResponse
- type MessageError
- type MessageErrorType
- type MessageStatus
- type MigrateDashboardRequest
- type PublishRequest
- type PublishedDashboard
- type QueryAttachmentParameter
- type Result
- type RevertDashboardRequest
- type RevertDashboardResponse
- type Schedule
- type SchedulePauseStatus
- type ScoreReason
- type Subscriber
- type Subscription
- type SubscriptionSubscriberDestination
- type SubscriptionSubscriberUser
- type TextAttachment
- type TextAttachmentPurpose
- type Thought
- type ThoughtType
- type TrashDashboardRequest
- type UnpublishDashboardRequest
- 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 the `workspace_rule_set` constraint.
GrantRules []AuthorizationDetailsGrantRule `json:"grant_rules,omitempty"`
// The legacy ACL path of the workspace object that the rule applies to.
ResourceLegacyAclPath string `json:"resource_legacy_acl_path,omitempty"`
// The resource name to which the authorization rule applies. This field is
// specific to the `workspace_rule_set` constraint. Format:
// `workspaces/{workspace_id}` for a workspace-level rule, or
// `workspaces/{workspace_id}/dashboards/{dashboard_id}` for a rule on a
// dashboard.
ResourceName string `json:"resource_name,omitempty"`
// The type of authorization downscoping policy. A `workspace_rule_set`
// policy 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 {
// The permission set that the rule grants on the resource.
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 CreateDashboardRequest ¶ added in v0.35.0
type CreateDashboardRequest struct {
Dashboard Dashboard `json:"dashboard"`
// Sets the default catalog for all datasets in this dashboard. Does not
// impact table references that use fully qualified catalog names (ex:
// samples.nyctaxi.trips). Leave blank to keep each dataset’s existing
// configuration.
DatasetCatalog string `json:"-" url:"dataset_catalog,omitempty"`
// Sets the default schema for all datasets in this dashboard. Does not
// impact table references that use fully qualified schema names (ex:
// nyctaxi.trips). Leave blank to keep each dataset’s existing
// configuration.
DatasetSchema string `json:"-" url:"dataset_schema,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateDashboardRequest) MarshalJSON ¶ added in v0.35.0
func (s CreateDashboardRequest) MarshalJSON() ([]byte, error)
func (*CreateDashboardRequest) UnmarshalJSON ¶ added in v0.35.0
func (s *CreateDashboardRequest) UnmarshalJSON(b []byte) error
type CreateScheduleRequest ¶ added in v0.43.0
type CreateScheduleRequest struct {
// UUID identifying the dashboard to which the schedule belongs.
DashboardId string `json:"-" url:"-"`
// The schedule to create. A dashboard is limited to 10 schedules.
Schedule Schedule `json:"schedule"`
}
func (*CreateScheduleRequest) UnmarshalJSON ¶ added in v0.43.0
func (s *CreateScheduleRequest) UnmarshalJSON(b []byte) error
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:"-"`
// The subscription to create. A schedule is limited to 100 subscriptions.
Subscription Subscription `json:"subscription"`
}
func (*CreateSubscriptionRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *CreateSubscriptionRequest) UnmarshalJSON(b []byte) error
type CronSchedule ¶ added in v0.43.0
type CronSchedule struct {
// A cron expression in Quartz syntax that defines when the schedule runs.
// See the [Quartz cron trigger tutorial] for the syntax.
//
// [Quartz cron trigger tutorial]: https://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"`
}
func (*CronSchedule) UnmarshalJSON ¶ added in v0.73.0
func (s *CronSchedule) UnmarshalJSON(b []byte) error
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. It is also the file name of the
// dashboard asset in the workspace, so it must be unique within the parent
// folder, cannot contain `/`, and cannot end with `.json`, `.lvdash` or
// `.yml`. The display name must not exceed 500 characters.
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. The folder must already exist; when
// omitted on create, the dashboard is created in the caller's home folder.
// 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 dashboard definition (datasets, pages and widgets) as a JSON string,
// in the same format as a dashboard file exported from the workspace
// (`.lvdash.json`). When omitted on create, an empty dashboard is created;
// when omitted on update, the existing definition is kept and only the
// other fields change. Use the [get dashboard API] on an existing dashboard
// to see a complete example. This field is excluded in List Dashboards
// responses.
//
// [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
func (*DashboardView) Values ¶ added in v0.72.0
func (f *DashboardView) Values() []DashboardView
Values returns all possible values for DashboardView.
There is no guarantee on the order of the values in the slice.
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:"-"`
}
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 DeleteSubscriptionRequest ¶ added in v0.43.0
type DeleteSubscriptionRequest struct {
// UUID identifying the dashboard to which the subscription belongs.
DashboardId string `json:"-" url:"-"`
// The etag of the subscription, as returned when it was read. If it is
// provided and no longer matches, the request fails with ABORTED and the
// subscription is not deleted.
Etag string `json:"-" url:"etag,omitempty"`
// UUID identifying the schedule to which the subscription belongs.
ScheduleId string `json:"-" url:"-"`
// UUID identifying the subscription.
SubscriptionId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
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 DownloadMessageAttachmentVisualizationRequest ¶ added in v0.152.0
type DownloadMessageAttachmentVisualizationRequest struct {
// The resource name of the attachment to render, in the format
// `spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}/attachments/{attachment_id}`.
Name string `json:"-" url:"-"`
}
func (*DownloadMessageAttachmentVisualizationRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *DownloadMessageAttachmentVisualizationRequest) UnmarshalJSON(b []byte) error
type DownloadMessageAttachmentVisualizationResponse ¶ added in v0.152.0
type DownloadMessageAttachmentVisualizationResponse struct {
Contents io.ReadCloser `json:"-"`
}
func (*DownloadMessageAttachmentVisualizationResponse) UnmarshalJSON ¶ added in v0.174.0
func (s *DownloadMessageAttachmentVisualizationResponse) UnmarshalJSON(b []byte) error
type EvaluationStatusType ¶ added in v0.119.0
type EvaluationStatusType string
const EvaluationStatusTypeDone EvaluationStatusType = `DONE`
const EvaluationStatusTypeEvaluationCancelled EvaluationStatusType = `EVALUATION_CANCELLED`
const EvaluationStatusTypeEvaluationFailed EvaluationStatusType = `EVALUATION_FAILED`
const EvaluationStatusTypeEvaluationTimeout EvaluationStatusType = `EVALUATION_TIMEOUT`
const EvaluationStatusTypeNotStarted EvaluationStatusType = `NOT_STARTED`
const EvaluationStatusTypeRunning EvaluationStatusType = `RUNNING`
func (*EvaluationStatusType) Set ¶ added in v0.119.0
func (f *EvaluationStatusType) Set(v string) error
Set raw string value and validate it against allowed values
func (*EvaluationStatusType) String ¶ added in v0.119.0
func (f *EvaluationStatusType) String() string
String representation for fmt.Print
func (*EvaluationStatusType) Type ¶ added in v0.119.0
func (f *EvaluationStatusType) Type() string
Type always returns EvaluationStatusType to satisfy [pflag.Value] interface
func (*EvaluationStatusType) Values ¶ added in v0.119.0
func (f *EvaluationStatusType) Values() []EvaluationStatusType
Values returns all possible values for EvaluationStatusType.
There is no guarantee on the order of the values in the slice.
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)
Sends a new message in a chat-mode [conversation](:method:genie/startconversation). The AI response uses all previously created messages in the conversation to respond. The message is processed asynchronously. Poll [Get a conversation message](:method:genie/getmessage) until its `status` is `COMPLETED`, `FAILED`, or `CANCELLED`.
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) CreateMessageComment ¶ added in v0.127.0
func (a *GenieAPI) CreateMessageComment(ctx context.Context, request GenieCreateMessageCommentRequest) (*GenieMessageComment, error)
func (*GenieAPI) CreateSpace ¶ added in v0.92.0
func (a *GenieAPI) CreateSpace(ctx context.Context, request GenieCreateSpaceRequest) (*GenieSpace, error)
func (*GenieAPI) DeleteConversation ¶ added in v0.74.0
func (a *GenieAPI) DeleteConversation(ctx context.Context, request GenieDeleteConversationRequest) error
func (*GenieAPI) DeleteConversationBySpaceIdAndConversationId ¶ added in v0.74.0
func (a *GenieAPI) DeleteConversationBySpaceIdAndConversationId(ctx context.Context, spaceId string, conversationId string) error
Deletes a conversation and all of its messages. Users can delete their own conversations. Deleting another user's conversation requires at least CAN MANAGE permission on the space.
func (*GenieAPI) DeleteConversationMessage ¶ added in v0.81.0
func (a *GenieAPI) DeleteConversationMessage(ctx context.Context, request GenieDeleteConversationMessageRequest) error
func (*GenieAPI) DownloadMessageAttachmentVisualization ¶ added in v0.152.0
func (a *GenieAPI) DownloadMessageAttachmentVisualization(ctx context.Context, request DownloadMessageAttachmentVisualizationRequest) (*DownloadMessageAttachmentVisualizationResponse, error)
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) GenieCancelResponse ¶ added in v0.177.0
func (a *GenieAPI) GenieCancelResponse(ctx context.Context, request GenieCancelResponseRequest) (*GenieMessage, error)
func (*GenieAPI) GenieCreateEvalRun ¶ added in v0.119.0
func (a *GenieAPI) GenieCreateEvalRun(ctx context.Context, request GenieCreateEvalRunRequest) (*GenieEvalRunResponse, error)
func (*GenieAPI) GenieGetEvalResultDetails ¶ added in v0.119.0
func (a *GenieAPI) GenieGetEvalResultDetails(ctx context.Context, request GenieGetEvalResultDetailsRequest) (*GenieEvalResultDetails, error)
func (*GenieAPI) GenieGetEvalRun ¶ added in v0.119.0
func (a *GenieAPI) GenieGetEvalRun(ctx context.Context, request GenieGetEvalRunRequest) (*GenieEvalRunResponse, error)
func (*GenieAPI) GenieListEvalResults ¶ added in v0.119.0
func (a *GenieAPI) GenieListEvalResults(ctx context.Context, request GenieListEvalResultsRequest) (*GenieListEvalResultsResponse, error)
func (*GenieAPI) GenieListEvalRuns ¶ added in v0.119.0
func (a *GenieAPI) GenieListEvalRuns(ctx context.Context, request GenieListEvalRunsRequest) (*GenieListEvalRunsResponse, 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)
After [Generating a Full Query Result Download](:method:genie/generatedownloadfullqueryresult) and successfully receiving a `download_id` and `download_id_signature`, use this API to poll the download progress. Both `download_id` and `download_id_signature` are required to call this endpoint. When the download is complete, the API returns the result in the `EXTERNAL_LINKS` disposition, containing 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.**
When you use the `EXTERNAL_LINKS` disposition, a short-lived cloud-storage URL is generated to download the results. The URL contains temporary access credentials, so protect it and do not set an `Authorization` header in the download request.
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)
Gets the result of the SQL query in a message's query attachment. The result is available only while 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)
Gets a message from a chat-mode or agent-mode conversation. For a complete agent-mode transcript, use the List conversation items endpoint.
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: Use [Get Message Attachment Query Result](:method:genie/getmessageattachmentqueryresult) instead.
func (*GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId ¶ added in v0.44.0
func (a *GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieGetMessageQueryResultResponse, error)
DEPRECATED: Use [Get Message Attachment Query Result](:method:genie/getmessageattachmentqueryresult) instead.
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 details of a Genie Space.
func (*GenieAPI) ListConversationComments ¶ added in v0.127.0
func (a *GenieAPI) ListConversationComments(ctx context.Context, request GenieListConversationCommentsRequest) (*GenieListConversationCommentsResponse, error)
func (*GenieAPI) ListConversationMessages ¶ added in v0.81.0
func (a *GenieAPI) ListConversationMessages(ctx context.Context, request GenieListConversationMessagesRequest) (*GenieListConversationMessagesResponse, error)
func (*GenieAPI) ListConversations ¶ added in v0.74.0
func (a *GenieAPI) ListConversations(ctx context.Context, request GenieListConversationsRequest) (*GenieListConversationsResponse, error)
func (*GenieAPI) ListConversationsBySpaceId ¶ added in v0.74.0
func (a *GenieAPI) ListConversationsBySpaceId(ctx context.Context, spaceId string) (*GenieListConversationsResponse, error)
Lists the conversations in a Genie space. By default the list contains only the caller's own conversations, ordered by most recent activity. With `include_all`, it contains every user's conversations in the space, ordered by creation time with the newest first.
func (*GenieAPI) ListMessageComments ¶ added in v0.127.0
func (a *GenieAPI) ListMessageComments(ctx context.Context, request GenieListMessageCommentsRequest) (*GenieListMessageCommentsResponse, error)
func (*GenieAPI) ListSpaces ¶ added in v0.72.0
func (a *GenieAPI) ListSpaces(ctx context.Context, request GenieListSpacesRequest) (*GenieListSpacesResponse, error)
func (*GenieAPI) SendMessageFeedback ¶ added in v0.81.0
func (a *GenieAPI) SendMessageFeedback(ctx context.Context, request GenieSendMessageFeedbackRequest) error
func (*GenieAPI) StartConversation ¶ added in v0.44.0
func (a *GenieAPI) StartConversation(ctx context.Context, genieStartConversationMessageRequest GenieStartConversationMessageRequest) (*WaitGetMessageGenieCompleted[GenieStartConversationResponse], error)
Starts a new chat-mode conversation and sends its first message. The message is processed asynchronously. Poll [Get a conversation message](:method:genie/getmessage) until its `status` is `COMPLETED`, `FAILED`, or `CANCELLED`.
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) TrashSpace ¶ added in v0.74.0
func (a *GenieAPI) TrashSpace(ctx context.Context, request GenieTrashSpaceRequest) error
func (*GenieAPI) TrashSpaceBySpaceId ¶ added in v0.74.0
Move a Genie Space to the trash.
func (*GenieAPI) UpdateSpace ¶ added in v0.92.0
func (a *GenieAPI) UpdateSpace(ctx context.Context, request GenieUpdateSpaceRequest) (*GenieSpace, error)
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 {
// The ID of the attachment. The attachment query-result, execute-query,
// download, and visualization endpoints take this ID.
AttachmentId string `json:"attachment_id,omitempty"`
// Query Attachment if Genie responds with a SQL query
Query *GenieQueryAttachment `json:"query,omitempty"`
// Follow-up questions suggested by Genie
SuggestedQuestions *GenieSuggestedQuestionsAttachment `json:"suggested_questions,omitempty"`
// Text Attachment if Genie responds with text This also contains the final
// summary when available.
Text *TextAttachment `json:"text,omitempty"`
// Visualization generated by Genie, if requested via `enable_visualization`
Viz *GenieVizAttachment `json:"viz,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
One part of Genie's response to a message. Exactly one of the attachment fields is set.
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 GenieCancelResponseRequest ¶ added in v0.177.0
type GenieCancelResponseRequest struct {
// The ID of the Genie agent (synonymous with the Genie space ID).
AgentId string `json:"-" url:"-"`
// The ID of the conversation containing the response.
ConversationId string `json:"-" url:"-"`
// The ID of the response to cancel (the id from the `response.created`
// event).
ResponseId string `json:"-" url:"-"`
}
Request to cancel an in-flight agent-mode response.
func (*GenieCancelResponseRequest) UnmarshalJSON ¶ added in v0.177.0
func (s *GenieCancelResponseRequest) UnmarshalJSON(b []byte) error
type GenieConversation ¶ added in v0.44.0
type GenieConversation struct {
// Conversation ID
ConversationId string `json:"conversation_id"`
// Time when the conversation was created, in milliseconds since the Unix
// epoch.
CreatedTimestamp int64 `json:"created_timestamp,omitempty"`
// Conversation ID. Legacy identifier, use conversation_id instead
Id string `json:"id,omitempty"`
// Time when the conversation was last updated, in milliseconds since the
// Unix epoch.
LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"`
// Genie space ID
SpaceId string `json:"space_id"`
// Title of the conversation. Genie sets it to the text of the first
// message, truncated to 255 characters.
Title string `json:"title"`
// ID of the user who created the conversation
UserId int `json:"user_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A Genie conversation. Use chat-mode message endpoints for classic chats and agent-mode response and item endpoints for agent conversations. Conversation management, feedback, comments, and attachment operations support both modes.
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 GenieConversationSummary ¶ added in v0.74.0
type GenieConversationSummary struct {
// Whether this is a classic chat or an agent-mode conversation. Allows
// callers to route message retrieval (chat vs. agent endpoint) without an
// extra lookup.
AgentType GenieConversationType `json:"agent_type,omitempty"`
// The ID of the conversation.
ConversationId string `json:"conversation_id"`
// Time when the conversation was created, in milliseconds since the Unix
// epoch.
CreatedTimestamp int64 `json:"created_timestamp,omitempty"`
// The title of the conversation.
Title string `json:"title,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A summary of a conversation, as returned when listing the conversations in a space.
func (GenieConversationSummary) MarshalJSON ¶ added in v0.112.0
func (s GenieConversationSummary) MarshalJSON() ([]byte, error)
func (*GenieConversationSummary) UnmarshalJSON ¶ added in v0.112.0
func (s *GenieConversationSummary) UnmarshalJSON(b []byte) error
type GenieConversationType ¶ added in v0.173.0
type GenieConversationType string
The type of a Genie conversation. Distinguishes an agent-mode conversation from a classic chat conversation so callers can route message retrieval accordingly without a per-conversation lookup.
const GenieConversationTypeGenieConversationTypeAgent GenieConversationType = `GENIE_CONVERSATION_TYPE_AGENT`
const GenieConversationTypeGenieConversationTypeChat GenieConversationType = `GENIE_CONVERSATION_TYPE_CHAT`
func (*GenieConversationType) Set ¶ added in v0.173.0
func (f *GenieConversationType) Set(v string) error
Set raw string value and validate it against allowed values
func (*GenieConversationType) String ¶ added in v0.173.0
func (f *GenieConversationType) String() string
String representation for fmt.Print
func (*GenieConversationType) Type ¶ added in v0.173.0
func (f *GenieConversationType) Type() string
Type always returns GenieConversationType to satisfy [pflag.Value] interface
func (*GenieConversationType) Values ¶ added in v0.173.0
func (f *GenieConversationType) Values() []GenieConversationType
Values returns all possible values for GenieConversationType.
There is no guarantee on the order of the values in the slice.
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:"-"`
// Enable visualization generation.
EnableVisualization bool `json:"enable_visualization,omitempty"`
// The ID associated with the Genie space where the conversation is started.
SpaceId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieCreateConversationMessageRequest) MarshalJSON ¶ added in v0.73.0
func (s GenieCreateConversationMessageRequest) MarshalJSON() ([]byte, error)
func (*GenieCreateConversationMessageRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieCreateConversationMessageRequest) UnmarshalJSON(b []byte) error
type GenieCreateEvalRunRequest ¶ added in v0.119.0
type GenieCreateEvalRunRequest struct {
// List of benchmark question IDs to evaluate. These questions must exist in
// the specified Genie space. If none are specified, then all benchmark
// questions are evaluated.
BenchmarkQuestionIds []string `json:"benchmark_question_ids,omitempty"`
// The ID associated with the Genie space where the evaluations will be
// executed.
SpaceId string `json:"-" url:"-"`
}
func (*GenieCreateEvalRunRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *GenieCreateEvalRunRequest) UnmarshalJSON(b []byte) error
type GenieCreateMessageCommentRequest ¶ added in v0.127.0
type GenieCreateMessageCommentRequest struct {
// Comment text content.
Content string `json:"content"`
// The ID associated with the conversation.
ConversationId string `json:"-" url:"-"`
// The ID associated with the message.
MessageId string `json:"-" url:"-"`
// The ID associated with the Genie space.
SpaceId string `json:"-" url:"-"`
}
func (*GenieCreateMessageCommentRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *GenieCreateMessageCommentRequest) UnmarshalJSON(b []byte) error
type GenieCreateSpaceRequest ¶ added in v0.92.0
type GenieCreateSpaceRequest struct {
// Description of the space, up to 16384 bytes.
Description string `json:"description,omitempty"`
// Path of the workspace folder in which to create the space.
ParentPath string `json:"parent_path,omitempty"`
// Configuration of the new space as a JSON string. To copy an existing
// space, use the value that [Get Genie Space](:method:genie/getspace)
// returns when `include_serialized_space` is true. For the JSON format and
// its validation rules, see
// https://docs.databricks.com/aws/en/genie-agents/conversation-api.
SerializedSpace string `json:"serialized_space"`
// Display name of the new space. A default name is assigned when omitted.
Title string `json:"title,omitempty"`
// ID of the SQL warehouse that runs the queries Genie generates for the
// space, as a 16-character hexadecimal string.
WarehouseId string `json:"warehouse_id"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieCreateSpaceRequest) MarshalJSON ¶ added in v0.92.0
func (s GenieCreateSpaceRequest) MarshalJSON() ([]byte, error)
func (*GenieCreateSpaceRequest) UnmarshalJSON ¶ added in v0.92.0
func (s *GenieCreateSpaceRequest) UnmarshalJSON(b []byte) error
type GenieDeleteConversationMessageRequest ¶ added in v0.81.0
type GenieDeleteConversationMessageRequest struct {
// The ID associated with the conversation.
ConversationId string `json:"-" url:"-"`
// The ID associated with the message to delete.
MessageId string `json:"-" url:"-"`
// The ID associated with the Genie space where the message is located.
SpaceId string `json:"-" url:"-"`
}
func (*GenieDeleteConversationMessageRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *GenieDeleteConversationMessageRequest) UnmarshalJSON(b []byte) error
type GenieDeleteConversationRequest ¶ added in v0.74.0
type GenieDeleteConversationRequest struct {
// The ID of the conversation to delete.
ConversationId string `json:"-" url:"-"`
// The ID associated with the Genie space where the conversation is located.
SpaceId string `json:"-" url:"-"`
}
func (*GenieDeleteConversationRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *GenieDeleteConversationRequest) UnmarshalJSON(b []byte) error
type GenieEvalAssessment ¶ added in v0.119.0
type GenieEvalAssessment string
const GenieEvalAssessmentBad GenieEvalAssessment = `BAD`
const GenieEvalAssessmentGood GenieEvalAssessment = `GOOD`
const GenieEvalAssessmentNeedsReview GenieEvalAssessment = `NEEDS_REVIEW`
func (*GenieEvalAssessment) Set ¶ added in v0.119.0
func (f *GenieEvalAssessment) Set(v string) error
Set raw string value and validate it against allowed values
func (*GenieEvalAssessment) String ¶ added in v0.119.0
func (f *GenieEvalAssessment) String() string
String representation for fmt.Print
func (*GenieEvalAssessment) Type ¶ added in v0.119.0
func (f *GenieEvalAssessment) Type() string
Type always returns GenieEvalAssessment to satisfy [pflag.Value] interface
func (*GenieEvalAssessment) Values ¶ added in v0.119.0
func (f *GenieEvalAssessment) Values() []GenieEvalAssessment
Values returns all possible values for GenieEvalAssessment.
There is no guarantee on the order of the values in the slice.
type GenieEvalResponse ¶ added in v0.119.0
type GenieEvalResponse struct {
// The response content (either text or SQL query).
Response string `json:"response,omitempty"`
// Type of response
ResponseType GenieEvalResponseType `json:"response_type,omitempty"`
// SQL Statement Execution response.
SqlExecutionResult *sql.StatementResponse `json:"sql_execution_result,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieEvalResponse) MarshalJSON ¶ added in v0.119.0
func (s GenieEvalResponse) MarshalJSON() ([]byte, error)
func (*GenieEvalResponse) UnmarshalJSON ¶ added in v0.119.0
func (s *GenieEvalResponse) UnmarshalJSON(b []byte) error
type GenieEvalResponseType ¶ added in v0.119.0
type GenieEvalResponseType string
const GenieEvalResponseTypeSql GenieEvalResponseType = `SQL`
const GenieEvalResponseTypeText GenieEvalResponseType = `TEXT`
func (*GenieEvalResponseType) Set ¶ added in v0.119.0
func (f *GenieEvalResponseType) Set(v string) error
Set raw string value and validate it against allowed values
func (*GenieEvalResponseType) String ¶ added in v0.119.0
func (f *GenieEvalResponseType) String() string
String representation for fmt.Print
func (*GenieEvalResponseType) Type ¶ added in v0.119.0
func (f *GenieEvalResponseType) Type() string
Type always returns GenieEvalResponseType to satisfy [pflag.Value] interface
func (*GenieEvalResponseType) Values ¶ added in v0.119.0
func (f *GenieEvalResponseType) Values() []GenieEvalResponseType
Values returns all possible values for GenieEvalResponseType.
There is no guarantee on the order of the values in the slice.
type GenieEvalResult ¶ added in v0.119.0
type GenieEvalResult struct {
// Stored snapshot of original benchmark answer text.
BenchmarkAnswer string `json:"benchmark_answer,omitempty"`
// The ID of the benchmark question that was evaluated.
BenchmarkQuestionId string `json:"benchmark_question_id"`
// User ID who created evaluation result.
CreatedByUser int64 `json:"created_by_user,omitempty"`
// Stored snapshot of original benchmark question text.
Question string `json:"question,omitempty"`
// Unique identifier for this evaluation result.
ResultId string `json:"result_id"`
// The ID of the space the evaluation result belongs to.
SpaceId string `json:"space_id"`
// Current status of this evaluation result.
Status EvaluationStatusType `json:"status,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Shows summary information for an evaluation result. For detailed information including SQL execution results, actual/expected responses, and assessment scores, use GenieGetEvalResultDetails.
func (GenieEvalResult) MarshalJSON ¶ added in v0.119.0
func (s GenieEvalResult) MarshalJSON() ([]byte, error)
func (*GenieEvalResult) UnmarshalJSON ¶ added in v0.119.0
func (s *GenieEvalResult) UnmarshalJSON(b []byte) error
type GenieEvalResultDetails ¶ added in v0.119.0
type GenieEvalResultDetails struct {
// The actual response generated by Genie.
ActualResponse []GenieEvalResponse `json:"actual_response,omitempty"`
// Assessment of the evaluation result: good, bad, or needs review
Assessment GenieEvalAssessment `json:"assessment,omitempty"`
// Reasons for the assessment score.
//
// Assessment reasons describe why a Genie response was scored as BAD.
//
// Deterministic values (compared against the ground truth result): -
// EMPTY_RESULT: Genie's generated SQL results were empty for this benchmark
// question. - RESULT_MISSING_ROWS: Genie's generated SQL response is
// missing rows from the provided ground truth SQL. - RESULT_EXTRA_ROWS:
// Genie's generated SQL response has more rows than the provided ground
// truth SQL. - RESULT_MISSING_COLUMNS: Genie's generated SQL response is
// missing columns from the provided ground truth SQL. -
// RESULT_EXTRA_COLUMNS: Genie's generated SQL response has more columns
// than the provided ground truth SQL. - SINGLE_CELL_DIFFERENCE: Single
// value result was produced but differs from ground truth result. -
// EMPTY_GOOD_SQL: The benchmark SQL returned an empty result. -
// COLUMN_TYPE_DIFFERENCE: The values between the results match but the
// column type is different.
//
// LLM judge ratings explain the factors driving BAD results: -
// LLM_JUDGE_MISSING_OR_INCORRECT_FILTER: Genie's generated SQL is missing a
// WHERE clause condition or has incorrect filter logic that
// excludes/includes wrong data. - LLM_JUDGE_INCOMPLETE_OR_PARTIAL_OUTPUT:
// Genie's generated SQL returns only some of the requested data or columns,
// missing parts of what the ground truth SQL returns. -
// LLM_JUDGE_MISINTERPRETATION_OF_USER_REQUEST: Genie's generated SQL
// fundamentally misunderstands what the user is asking for, addressing the
// wrong question or goal. -
// LLM_JUDGE_INSTRUCTION_COMPLIANCE_OR_MISSING_BUSINESS_LOGIC: Genie's
// generated SQL fails to apply specified instructions or business logic
// that should be followed. - LLM_JUDGE_INCORRECT_METRIC_CALCULATION:
// Genie's generated SQL uses incorrect logic or makes wrong assumptions
// when calculating metrics. - LLM_JUDGE_INCORRECT_TABLE_OR_FIELD_USAGE:
// Genie's generated SQL references wrong tables, columns, or uses fields
// that don't match the ground truth SQL's intent. -
// LLM_JUDGE_INCORRECT_FUNCTION_USAGE: Genie's generated SQL uses SQL
// functions incorrectly or inappropriately (wrong parameters, wrong
// function for the task, etc.). - LLM_JUDGE_MISSING_OR_INCORRECT_JOIN:
// Genie's generated SQL is missing necessary joins between tables or has
// incorrect join conditions/types that produce wrong results. -
// LLM_JUDGE_MISSING_OR_INCORRECT_AGGREGATION: Genie's generated SQL is
// missing GROUP BY clauses or has incorrect grouping that doesn't match the
// requested aggregation level. - LLM_JUDGE_FORMATTING_ERROR: Genie's
// generated SQL output has incorrect formatting, ordering (ORDER BY), or
// presentation issues that don't match expectations. - LLM_JUDGE_OTHER: LLM
// judge identified an error that doesn't fall into other categories.
//
// Deprecated LLM judge values (kept for backward compatibility, do not
// use): - LLM_JUDGE_MISSING_JOIN (deprecated) - LLM_JUDGE_WRONG_FILTER
// (deprecated) - LLM_JUDGE_WRONG_AGGREGATION (deprecated) -
// LLM_JUDGE_WRONG_COLUMNS (deprecated) - LLM_JUDGE_SYNTAX_ERROR
// (deprecated) - LLM_JUDGE_SEMANTIC_ERROR (deprecated)
AssessmentReasons []ScoreReason `json:"assessment_reasons,omitempty"`
// The ID of the benchmark question that was evaluated.
BenchmarkQuestionId string `json:"benchmark_question_id"`
// Current status of the evaluation run.
EvalRunStatus EvaluationStatusType `json:"eval_run_status,omitempty"`
// The expected responses from the benchmark.
ExpectedResponse []GenieEvalResponse `json:"expected_response,omitempty"`
// Whether this evaluation was manually assessed.
ManualAssessment bool `json:"manual_assessment,omitempty"`
// The unique identifier for the evaluation result.
ResultId string `json:"result_id"`
// The ID of the space the evaluation result belongs to.
SpaceId string `json:"space_id"`
ForceSendFields []string `json:"-" url:"-"`
}
Shows detailed information for an evaluation result.
func (GenieEvalResultDetails) MarshalJSON ¶ added in v0.119.0
func (s GenieEvalResultDetails) MarshalJSON() ([]byte, error)
func (*GenieEvalResultDetails) UnmarshalJSON ¶ added in v0.119.0
func (s *GenieEvalResultDetails) UnmarshalJSON(b []byte) error
type GenieEvalRunResponse ¶ added in v0.119.0
type GenieEvalRunResponse struct {
// Timestamp when the evaluation run was created (milliseconds since epoch).
CreatedTimestamp int64 `json:"created_timestamp,omitempty"`
// The unique identifier for the evaluation run.
EvalRunId string `json:"eval_run_id"`
// Current status of the evaluation run.
EvalRunStatus EvaluationStatusType `json:"eval_run_status,omitempty"`
// Timestamp when the evaluation run was last updated (milliseconds since
// epoch).
LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"`
// Number of questions answered correctly.
NumCorrect int64 `json:"num_correct,omitempty"`
// Number of questions that have been completed.
NumDone int64 `json:"num_done,omitempty"`
// Number of questions that need manual review.
NumNeedsReview int64 `json:"num_needs_review,omitempty"`
// Total number of questions in the evaluation run.
NumQuestions int64 `json:"num_questions,omitempty"`
// User ID who initiated the evaluation run.
RunByUser int64 `json:"run_by_user,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A benchmark evaluation run. The public benchmark API currently evaluates chat-mode responses.
func (GenieEvalRunResponse) MarshalJSON ¶ added in v0.119.0
func (s GenieEvalRunResponse) MarshalJSON() ([]byte, error)
func (*GenieEvalRunResponse) UnmarshalJSON ¶ added in v0.119.0
func (s *GenieEvalRunResponse) UnmarshalJSON(b []byte) error
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:"-"`
}
func (*GenieExecuteMessageAttachmentQueryRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieExecuteMessageAttachmentQueryRequest) UnmarshalJSON(b []byte) error
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:"-"`
}
func (*GenieExecuteMessageQueryRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieExecuteMessageQueryRequest) UnmarshalJSON(b []byte) error
type GenieFeedback ¶ added in v0.83.0
type GenieFeedback struct {
// Optional feedback comment text
Comment string `json:"comment,omitempty"`
// The feedback rating
Rating GenieFeedbackRating `json:"rating,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Feedback containing rating and optional comment
func (GenieFeedback) MarshalJSON ¶ added in v0.83.0
func (s GenieFeedback) MarshalJSON() ([]byte, error)
func (*GenieFeedback) UnmarshalJSON ¶ added in v0.83.0
func (s *GenieFeedback) UnmarshalJSON(b []byte) error
type GenieFeedbackRating ¶ added in v0.81.0
type GenieFeedbackRating string
Feedback rating for Genie messages
const GenieFeedbackRatingNegative GenieFeedbackRating = `NEGATIVE`
const GenieFeedbackRatingNone GenieFeedbackRating = `NONE`
const GenieFeedbackRatingPositive GenieFeedbackRating = `POSITIVE`
func (*GenieFeedbackRating) Set ¶ added in v0.81.0
func (f *GenieFeedbackRating) Set(v string) error
Set raw string value and validate it against allowed values
func (*GenieFeedbackRating) String ¶ added in v0.81.0
func (f *GenieFeedbackRating) String() string
String representation for fmt.Print
func (*GenieFeedbackRating) Type ¶ added in v0.81.0
func (f *GenieFeedbackRating) Type() string
Type always returns GenieFeedbackRating to satisfy [pflag.Value] interface
func (*GenieFeedbackRating) Values ¶ added in v0.81.0
func (f *GenieFeedbackRating) Values() []GenieFeedbackRating
Values returns all possible values for GenieFeedbackRating.
There is no guarantee on the order of the values in the slice.
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:"-"`
}
func (*GenieGenerateDownloadFullQueryResultRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieGenerateDownloadFullQueryResultRequest) UnmarshalJSON(b []byte) error
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"`
// JWT signature for the download_id to ensure secure access to query
// results
DownloadIdSignature string `json:"download_id_signature,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:"-"`
}
func (*GenieGetConversationMessageRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieGetConversationMessageRequest) UnmarshalJSON(b []byte) error
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:"-"`
// JWT signature for the download_id to ensure secure access to query
// results
DownloadIdSignature string `json:"-" url:"download_id_signature"`
// Message ID
MessageId string `json:"-" url:"-"`
// Genie space ID
SpaceId string `json:"-" url:"-"`
}
func (*GenieGetDownloadFullQueryResultRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieGetDownloadFullQueryResultRequest) UnmarshalJSON(b []byte) error
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"`
}
func (*GenieGetDownloadFullQueryResultResponse) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieGetDownloadFullQueryResultResponse) UnmarshalJSON(b []byte) error
type GenieGetEvalResultDetailsRequest ¶ added in v0.119.0
type GenieGetEvalResultDetailsRequest struct {
// The unique identifier for the evaluation run.
EvalRunId string `json:"-" url:"-"`
// The unique identifier for the evaluation result.
ResultId string `json:"-" url:"-"`
// The ID associated with the Genie space where the evaluation run is
// located.
SpaceId string `json:"-" url:"-"`
}
func (*GenieGetEvalResultDetailsRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *GenieGetEvalResultDetailsRequest) UnmarshalJSON(b []byte) error
type GenieGetEvalRunRequest ¶ added in v0.119.0
type GenieGetEvalRunRequest struct {
EvalRunId string `json:"-" url:"-"`
// The ID associated with the Genie space where the evaluation run is
// located.
SpaceId string `json:"-" url:"-"`
}
func (*GenieGetEvalRunRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *GenieGetEvalRunRequest) UnmarshalJSON(b []byte) error
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:"-"`
}
func (*GenieGetMessageAttachmentQueryResultRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieGetMessageAttachmentQueryResultRequest) UnmarshalJSON(b []byte) error
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:"-"`
}
func (*GenieGetMessageQueryResultRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieGetMessageQueryResultRequest) UnmarshalJSON(b []byte) error
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"`
}
func (*GenieGetMessageQueryResultResponse) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieGetMessageQueryResultResponse) UnmarshalJSON(b []byte) error
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:"-"`
}
func (*GenieGetQueryResultByAttachmentRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieGetQueryResultByAttachmentRequest) UnmarshalJSON(b []byte) error
type GenieGetSpaceRequest ¶ added in v0.59.0
type GenieGetSpaceRequest struct {
// Whether to include the serialized space export in the response. When
// true, the response also carries the configuration `etag`. Requires at
// least CAN EDIT permission on the space.
IncludeSerializedSpace bool `json:"-" url:"include_serialized_space,omitempty"`
// The ID associated with the Genie space
SpaceId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieGetSpaceRequest) MarshalJSON ¶ added in v0.73.0
func (s GenieGetSpaceRequest) MarshalJSON() ([]byte, error)
func (*GenieGetSpaceRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieGetSpaceRequest) UnmarshalJSON(b []byte) error
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)
// Sends a new message in a chat-mode
// [conversation](:method:genie/startconversation). The AI response uses all
// previously created messages in the conversation to respond. The message is
// processed asynchronously. Poll [Get a conversation
// message](:method:genie/getmessage) until its `status` is `COMPLETED`,
// `FAILED`, or `CANCELLED`.
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)
// Create a comment on a conversation message.
CreateMessageComment(ctx context.Context, request GenieCreateMessageCommentRequest) (*GenieMessageComment, error)
// Creates a Genie space from a serialized payload.
CreateSpace(ctx context.Context, request GenieCreateSpaceRequest) (*GenieSpace, error)
// Deletes a conversation and all of its messages. Users can delete their own
// conversations. Deleting another user's conversation requires at least CAN
// MANAGE permission on the space.
DeleteConversation(ctx context.Context, request GenieDeleteConversationRequest) error
// Deletes a conversation and all of its messages. Users can delete their own
// conversations. Deleting another user's conversation requires at least CAN
// MANAGE permission on the space.
DeleteConversationBySpaceIdAndConversationId(ctx context.Context, spaceId string, conversationId string) error
// Delete a conversation message.
DeleteConversationMessage(ctx context.Context, request GenieDeleteConversationMessageRequest) error
// Download a rendered image of a message visualization attachment. The response
// body is the raw PNG image, not a JSON payload. This is only available if the
// attachment is a visualization and the message status is `COMPLETED`.
DownloadMessageAttachmentVisualization(ctx context.Context, request DownloadMessageAttachmentVisualizationRequest) (*DownloadMessageAttachmentVisualizationResponse, error)
// 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: Use [Execute Message Attachment
// Query](:method:genie/executemessageattachmentquery) instead.
ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error)
// Initiates a new SQL execution and returns a `download_id` and
// `download_id_signature` 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. Both `download_id` and
// `download_id_signature` must be provided when calling the Get endpoint.
//
// ----
//
// ### **Warning: Databricks strongly recommends that you protect the URLs that
// are returned by the `EXTERNAL_LINKS` disposition.**
//
// When you use the `EXTERNAL_LINKS` disposition, a short-lived cloud-storage
// URL is generated to download the results. The URL contains temporary access
// credentials, so protect it and do not set an `Authorization` header in the
// download request.
//
// See [Execute Statement](:method:statementexecution/executestatement) for more
// details.
//
// ----
GenerateDownloadFullQueryResult(ctx context.Context, request GenieGenerateDownloadFullQueryResultRequest) (*GenieGenerateDownloadFullQueryResultResponse, error)
// Cancels an in-flight agent-mode response. `response_id` is the id returned in
// the `response.created` event from the agent-mode responses endpoint. The
// response stops at the next agent boundary and its terminal state is returned.
GenieCancelResponse(ctx context.Context, request GenieCancelResponseRequest) (*GenieMessage, error)
// Creates and runs chat-mode evaluations for multiple benchmark questions in a
// Genie space.
GenieCreateEvalRun(ctx context.Context, request GenieCreateEvalRunRequest) (*GenieEvalRunResponse, error)
// Get details for evaluation results.
GenieGetEvalResultDetails(ctx context.Context, request GenieGetEvalResultDetailsRequest) (*GenieEvalResultDetails, error)
// Get evaluation run details.
GenieGetEvalRun(ctx context.Context, request GenieGetEvalRunRequest) (*GenieEvalRunResponse, error)
// List evaluation results for a specific evaluation run.
GenieListEvalResults(ctx context.Context, request GenieListEvalResultsRequest) (*GenieListEvalResultsResponse, error)
// Lists all evaluation runs in a space.
GenieListEvalRuns(ctx context.Context, request GenieListEvalRunsRequest) (*GenieListEvalRunsResponse, error)
// After [Generating a Full Query Result
// Download](:method:genie/generatedownloadfullqueryresult) and successfully
// receiving a `download_id` and `download_id_signature`, use this API to poll
// the download progress. Both `download_id` and `download_id_signature` are
// required to call this endpoint. When the download is complete, the API
// returns the result in the `EXTERNAL_LINKS` disposition, containing 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.**
//
// When you use the `EXTERNAL_LINKS` disposition, a short-lived cloud-storage
// URL is generated to download the results. The URL contains temporary access
// credentials, so protect it and do not set an `Authorization` header in the
// download request.
//
// See [Execute Statement](:method:statementexecution/executestatement) for more
// details.
//
// ----
GetDownloadFullQueryResult(ctx context.Context, request GenieGetDownloadFullQueryResultRequest) (*GenieGetDownloadFullQueryResultResponse, error)
// After [Generating a Full Query Result
// Download](:method:genie/generatedownloadfullqueryresult) and successfully
// receiving a `download_id` and `download_id_signature`, use this API to poll
// the download progress. Both `download_id` and `download_id_signature` are
// required to call this endpoint. When the download is complete, the API
// returns the result in the `EXTERNAL_LINKS` disposition, containing 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.**
//
// When you use the `EXTERNAL_LINKS` disposition, a short-lived cloud-storage
// URL is generated to download the results. The URL contains temporary access
// credentials, so protect it and do not set an `Authorization` header in the
// download request.
//
// 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)
// Gets a message from a chat-mode or agent-mode conversation. For a complete
// agent-mode transcript, use the List conversation items endpoint.
GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error)
// Gets a message from a chat-mode or agent-mode conversation. For a complete
// agent-mode transcript, use the List conversation items endpoint.
GetMessageBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieMessage, error)
// Gets the result of the SQL query in a message's query attachment. The result
// is available only while the message status is `EXECUTING_QUERY` or
// `COMPLETED`.
GetMessageAttachmentQueryResult(ctx context.Context, request GenieGetMessageAttachmentQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)
// Gets the result of the SQL query in a message's query attachment. The result
// is available only while the message status is `EXECUTING_QUERY` or
// `COMPLETED`.
GetMessageAttachmentQueryResultBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error)
// DEPRECATED: Use [Get Message Attachment Query
// Result](:method:genie/getmessageattachmentqueryresult) instead.
GetMessageQueryResult(ctx context.Context, request GenieGetMessageQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)
// DEPRECATED: Use [Get Message Attachment Query
// Result](:method:genie/getmessageattachmentqueryresult) instead.
GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieGetMessageQueryResultResponse, error)
// DEPRECATED: Use [Get Message Attachment Query
// Result](:method:genie/getmessageattachmentqueryresult) instead.
GetMessageQueryResultByAttachment(ctx context.Context, request GenieGetQueryResultByAttachmentRequest) (*GenieGetMessageQueryResultResponse, error)
// DEPRECATED: Use [Get Message Attachment Query
// Result](:method:genie/getmessageattachmentqueryresult) instead.
GetMessageQueryResultByAttachmentBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error)
// Get details of a Genie Space.
GetSpace(ctx context.Context, request GenieGetSpaceRequest) (*GenieSpace, error)
// Get details of a Genie Space.
GetSpaceBySpaceId(ctx context.Context, spaceId string) (*GenieSpace, error)
// List all comments across all messages in a conversation.
ListConversationComments(ctx context.Context, request GenieListConversationCommentsRequest) (*GenieListConversationCommentsResponse, error)
// Lists messages in a chat-mode or agent-mode conversation. Agent-mode messages
// are returned as GenieMessage projections. Use the List conversation items
// endpoint for the complete reasoning and tool-call history.
ListConversationMessages(ctx context.Context, request GenieListConversationMessagesRequest) (*GenieListConversationMessagesResponse, error)
// Lists the conversations in a Genie space. By default the list contains only
// the caller's own conversations, ordered by most recent activity. With
// `include_all`, it contains every user's conversations in the space, ordered
// by creation time with the newest first.
ListConversations(ctx context.Context, request GenieListConversationsRequest) (*GenieListConversationsResponse, error)
// Lists the conversations in a Genie space. By default the list contains only
// the caller's own conversations, ordered by most recent activity. With
// `include_all`, it contains every user's conversations in the space, ordered
// by creation time with the newest first.
ListConversationsBySpaceId(ctx context.Context, spaceId string) (*GenieListConversationsResponse, error)
// List comments on a specific conversation message.
ListMessageComments(ctx context.Context, request GenieListMessageCommentsRequest) (*GenieListMessageCommentsResponse, error)
// Lists the Genie spaces that the caller can access, most recently updated
// first.
ListSpaces(ctx context.Context, request GenieListSpacesRequest) (*GenieListSpacesResponse, error)
// Sends feedback for a message in a chat-mode or agent-mode conversation.
SendMessageFeedback(ctx context.Context, request GenieSendMessageFeedbackRequest) error
// Starts a new chat-mode conversation and sends its first message. The message
// is processed asynchronously. Poll [Get a conversation
// message](:method:genie/getmessage) until its `status` is `COMPLETED`,
// `FAILED`, or `CANCELLED`.
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)
// Move a Genie Space to the trash.
TrashSpace(ctx context.Context, request GenieTrashSpaceRequest) error
// Move a Genie Space to the trash.
TrashSpaceBySpaceId(ctx context.Context, spaceId string) error
// Updates a Genie space. Replaces the whole configuration when
// `serialized_space` is set and changes the title, description, warehouse or
// folder when those fields are set; omitted fields keep their current values.
UpdateSpace(ctx context.Context, request GenieUpdateSpaceRequest) (*GenieSpace, error)
}
type GenieListConversationCommentsRequest ¶ added in v0.127.0
type GenieListConversationCommentsRequest struct {
// The ID associated with the conversation.
ConversationId string `json:"-" url:"-"`
// Maximum number of comments to return per page.
PageSize int `json:"-" url:"page_size,omitempty"`
// Pagination token for getting the next page of results.
PageToken string `json:"-" url:"page_token,omitempty"`
// The ID associated with the Genie space.
SpaceId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListConversationCommentsRequest) MarshalJSON ¶ added in v0.127.0
func (s GenieListConversationCommentsRequest) MarshalJSON() ([]byte, error)
func (*GenieListConversationCommentsRequest) UnmarshalJSON ¶ added in v0.127.0
func (s *GenieListConversationCommentsRequest) UnmarshalJSON(b []byte) error
type GenieListConversationCommentsResponse ¶ added in v0.127.0
type GenieListConversationCommentsResponse struct {
// List of comments in the conversation.
Comments []GenieMessageComment `json:"comments,omitempty"`
// Token to get the next page of results.
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListConversationCommentsResponse) MarshalJSON ¶ added in v0.127.0
func (s GenieListConversationCommentsResponse) MarshalJSON() ([]byte, error)
func (*GenieListConversationCommentsResponse) UnmarshalJSON ¶ added in v0.127.0
func (s *GenieListConversationCommentsResponse) UnmarshalJSON(b []byte) error
type GenieListConversationMessagesRequest ¶ added in v0.81.0
type GenieListConversationMessagesRequest struct {
// The ID of the conversation to list messages from
ConversationId string `json:"-" url:"-"`
// Maximum number of messages to return per page
PageSize int `json:"-" url:"page_size,omitempty"`
// Token to get the next page of results
PageToken string `json:"-" url:"page_token,omitempty"`
// The ID associated with the Genie space where the conversation is located
SpaceId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListConversationMessagesRequest) MarshalJSON ¶ added in v0.81.0
func (s GenieListConversationMessagesRequest) MarshalJSON() ([]byte, error)
func (*GenieListConversationMessagesRequest) UnmarshalJSON ¶ added in v0.81.0
func (s *GenieListConversationMessagesRequest) UnmarshalJSON(b []byte) error
type GenieListConversationMessagesResponse ¶ added in v0.81.0
type GenieListConversationMessagesResponse struct {
// List of messages in the conversation.
Messages []GenieMessage `json:"messages,omitempty"`
// The token to use for retrieving the next page of results.
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListConversationMessagesResponse) MarshalJSON ¶ added in v0.81.0
func (s GenieListConversationMessagesResponse) MarshalJSON() ([]byte, error)
func (*GenieListConversationMessagesResponse) UnmarshalJSON ¶ added in v0.81.0
func (s *GenieListConversationMessagesResponse) UnmarshalJSON(b []byte) error
type GenieListConversationsRequest ¶ added in v0.74.0
type GenieListConversationsRequest struct {
// Include all conversations in the space across all users. Requires at
// least CAN MANAGE permission on the space.
IncludeAll bool `json:"-" url:"include_all,omitempty"`
// Maximum number of conversations to return per page
PageSize int `json:"-" url:"page_size,omitempty"`
// Token to get the next page of results
PageToken string `json:"-" url:"page_token,omitempty"`
// The ID of the Genie space to retrieve conversations from.
SpaceId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListConversationsRequest) MarshalJSON ¶ added in v0.74.0
func (s GenieListConversationsRequest) MarshalJSON() ([]byte, error)
func (*GenieListConversationsRequest) UnmarshalJSON ¶ added in v0.74.0
func (s *GenieListConversationsRequest) UnmarshalJSON(b []byte) error
type GenieListConversationsResponse ¶ added in v0.74.0
type GenieListConversationsResponse struct {
// List of conversations in the Genie space
Conversations []GenieConversationSummary `json:"conversations,omitempty"`
// Token to get the next page of results
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListConversationsResponse) MarshalJSON ¶ added in v0.74.0
func (s GenieListConversationsResponse) MarshalJSON() ([]byte, error)
func (*GenieListConversationsResponse) UnmarshalJSON ¶ added in v0.74.0
func (s *GenieListConversationsResponse) UnmarshalJSON(b []byte) error
type GenieListEvalResultsRequest ¶ added in v0.119.0
type GenieListEvalResultsRequest struct {
// The unique identifier for the evaluation run.
EvalRunId string `json:"-" url:"-"`
// Maximum number of eval results to return per page.
PageSize int `json:"-" url:"page_size,omitempty"`
// Opaque token to retrieve the next page of results.
PageToken string `json:"-" url:"page_token,omitempty"`
// The ID associated with the Genie space where the evaluation run is
// located.
SpaceId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListEvalResultsRequest) MarshalJSON ¶ added in v0.119.0
func (s GenieListEvalResultsRequest) MarshalJSON() ([]byte, error)
func (*GenieListEvalResultsRequest) UnmarshalJSON ¶ added in v0.119.0
func (s *GenieListEvalResultsRequest) UnmarshalJSON(b []byte) error
type GenieListEvalResultsResponse ¶ added in v0.119.0
type GenieListEvalResultsResponse struct {
// List of evaluation results for the specified run.
EvalResults []GenieEvalResult `json:"eval_results,omitempty"`
// The token to use for retrieving the next page of results.
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListEvalResultsResponse) MarshalJSON ¶ added in v0.119.0
func (s GenieListEvalResultsResponse) MarshalJSON() ([]byte, error)
func (*GenieListEvalResultsResponse) UnmarshalJSON ¶ added in v0.119.0
func (s *GenieListEvalResultsResponse) UnmarshalJSON(b []byte) error
type GenieListEvalRunsRequest ¶ added in v0.119.0
type GenieListEvalRunsRequest struct {
// Maximum number of evaluation runs to return per page
PageSize int `json:"-" url:"page_size,omitempty"`
// Token to get the next page of results
PageToken string `json:"-" url:"page_token,omitempty"`
// The ID associated with the Genie space where the evaluation run is
// located.
SpaceId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListEvalRunsRequest) MarshalJSON ¶ added in v0.119.0
func (s GenieListEvalRunsRequest) MarshalJSON() ([]byte, error)
func (*GenieListEvalRunsRequest) UnmarshalJSON ¶ added in v0.119.0
func (s *GenieListEvalRunsRequest) UnmarshalJSON(b []byte) error
type GenieListEvalRunsResponse ¶ added in v0.119.0
type GenieListEvalRunsResponse struct {
// List of evaluation runs for a space on provided page token and page size
EvalRuns []GenieEvalRunResponse `json:"eval_runs,omitempty"`
// The token to use for retrieving the next page of results.
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListEvalRunsResponse) MarshalJSON ¶ added in v0.119.0
func (s GenieListEvalRunsResponse) MarshalJSON() ([]byte, error)
func (*GenieListEvalRunsResponse) UnmarshalJSON ¶ added in v0.119.0
func (s *GenieListEvalRunsResponse) UnmarshalJSON(b []byte) error
type GenieListMessageCommentsRequest ¶ added in v0.127.0
type GenieListMessageCommentsRequest struct {
// The ID associated with the conversation.
ConversationId string `json:"-" url:"-"`
// The ID associated with the message.
MessageId string `json:"-" url:"-"`
// Maximum number of comments to return per page.
PageSize int `json:"-" url:"page_size,omitempty"`
// Pagination token for getting the next page of results.
PageToken string `json:"-" url:"page_token,omitempty"`
// The ID associated with the Genie space.
SpaceId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListMessageCommentsRequest) MarshalJSON ¶ added in v0.127.0
func (s GenieListMessageCommentsRequest) MarshalJSON() ([]byte, error)
func (*GenieListMessageCommentsRequest) UnmarshalJSON ¶ added in v0.127.0
func (s *GenieListMessageCommentsRequest) UnmarshalJSON(b []byte) error
type GenieListMessageCommentsResponse ¶ added in v0.127.0
type GenieListMessageCommentsResponse struct {
// List of comments on the message.
Comments []GenieMessageComment `json:"comments,omitempty"`
// Token to get the next page of results.
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListMessageCommentsResponse) MarshalJSON ¶ added in v0.127.0
func (s GenieListMessageCommentsResponse) MarshalJSON() ([]byte, error)
func (*GenieListMessageCommentsResponse) UnmarshalJSON ¶ added in v0.127.0
func (s *GenieListMessageCommentsResponse) UnmarshalJSON(b []byte) error
type GenieListSpacesRequest ¶ added in v0.72.0
type GenieListSpacesRequest struct {
// Maximum number of spaces to return per page
PageSize int `json:"-" url:"page_size,omitempty"`
// Pagination token for getting the next page of results
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListSpacesRequest) MarshalJSON ¶ added in v0.72.0
func (s GenieListSpacesRequest) MarshalJSON() ([]byte, error)
func (*GenieListSpacesRequest) UnmarshalJSON ¶ added in v0.72.0
func (s *GenieListSpacesRequest) UnmarshalJSON(b []byte) error
type GenieListSpacesResponse ¶ added in v0.72.0
type GenieListSpacesResponse struct {
// Token to get the next page of results
NextPageToken string `json:"next_page_token,omitempty"`
// List of Genie spaces
Spaces []GenieSpace `json:"spaces,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieListSpacesResponse) MarshalJSON ¶ added in v0.72.0
func (s GenieListSpacesResponse) MarshalJSON() ([]byte, error)
func (*GenieListSpacesResponse) UnmarshalJSON ¶ added in v0.72.0
func (s *GenieListSpacesResponse) UnmarshalJSON(b []byte) error
type GenieMessage ¶ added in v0.44.0
type GenieMessage struct {
// Genie's response to the message. Each attachment holds one part of the
// response, such as a text answer or a SQL query.
Attachments []GenieAttachment `json:"attachments,omitempty"`
// User message content
Content string `json:"content"`
// Conversation ID
ConversationId string `json:"conversation_id"`
// Time when the message was created, in milliseconds since the Unix epoch.
CreatedTimestamp int64 `json:"created_timestamp,omitempty"`
// Error message if Genie failed to respond to the message
Error *MessageError `json:"error,omitempty"`
// User feedback for the message if provided
Feedback *GenieFeedback `json:"feedback,omitempty"`
// Message ID. Legacy identifier, use message_id instead
Id string `json:"id,omitempty"`
// Time when the message was last updated, in milliseconds since the Unix
// epoch.
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"`
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 GenieMessageComment ¶ added in v0.127.0
type GenieMessageComment struct {
// Comment text content
Content string `json:"content"`
// Conversation ID
ConversationId string `json:"conversation_id"`
// Timestamp when the comment was created
CreatedTimestamp int64 `json:"created_timestamp,omitempty"`
// Comment ID
MessageCommentId string `json:"message_comment_id"`
// Message ID
MessageId string `json:"message_id"`
// Genie space ID
SpaceId string `json:"space_id"`
// ID of the user who created the comment
UserId int64 `json:"user_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A comment on a Genie conversation message.
func (GenieMessageComment) MarshalJSON ¶ added in v0.127.0
func (s GenieMessageComment) MarshalJSON() ([]byte, error)
func (*GenieMessageComment) UnmarshalJSON ¶ added in v0.127.0
func (s *GenieMessageComment) 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"`
// The parameters of the SQL query, when the query is parameterized.
Parameters []QueryAttachmentParameter `json:"parameters,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"`
// Insights into how Genie came to generate the SQL.
Thoughts []Thought `json:"thoughts,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 GenieSendMessageFeedbackRequest ¶ added in v0.81.0
type GenieSendMessageFeedbackRequest struct {
// Optional text feedback that will be stored as a comment.
Comment string `json:"comment,omitempty"`
// The ID associated with the conversation.
ConversationId string `json:"-" url:"-"`
// The ID associated with the message to provide feedback for.
MessageId string `json:"-" url:"-"`
// The rating (POSITIVE, NEGATIVE, or NONE).
Rating GenieFeedbackRating `json:"rating"`
// The ID associated with the Genie space where the message is located.
SpaceId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieSendMessageFeedbackRequest) MarshalJSON ¶ added in v0.81.0
func (s GenieSendMessageFeedbackRequest) MarshalJSON() ([]byte, error)
func (*GenieSendMessageFeedbackRequest) UnmarshalJSON ¶ added in v0.81.0
func (s *GenieSendMessageFeedbackRequest) UnmarshalJSON(b []byte) error
type GenieService
deprecated
added in
v0.44.0
type GenieService interface {
// Sends a new message in a chat-mode
// [conversation](:method:genie/startconversation). The AI response uses all
// previously created messages in the conversation to respond. The message
// is processed asynchronously. Poll [Get a conversation
// message](:method:genie/getmessage) until its `status` is `COMPLETED`,
// `FAILED`, or `CANCELLED`.
CreateMessage(ctx context.Context, request GenieCreateConversationMessageRequest) (*GenieMessage, error)
// Create a comment on a conversation message.
CreateMessageComment(ctx context.Context, request GenieCreateMessageCommentRequest) (*GenieMessageComment, error)
// Creates a Genie space from a serialized payload.
CreateSpace(ctx context.Context, request GenieCreateSpaceRequest) (*GenieSpace, error)
// Deletes a conversation and all of its messages. Users can delete their
// own conversations. Deleting another user's conversation requires at least
// CAN MANAGE permission on the space.
DeleteConversation(ctx context.Context, request GenieDeleteConversationRequest) error
// Delete a conversation message.
DeleteConversationMessage(ctx context.Context, request GenieDeleteConversationMessageRequest) error
// Download a rendered image of a message visualization attachment. The
// response body is the raw PNG image, not a JSON payload. This is only
// available if the attachment is a visualization and the message status is
// `COMPLETED`.
DownloadMessageAttachmentVisualization(ctx context.Context, request DownloadMessageAttachmentVisualizationRequest) (*DownloadMessageAttachmentVisualizationResponse, error)
// 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: Use [Execute Message Attachment
// Query](:method:genie/executemessageattachmentquery) instead.
ExecuteMessageQuery(ctx context.Context, request GenieExecuteMessageQueryRequest) (*GenieGetMessageQueryResultResponse, error)
// Initiates a new SQL execution and returns a `download_id` and
// `download_id_signature` 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. Both `download_id`
// and `download_id_signature` must be provided when calling the Get
// endpoint.
//
// ----
//
// ### **Warning: Databricks strongly recommends that you protect the URLs
// that are returned by the `EXTERNAL_LINKS` disposition.**
//
// When you use the `EXTERNAL_LINKS` disposition, a short-lived
// cloud-storage URL is generated to download the results. The URL contains
// temporary access credentials, so protect it and do not set an
// `Authorization` header in the download request.
//
// See [Execute Statement](:method:statementexecution/executestatement) for
// more details.
//
// ----
GenerateDownloadFullQueryResult(ctx context.Context, request GenieGenerateDownloadFullQueryResultRequest) (*GenieGenerateDownloadFullQueryResultResponse, error)
// Cancels an in-flight agent-mode response. `response_id` is the id
// returned in the `response.created` event from the agent-mode responses
// endpoint. The response stops at the next agent boundary and its terminal
// state is returned.
GenieCancelResponse(ctx context.Context, request GenieCancelResponseRequest) (*GenieMessage, error)
// Creates and runs chat-mode evaluations for multiple benchmark questions
// in a Genie space.
GenieCreateEvalRun(ctx context.Context, request GenieCreateEvalRunRequest) (*GenieEvalRunResponse, error)
// Get details for evaluation results.
GenieGetEvalResultDetails(ctx context.Context, request GenieGetEvalResultDetailsRequest) (*GenieEvalResultDetails, error)
// Get evaluation run details.
GenieGetEvalRun(ctx context.Context, request GenieGetEvalRunRequest) (*GenieEvalRunResponse, error)
// List evaluation results for a specific evaluation run.
GenieListEvalResults(ctx context.Context, request GenieListEvalResultsRequest) (*GenieListEvalResultsResponse, error)
// Lists all evaluation runs in a space.
GenieListEvalRuns(ctx context.Context, request GenieListEvalRunsRequest) (*GenieListEvalRunsResponse, error)
// After [Generating a Full Query Result
// Download](:method:genie/generatedownloadfullqueryresult) and successfully
// receiving a `download_id` and `download_id_signature`, use this API to
// poll the download progress. Both `download_id` and
// `download_id_signature` are required to call this endpoint. When the
// download is complete, the API returns the result in the `EXTERNAL_LINKS`
// disposition, containing 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.**
//
// When you use the `EXTERNAL_LINKS` disposition, a short-lived
// cloud-storage URL is generated to download the results. The URL contains
// temporary access credentials, so protect it and do not set an
// `Authorization` header in the download request.
//
// See [Execute Statement](:method:statementexecution/executestatement) for
// more details.
//
// ----
GetDownloadFullQueryResult(ctx context.Context, request GenieGetDownloadFullQueryResultRequest) (*GenieGetDownloadFullQueryResultResponse, error)
// Gets a message from a chat-mode or agent-mode conversation. For a
// complete agent-mode transcript, use the List conversation items endpoint.
GetMessage(ctx context.Context, request GenieGetConversationMessageRequest) (*GenieMessage, error)
// Gets the result of the SQL query in a message's query attachment. The
// result is available only while the message status is `EXECUTING_QUERY` or
// `COMPLETED`.
GetMessageAttachmentQueryResult(ctx context.Context, request GenieGetMessageAttachmentQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)
// DEPRECATED: Use [Get Message Attachment Query
// Result](:method:genie/getmessageattachmentqueryresult) instead.
GetMessageQueryResult(ctx context.Context, request GenieGetMessageQueryResultRequest) (*GenieGetMessageQueryResultResponse, error)
// DEPRECATED: Use [Get Message Attachment Query
// Result](:method:genie/getmessageattachmentqueryresult) instead.
GetMessageQueryResultByAttachment(ctx context.Context, request GenieGetQueryResultByAttachmentRequest) (*GenieGetMessageQueryResultResponse, error)
// Get details of a Genie Space.
GetSpace(ctx context.Context, request GenieGetSpaceRequest) (*GenieSpace, error)
// List all comments across all messages in a conversation.
ListConversationComments(ctx context.Context, request GenieListConversationCommentsRequest) (*GenieListConversationCommentsResponse, error)
// Lists messages in a chat-mode or agent-mode conversation. Agent-mode
// messages are returned as GenieMessage projections. Use the List
// conversation items endpoint for the complete reasoning and tool-call
// history.
ListConversationMessages(ctx context.Context, request GenieListConversationMessagesRequest) (*GenieListConversationMessagesResponse, error)
// Lists the conversations in a Genie space. By default the list contains
// only the caller's own conversations, ordered by most recent activity.
// With `include_all`, it contains every user's conversations in the space,
// ordered by creation time with the newest first.
ListConversations(ctx context.Context, request GenieListConversationsRequest) (*GenieListConversationsResponse, error)
// List comments on a specific conversation message.
ListMessageComments(ctx context.Context, request GenieListMessageCommentsRequest) (*GenieListMessageCommentsResponse, error)
// Lists the Genie spaces that the caller can access, most recently updated
// first.
ListSpaces(ctx context.Context, request GenieListSpacesRequest) (*GenieListSpacesResponse, error)
// Sends feedback for a message in a chat-mode or agent-mode conversation.
SendMessageFeedback(ctx context.Context, request GenieSendMessageFeedbackRequest) error
// Starts a new chat-mode conversation and sends its first message. The
// message is processed asynchronously. Poll [Get a conversation
// message](:method:genie/getmessage) until its `status` is `COMPLETED`,
// `FAILED`, or `CANCELLED`.
StartConversation(ctx context.Context, request GenieStartConversationMessageRequest) (*GenieStartConversationResponse, error)
// Move a Genie Space to the trash.
TrashSpace(ctx context.Context, request GenieTrashSpaceRequest) error
// Updates a Genie space. Replaces the whole configuration when
// `serialized_space` is set and changes the title, description, warehouse
// or folder when those fields are set; omitted fields keep their current
// values.
UpdateSpace(ctx context.Context, request GenieUpdateSpaceRequest) (*GenieSpace, 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.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type GenieSpace ¶ added in v0.59.0
type GenieSpace struct {
// Time when the Genie space was created.
CreateTime *time.Time `json:"create_time,omitempty"`
// Description of the Genie Space
Description string `json:"description,omitempty"`
// ETag for this space. Pass this value back in the update request to
// prevent overwriting concurrent changes.
Etag string `json:"etag,omitempty"`
// Path of the workspace folder that contains the space.
ParentPath string `json:"parent_path,omitempty"`
// Configuration of the space (data sources, instructions, sample questions
// and benchmarks) as a JSON string. [Get Genie
// Space](:method:genie/getspace) returns it only when
// `include_serialized_space` is true, and List Genie spaces never returns
// it. For the JSON format and its validation rules, see
// https://docs.databricks.com/aws/en/genie-agents/conversation-api.
SerializedSpace string `json:"serialized_space,omitempty"`
// Genie space ID
SpaceId string `json:"space_id"`
// Title of the Genie Space
Title string `json:"title"`
// Time when the Genie space was last modified, matching the value shown in
// the Genie Agent UI.
UpdateTime *time.Time `json:"update_time,omitempty"`
// ID of the SQL warehouse that runs the queries Genie generates for this
// space.
WarehouseId string `json:"warehouse_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A Genie space that business users query in natural language. Its configuration (data sources, instructions, sample questions and benchmarks) travels as a JSON string in `serialized_space`; the other fields are metadata about the space.
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 GenieStartConversationMessageRequest struct {
// The text of the message that starts the conversation.
Content string `json:"content"`
// Enable visualization generation.
EnableVisualization bool `json:"enable_visualization,omitempty"`
// The ID associated with the Genie space where you want to start a
// conversation.
SpaceId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieStartConversationMessageRequest) MarshalJSON ¶ added in v0.73.0
func (s GenieStartConversationMessageRequest) MarshalJSON() ([]byte, error)
func (*GenieStartConversationMessageRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieStartConversationMessageRequest) UnmarshalJSON(b []byte) error
type GenieStartConversationResponse ¶ added in v0.44.0
type GenieStartConversationResponse struct {
// The newly created conversation.
Conversation *GenieConversation `json:"conversation,omitempty"`
// Conversation ID
ConversationId string `json:"conversation_id"`
// The first message of the conversation, in its initial state.
Message *GenieMessage `json:"message,omitempty"`
// Message ID
MessageId string `json:"message_id"`
}
func (*GenieStartConversationResponse) UnmarshalJSON ¶ added in v0.73.0
func (s *GenieStartConversationResponse) UnmarshalJSON(b []byte) error
type GenieSuggestedQuestionsAttachment ¶ added in v0.84.0
type GenieSuggestedQuestionsAttachment struct {
// The suggested follow-up questions
Questions []string `json:"questions,omitempty"`
}
Follow-up questions suggested by Genie
func (*GenieSuggestedQuestionsAttachment) UnmarshalJSON ¶ added in v0.174.0
func (s *GenieSuggestedQuestionsAttachment) UnmarshalJSON(b []byte) error
type GenieTrashSpaceRequest ¶ added in v0.74.0
type GenieTrashSpaceRequest struct {
// The ID associated with the Genie space to be sent to the trash.
SpaceId string `json:"-" url:"-"`
}
func (*GenieTrashSpaceRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *GenieTrashSpaceRequest) UnmarshalJSON(b []byte) error
type GenieUpdateSpaceRequest ¶ added in v0.92.0
type GenieUpdateSpaceRequest struct {
// New description for the space, up to 16384 bytes.
Description string `json:"description,omitempty"`
// ETag returned by a previous GET or UPDATE. When set, the update will fail
// if the space has been modified since. Omit to apply the update
// unconditionally.
Etag string `json:"etag,omitempty"`
// Parent workspace folder path to move this Genie space under.
ParentPath string `json:"parent_path,omitempty"`
// New configuration of the space as a JSON string. It replaces the whole
// configuration; when omitted, the current configuration is kept. Start
// from the value that [Get Genie Space](:method:genie/getspace) returns
// when `include_serialized_space` is true. For the JSON format and its
// validation rules, see
// https://docs.databricks.com/aws/en/genie-agents/conversation-api.
SerializedSpace string `json:"serialized_space,omitempty"`
// Genie space ID
SpaceId string `json:"-" url:"-"`
// New display name for the space. Cannot be empty or contain a slash.
Title string `json:"title,omitempty"`
// ID of the SQL warehouse that runs the queries Genie generates for the
// space.
WarehouseId string `json:"warehouse_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GenieUpdateSpaceRequest) MarshalJSON ¶ added in v0.92.0
func (s GenieUpdateSpaceRequest) MarshalJSON() ([]byte, error)
func (*GenieUpdateSpaceRequest) UnmarshalJSON ¶ added in v0.92.0
func (s *GenieUpdateSpaceRequest) UnmarshalJSON(b []byte) error
type GenieVizAttachment ¶ added in v0.152.0
type GenieVizAttachment struct {
// The ID of the query attachment the visualization was generated from
QueryAttachmentId string `json:"query_attachment_id,omitempty"`
// Name of the visualization
Title string `json:"title,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Visualization generated by Genie for a query result. Use the attachment ID with the download visualization API to retrieve the rendered image.
func (GenieVizAttachment) MarshalJSON ¶ added in v0.152.0
func (s GenieVizAttachment) MarshalJSON() ([]byte, error)
func (*GenieVizAttachment) UnmarshalJSON ¶ added in v0.152.0
func (s *GenieVizAttachment) UnmarshalJSON(b []byte) error
type GetDashboardRequest ¶ added in v0.36.0
type GetDashboardRequest struct {
// UUID identifying the dashboard.
DashboardId string `json:"-" url:"-"`
}
func (*GetDashboardRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GetDashboardRequest) UnmarshalJSON(b []byte) error
type GetPublishedDashboardRequest ¶ added in v0.36.0
type GetPublishedDashboardRequest struct {
// UUID identifying the published dashboard.
DashboardId string `json:"-" url:"-"`
}
func (*GetPublishedDashboardRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GetPublishedDashboardRequest) UnmarshalJSON(b []byte) error
type GetPublishedDashboardTokenInfoRequest ¶ added in v0.63.0
type GetPublishedDashboardTokenInfoRequest struct {
// UUID identifying the published dashboard.
DashboardId string `json:"-" url:"-"`
// Value to carry in the token for this viewer, such as a tenant or region
// key. Dashboard dataset queries can reference it as
// `__aibi_external_value` to filter data per viewer. The combined size of
// `external_value` and `external_viewer_id` must be less than 1 KB.
ExternalValue string `json:"-" url:"external_value,omitempty"`
// Identifier of the viewer in the external application. It is recorded in
// dashboard audit logs, so it should be unique per viewer and must not
// contain personally identifiable information.
ExternalViewerId string `json:"-" url:"external_viewer_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
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 that restrict the minted token to viewing the
// published dashboard. Pass them to the OAuth token endpoint serialized as
// a JSON array.
AuthorizationDetails []AuthorizationDetails `json:"authorization_details,omitempty"`
// Custom claim that carries `external_value` and `external_viewer_id` into
// the minted token. It is only present when at least one of those query
// parameters was provided. Format:
// `urn:aibi:external_data:<external_value>:<external_viewer_id>:<dashboard_id>`
CustomClaim string `json:"custom_claim,omitempty"`
// The space-separated OAuth scopes to request when minting the token.
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:"-"`
}
func (*GetScheduleRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GetScheduleRequest) UnmarshalJSON(b []byte) error
type GetSubscriptionRequest ¶ added in v0.43.0
type GetSubscriptionRequest 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:"-"`
// UUID identifying the subscription.
SubscriptionId string `json:"-" url:"-"`
}
func (*GetSubscriptionRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GetSubscriptionRequest) UnmarshalJSON(b []byte) error
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
Deletes a schedule together with all of its subscriptions.
Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.
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. The subscriber receives no further snapshots from the schedule. Deleting your own subscription requires CAN VIEW permission on the dashboard; deleting another user's or a notification destination's subscription requires CAN EDIT.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
func (*LakeviewAPI) Get ¶ added in v0.35.0
func (a *LakeviewAPI) Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)
func (*LakeviewAPI) GetByDashboardId ¶ added in v0.35.0
Get a draft dashboard.
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 the current published dashboard. The request fails with NOT_FOUND if the dashboard has never been published or has been unpublished.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
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.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
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.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
func (*LakeviewAPI) List ¶ added in v0.43.0
func (a *LakeviewAPI) List(ctx context.Context, request ListDashboardsRequest) listing.Iterator[Dashboard]
List the dashboards that the caller can view. Each entry carries summary metadata only; use Get dashboard to retrieve a dashboard's full definition.
func (*LakeviewAPI) ListAll ¶ added in v0.43.0
func (a *LakeviewAPI) ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error)
List the dashboards that the caller can view. Each entry carries summary metadata only; use Get dashboard to retrieve a dashboard's full definition.
func (*LakeviewAPI) ListSchedules ¶ added in v0.43.0
func (a *LakeviewAPI) ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule]
List dashboard schedules.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
func (*LakeviewAPI) ListSchedulesAll ¶ added in v0.43.0
func (a *LakeviewAPI) ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error)
List dashboard schedules.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
func (*LakeviewAPI) ListSchedulesByDashboardId ¶ added in v0.43.0
func (a *LakeviewAPI) ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error)
List dashboard schedules.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
func (*LakeviewAPI) ListSubscriptions ¶ added in v0.43.0
func (a *LakeviewAPI) ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription]
List schedule subscriptions.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
func (*LakeviewAPI) ListSubscriptionsAll ¶ added in v0.43.0
func (a *LakeviewAPI) ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error)
List schedule subscriptions.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
func (*LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId ¶ added in v0.43.0
func (a *LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error)
List schedule subscriptions.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
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) Revert ¶ added in v0.137.0
func (a *LakeviewAPI) Revert(ctx context.Context, request RevertDashboardRequest) (*RevertDashboardResponse, 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 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 the dashboard. This deletes the published version, so viewers can no longer open it, and pauses the dashboard's schedules. The draft is not changed; publish it again to make the dashboard available to viewers.
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) 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)
Get the OAuth scope and authorization details needed to mint a token that is scoped to viewing the published dashboard, for example to embed it in an external application. Pass the response fields, with `authorization_details` serialized as a JSON string, to the workspace OAuth token endpoint with the `client_credentials` grant to mint the token. See Embedding for external users.
The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.
Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.
type LakeviewEmbeddedInterface ¶ added in v0.57.0
type LakeviewEmbeddedInterface interface {
// Get the OAuth scope and authorization details needed to mint a token that is
// scoped to viewing the published dashboard, for example to embed it in an
// external application. Pass the response fields, with `authorization_details`
// serialized as a JSON string, to the workspace OAuth token endpoint with the
// `client_credentials` grant to mint the token. See [Embedding for external
// users].
//
// The caller must be a workspace user with one of the following entitlements:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [Embedding for external users]: https://docs.databricks.com/dashboards/share/embedding/external-embed
GetPublishedDashboardTokenInfo(ctx context.Context, request GetPublishedDashboardTokenInfoRequest) (*GetPublishedDashboardTokenInfoResponse, error)
// Get the OAuth scope and authorization details needed to mint a token that is
// scoped to viewing the published dashboard, for example to embed it in an
// external application. Pass the response fields, with `authorization_details`
// serialized as a JSON string, to the workspace OAuth token endpoint with the
// `client_credentials` grant to mint the token. See [Embedding for external
// users].
//
// The caller must be a workspace user with one of the following entitlements:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [Embedding for external users]: https://docs.databricks.com/dashboards/share/embedding/external-embed
GetPublishedDashboardTokenInfoByDashboardId(ctx context.Context, dashboardId string) (*GetPublishedDashboardTokenInfoResponse, error)
}
type LakeviewEmbeddedService
deprecated
added in
v0.57.0
type LakeviewEmbeddedService interface {
// Get the OAuth scope and authorization details needed to mint a token that
// is scoped to viewing the published dashboard, for example to embed it in
// an external application. Pass the response fields, with
// `authorization_details` serialized as a JSON string, to the workspace
// OAuth token endpoint with the `client_credentials` grant to mint the
// token. See [Embedding for external users].
//
// The caller must be a workspace user with one of the following
// entitlements: Workspace access, Databricks SQL access, or Consumer
// access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [Embedding for external users]: https://docs.databricks.com/dashboards/share/embedding/external-embed
GetPublishedDashboardTokenInfo(ctx context.Context, request GetPublishedDashboardTokenInfoRequest) (*GetPublishedDashboardTokenInfoResponse, error)
}
Token-based Lakeview APIs for embedding dashboards in external applications.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type LakeviewInterface ¶
type LakeviewInterface interface {
// Create a draft dashboard.
Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)
// Creates a schedule for a dashboard. The dashboard must be published before a
// schedule can be created for it.
//
// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access
// in addition to Workspace access.
//
// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements
CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error)
// Create schedule subscription. Subscribes a workspace user or a notification
// destination to the schedule, so that it receives a snapshot of the dashboard
// each time the schedule runs. Subscribing yourself requires CAN VIEW
// permission on the dashboard; subscribing another user or a notification
// destination requires CAN EDIT. On dashboards published without embedded
// credentials, you can only subscribe yourself. If the subscriber is already
// subscribed to the schedule, the existing subscription is returned.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error)
// Deletes a schedule together with all of its subscriptions.
//
// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access
// in addition to Workspace access.
//
// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements
DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error
// Deletes a schedule together with all of its subscriptions.
//
// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access
// in addition to Workspace access.
//
// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements
DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error
// Delete schedule subscription. The subscriber receives no further snapshots
// from the schedule. Deleting your own subscription requires CAN VIEW
// permission on the dashboard; deleting another user's or a notification
// destination's subscription requires CAN EDIT.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error
// Delete schedule subscription. The subscriber receives no further snapshots
// from the schedule. Deleting your own subscription requires CAN VIEW
// permission on the dashboard; deleting another user's or a notification
// destination's subscription requires CAN EDIT.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) error
// Get a draft dashboard.
Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)
// Get a draft dashboard.
GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error)
// Get the current published dashboard. The request fails with NOT_FOUND if the
// dashboard has never been published or has been unpublished.
//
// The caller must be a workspace user with one of the following entitlements:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)
// Get the current published dashboard. The request fails with NOT_FOUND if the
// dashboard has never been published or has been unpublished.
//
// The caller must be a workspace user with one of the following entitlements:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error)
// Get dashboard schedule.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error)
// Get dashboard schedule.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*Schedule, error)
// Get schedule subscription.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error)
// Get schedule subscription.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) (*Subscription, error)
// List the dashboards that the caller can view. Each entry carries summary
// metadata only; use Get dashboard to retrieve a dashboard's full definition.
//
// This method is generated by Databricks SDK Code Generator.
List(ctx context.Context, request ListDashboardsRequest) listing.Iterator[Dashboard]
// List the dashboards that the caller can view. Each entry carries summary
// metadata only; use Get dashboard to retrieve a dashboard's full definition.
//
// This method is generated by Databricks SDK Code Generator.
ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error)
// List dashboard schedules.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
//
// This method is generated by Databricks SDK Code Generator.
ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule]
// List dashboard schedules.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
//
// This method is generated by Databricks SDK Code Generator.
ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error)
// List dashboard schedules.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error)
// List schedule subscriptions.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
//
// This method is generated by Databricks SDK Code Generator.
ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription]
// List schedule subscriptions.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
//
// This method is generated by Databricks SDK Code Generator.
ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error)
// List schedule subscriptions.
//
// The caller must be a workspace user with one of the following [entitlements]:
// Workspace access, Databricks SQL access, or Consumer access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error)
// Deprecated: Legacy dashboard migration is no longer supported. Use Lakeview
// (AI/BI) dashboards instead.
Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)
// Publish the current draft dashboard.
Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)
// Revert a dashboard's definition in draft mode to the last published version.
// The draft's datasets, pages and widgets are replaced with those of the
// current published version, and the updated draft is returned. The dashboard
// must have been published at least once; the published version itself is not
// changed.
Revert(ctx context.Context, request RevertDashboardRequest) (*RevertDashboardResponse, error)
// Trash a dashboard.
Trash(ctx context.Context, request TrashDashboardRequest) error
// Trash a dashboard.
TrashByDashboardId(ctx context.Context, dashboardId string) error
// Unpublish the dashboard. This deletes the published version, so viewers can
// no longer open it, and pauses the dashboard's schedules. The draft is not
// changed; publish it again to make the dashboard available to viewers.
Unpublish(ctx context.Context, request UnpublishDashboardRequest) error
// Unpublish the dashboard. This deletes the published version, so viewers can
// no longer open it, and pauses the dashboard's schedules. The draft is not
// changed; publish it again to make the dashboard available to viewers.
UnpublishByDashboardId(ctx context.Context, dashboardId string) error
// Update a draft dashboard.
Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)
// Updates a schedule. The request body replaces the stored schedule, so fields
// omitted from the body are reset to their defaults.
//
// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access
// in addition to Workspace access.
//
// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements
UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error)
}
type LakeviewService
deprecated
type LakeviewService interface {
// Create a draft dashboard.
Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)
// Creates a schedule for a dashboard. The dashboard must be published
// before a schedule can be created for it.
//
// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL
// access in addition to Workspace access.
//
// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements
CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error)
// Create schedule subscription. Subscribes a workspace user or a
// notification destination to the schedule, so that it receives a snapshot
// of the dashboard each time the schedule runs. Subscribing yourself
// requires CAN VIEW permission on the dashboard; subscribing another user
// or a notification destination requires CAN EDIT. On dashboards published
// without embedded credentials, you can only subscribe yourself. If the
// subscriber is already subscribed to the schedule, the existing
// subscription is returned.
//
// The caller must be a workspace user with one of the following
// [entitlements]: Workspace access, Databricks SQL access, or Consumer
// access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error)
// Deletes a schedule together with all of its subscriptions.
//
// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL
// access in addition to Workspace access.
//
// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements
DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error
// Delete schedule subscription. The subscriber receives no further
// snapshots from the schedule. Deleting your own subscription requires CAN
// VIEW permission on the dashboard; deleting another user's or a
// notification destination's subscription requires CAN EDIT.
//
// The caller must be a workspace user with one of the following
// [entitlements]: Workspace access, Databricks SQL access, or Consumer
// access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error
// Get a draft dashboard.
Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)
// Get the current published dashboard. The request fails with NOT_FOUND if
// the dashboard has never been published or has been unpublished.
//
// The caller must be a workspace user with one of the following
// entitlements: Workspace access, Databricks SQL access, or Consumer
// access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)
// Get dashboard schedule.
//
// The caller must be a workspace user with one of the following
// [entitlements]: Workspace access, Databricks SQL access, or Consumer
// access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error)
// Get schedule subscription.
//
// The caller must be a workspace user with one of the following
// [entitlements]: Workspace access, Databricks SQL access, or Consumer
// access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error)
// List the dashboards that the caller can view. Each entry carries summary
// metadata only; use Get dashboard to retrieve a dashboard's full
// definition.
List(ctx context.Context, request ListDashboardsRequest) (*ListDashboardsResponse, error)
// List dashboard schedules.
//
// The caller must be a workspace user with one of the following
// [entitlements]: Workspace access, Databricks SQL access, or Consumer
// access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
ListSchedules(ctx context.Context, request ListSchedulesRequest) (*ListSchedulesResponse, error)
// List schedule subscriptions.
//
// The caller must be a workspace user with one of the following
// [entitlements]: Workspace access, Databricks SQL access, or Consumer
// access.
//
// Account-level users who are not members of the workspace cannot call this
// endpoint, even if the dashboard has been shared with them.
//
// [entitlements]: https://docs.databricks.com/security/auth/entitlements
ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) (*ListSubscriptionsResponse, error)
// Deprecated: Legacy dashboard migration is no longer supported. Use
// Lakeview (AI/BI) dashboards instead.
Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)
// Publish the current draft dashboard.
Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)
// Revert a dashboard's definition in draft mode to the last published
// version. The draft's datasets, pages and widgets are replaced with those
// of the current published version, and the updated draft is returned. The
// dashboard must have been published at least once; the published version
// itself is not changed.
Revert(ctx context.Context, request RevertDashboardRequest) (*RevertDashboardResponse, error)
// Trash a dashboard.
Trash(ctx context.Context, request TrashDashboardRequest) error
// Unpublish the dashboard. This deletes the published version, so viewers
// can no longer open it, and pauses the dashboard's schedules. The draft is
// not changed; publish it again to make the dashboard available to viewers.
Unpublish(ctx context.Context, request UnpublishDashboardRequest) error
// Update a draft dashboard.
Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)
// Updates a schedule. The request body replaces the stored schedule, so
// fields omitted from the body are reset to their defaults.
//
// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL
// access in addition to Workspace access.
//
// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements
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).
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
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
func (*LifecycleState) Values ¶ added in v0.72.0
func (f *LifecycleState) Values() []LifecycleState
Values returns all possible values for LifecycleState.
There is no guarantee on the order of the values in the slice.
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:"-"`
}
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 belong.
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:"-"`
}
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 to which the subscriptions belong.
DashboardId string `json:"-" url:"-"`
// The number of subscriptions to return per page.
PageSize int `json:"-" url:"page_size,omitempty"`
// A page token, received from a previous `ListSubscriptions` call. Use this
// to retrieve the subsequent page.
PageToken string `json:"-" url:"page_token,omitempty"`
// UUID identifying the schedule to which the subscriptions belong.
ScheduleId string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
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 {
// A human-readable description of the error.
Error string `json:"error,omitempty"`
// The category of the error.
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 MessageErrorTypeCouldNotGetDashboardSchemaException MessageErrorType = `COULD_NOT_GET_DASHBOARD_SCHEMA_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 MessageErrorTypeDescribeQueryInvalidSqlError MessageErrorType = `DESCRIBE_QUERY_INVALID_SQL_ERROR`
const MessageErrorTypeDescribeQueryTimeout MessageErrorType = `DESCRIBE_QUERY_TIMEOUT`
const MessageErrorTypeDescribeQueryUnexpectedFailure MessageErrorType = `DESCRIBE_QUERY_UNEXPECTED_FAILURE`
const MessageErrorTypeExceededMaxTokenLengthException MessageErrorType = `EXCEEDED_MAX_TOKEN_LENGTH_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 MessageErrorTypeInternalCatalogAssetCreationFailedException MessageErrorType = `INTERNAL_CATALOG_ASSET_CREATION_FAILED_EXCEPTION`
const MessageErrorTypeInternalCatalogAssetCreationOngoingException MessageErrorType = `INTERNAL_CATALOG_ASSET_CREATION_ONGOING_EXCEPTION`
const MessageErrorTypeInternalCatalogAssetCreationUnsupportedException MessageErrorType = `INTERNAL_CATALOG_ASSET_CREATION_UNSUPPORTED_EXCEPTION`
const MessageErrorTypeInternalCatalogMissingUcPathException MessageErrorType = `INTERNAL_CATALOG_MISSING_UC_PATH_EXCEPTION`
const MessageErrorTypeInternalCatalogPathOverlapException MessageErrorType = `INTERNAL_CATALOG_PATH_OVERLAP_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 MessageErrorTypeInvalidSqlMultipleDatasetReferencesException MessageErrorType = `INVALID_SQL_MULTIPLE_DATASET_REFERENCES_EXCEPTION`
const MessageErrorTypeInvalidSqlMultipleStatementsException MessageErrorType = `INVALID_SQL_MULTIPLE_STATEMENTS_EXCEPTION`
const MessageErrorTypeInvalidSqlUnknownTableException MessageErrorType = `INVALID_SQL_UNKNOWN_TABLE_EXCEPTION`
const MessageErrorTypeInvalidTableIdentifierException MessageErrorType = `INVALID_TABLE_IDENTIFIER_EXCEPTION`
const MessageErrorTypeLocalContextExceededException MessageErrorType = `LOCAL_CONTEXT_EXCEEDED_EXCEPTION`
const MessageErrorTypeMessageAttachmentTooLongError MessageErrorType = `MESSAGE_ATTACHMENT_TOO_LONG_ERROR`
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 MessageErrorTypeUnsupportedConversationTypeException MessageErrorType = `UNSUPPORTED_CONVERSATION_TYPE_EXCEPTION`
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
func (*MessageErrorType) Values ¶ added in v0.72.0
func (f *MessageErrorType) Values() []MessageErrorType
Values returns all possible values for MessageErrorType.
There is no guarantee on the order of the values in the slice.
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
func (*MessageStatus) Values ¶ added in v0.72.0
func (f *MessageStatus) Values() []MessageStatus
Values returns all possible values for MessageStatus.
There is no guarantee on the order of the values in the slice.
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 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"`
// Whether the publisher's credentials are embedded in the published
// dashboard. When true, viewers run the dashboard's queries with the
// publisher's data permissions (shared data permissions); when false, each
// viewer runs them with their own data permissions.
EmbedCredentials bool `json:"embed_credentials,omitempty"`
// The timestamp of when the current published version was created, that is,
// when the dashboard was last published.
RevisionCreateTime string `json:"revision_create_time,omitempty"`
// The ID of the SQL warehouse that runs the published dashboard's queries.
// It is the warehouse given when the dashboard was published, or the
// draft's warehouse if none was given.
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 QueryAttachmentParameter ¶ added in v0.86.0
type QueryAttachmentParameter struct {
// The name of the parameter as referenced in the SQL query.
Keyword string `json:"keyword,omitempty"`
// The SQL type of the parameter value.
SqlType string `json:"sql_type,omitempty"`
// The value bound to the parameter.
Value string `json:"value,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (QueryAttachmentParameter) MarshalJSON ¶ added in v0.86.0
func (s QueryAttachmentParameter) MarshalJSON() ([]byte, error)
func (*QueryAttachmentParameter) UnmarshalJSON ¶ added in v0.86.0
func (s *QueryAttachmentParameter) 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"`
// JWT corresponding to the statement contained in this result
StatementIdSignature string `json:"statement_id_signature,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (Result) MarshalJSON ¶ added in v0.44.0
func (*Result) UnmarshalJSON ¶ added in v0.44.0
type RevertDashboardRequest ¶ added in v0.137.0
type RevertDashboardRequest struct {
// UUID identifying the dashboard.
DashboardId string `json:"-" url:"-"`
// The etag of the draft dashboard, as returned by the get dashboard API.
// When provided, the request fails with ABORTED if the draft has been
// modified since that etag was read.
Etag string `json:"etag,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Request to revert a dashboard draft to its last published state.
func (RevertDashboardRequest) MarshalJSON ¶ added in v0.137.0
func (s RevertDashboardRequest) MarshalJSON() ([]byte, error)
func (*RevertDashboardRequest) UnmarshalJSON ¶ added in v0.137.0
func (s *RevertDashboardRequest) UnmarshalJSON(b []byte) error
type RevertDashboardResponse ¶ added in v0.137.0
type RevertDashboardResponse struct {
// The reverted dashboard.
Dashboard *Dashboard `json:"dashboard,omitempty"`
}
Response to revert a dashboard draft to its last published state.
func (*RevertDashboardResponse) UnmarshalJSON ¶ added in v0.174.0
func (s *RevertDashboardResponse) UnmarshalJSON(b []byte) error
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 and time zone that define when the schedule runs.
CronSchedule CronSchedule `json:"cron_schedule"`
// UUID identifying the dashboard to which the schedule belongs.
DashboardId string `json:"dashboard_id,omitempty"`
// The name of the schedule, as shown in the dashboard's list of schedules.
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"`
// Whether the schedule is paused. A paused schedule keeps its configuration
// and subscribers, but the dashboard is not refreshed and no notifications
// are sent until the schedule is unpaused.
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 ID of the SQL warehouse that runs the dashboard's queries during
// scheduled refreshes. If omitted, the warehouse of the published dashboard
// is used.
WarehouseId string `json:"warehouse_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A schedule periodically runs a dashboard on a cron cadence. Each run executes the dashboard's queries to refresh its cached data and sends a snapshot of the dashboard to the schedule's subscribers. See Manage scheduled dashboard updates and subscriptions for details.
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
func (*SchedulePauseStatus) Values ¶ added in v0.72.0
func (f *SchedulePauseStatus) Values() []SchedulePauseStatus
Values returns all possible values for SchedulePauseStatus.
There is no guarantee on the order of the values in the slice.
type ScoreReason ¶ added in v0.119.0
type ScoreReason string
const ScoreReasonColumnTypeDifference ScoreReason = `COLUMN_TYPE_DIFFERENCE`
const ScoreReasonEmptyGoodSql ScoreReason = `EMPTY_GOOD_SQL`
const ScoreReasonEmptyResult ScoreReason = `EMPTY_RESULT`
const ScoreReasonLlmJudgeFormattingError ScoreReason = `LLM_JUDGE_FORMATTING_ERROR`
const ScoreReasonLlmJudgeIncompleteOrPartialOutput ScoreReason = `LLM_JUDGE_INCOMPLETE_OR_PARTIAL_OUTPUT`
const ScoreReasonLlmJudgeIncorrectFunctionUsage ScoreReason = `LLM_JUDGE_INCORRECT_FUNCTION_USAGE`
const ScoreReasonLlmJudgeIncorrectMetricCalculation ScoreReason = `LLM_JUDGE_INCORRECT_METRIC_CALCULATION`
const ScoreReasonLlmJudgeIncorrectTableOrFieldUsage ScoreReason = `LLM_JUDGE_INCORRECT_TABLE_OR_FIELD_USAGE`
const ScoreReasonLlmJudgeInstructionComplianceOrMissingBusinessLogic ScoreReason = `LLM_JUDGE_INSTRUCTION_COMPLIANCE_OR_MISSING_BUSINESS_LOGIC`
const ScoreReasonLlmJudgeMisinterpretationOfUserRequest ScoreReason = `LLM_JUDGE_MISINTERPRETATION_OF_USER_REQUEST`
const ScoreReasonLlmJudgeMissingJoin ScoreReason = `LLM_JUDGE_MISSING_JOIN`
const ScoreReasonLlmJudgeMissingOrIncorrectAggregation ScoreReason = `LLM_JUDGE_MISSING_OR_INCORRECT_AGGREGATION`
const ScoreReasonLlmJudgeMissingOrIncorrectFilter ScoreReason = `LLM_JUDGE_MISSING_OR_INCORRECT_FILTER`
const ScoreReasonLlmJudgeMissingOrIncorrectJoin ScoreReason = `LLM_JUDGE_MISSING_OR_INCORRECT_JOIN`
const ScoreReasonLlmJudgeOther ScoreReason = `LLM_JUDGE_OTHER`
const ScoreReasonLlmJudgeSemanticError ScoreReason = `LLM_JUDGE_SEMANTIC_ERROR`
const ScoreReasonLlmJudgeSyntaxError ScoreReason = `LLM_JUDGE_SYNTAX_ERROR`
const ScoreReasonLlmJudgeWrongAggregation ScoreReason = `LLM_JUDGE_WRONG_AGGREGATION`
const ScoreReasonLlmJudgeWrongColumns ScoreReason = `LLM_JUDGE_WRONG_COLUMNS`
const ScoreReasonLlmJudgeWrongFilter ScoreReason = `LLM_JUDGE_WRONG_FILTER`
const ScoreReasonResultExtraColumns ScoreReason = `RESULT_EXTRA_COLUMNS`
const ScoreReasonResultExtraRows ScoreReason = `RESULT_EXTRA_ROWS`
const ScoreReasonResultMissingColumns ScoreReason = `RESULT_MISSING_COLUMNS`
const ScoreReasonResultMissingRows ScoreReason = `RESULT_MISSING_ROWS`
const ScoreReasonSingleCellDifference ScoreReason = `SINGLE_CELL_DIFFERENCE`
func (*ScoreReason) Set ¶ added in v0.119.0
func (f *ScoreReason) Set(v string) error
Set raw string value and validate it against allowed values
func (*ScoreReason) String ¶ added in v0.119.0
func (f *ScoreReason) String() string
String representation for fmt.Print
func (*ScoreReason) Type ¶ added in v0.119.0
func (f *ScoreReason) Type() string
Type always returns ScoreReason to satisfy [pflag.Value] interface
func (*ScoreReason) Values ¶ added in v0.119.0
func (f *ScoreReason) Values() []ScoreReason
Values returns all possible values for ScoreReason.
There is no guarantee on the order of the values in the slice.
type Subscriber ¶ added in v0.43.0
type Subscriber struct {
// The notification destination that receives the subscription, such as an
// email list or a Slack or Microsoft Teams channel. Workspace admins
// configure notification destinations.
DestinationSubscriber *SubscriptionSubscriberDestination `json:"destination_subscriber,omitempty"`
// The workspace user who receives the subscription.
UserSubscriber *SubscriptionSubscriberUser `json:"user_subscriber,omitempty"`
}
func (*Subscriber) UnmarshalJSON ¶ added in v0.73.0
func (s *Subscriber) UnmarshalJSON(b []byte) error
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 of the subscription. It must be left empty on create. It can be
// passed as the `etag` parameter of the delete method to make sure the
// subscription has not changed since it was read.
Etag string `json:"etag,omitempty"`
// UUID identifying the schedule to which the subscription belongs.
ScheduleId string `json:"schedule_id,omitempty"`
// Whether the subscription is refresh-only. When true, each scheduled run
// refreshes the dashboard data for the subscriber without sending a
// notification. Defaults to false. Refresh-only subscriptions are only
// allowed on dashboards published without embedded credentials.
SkipNotify bool `json:"skip_notify,omitempty"`
// The subscriber that receives the dashboard snapshot. Exactly one of
// `user_subscriber` and `destination_subscriber` must be set.
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:"-"`
}
A subscription registers a workspace user or a notification destination as a subscriber of a dashboard schedule. Each time the schedule runs, the subscriber receives a snapshot of the published dashboard, unless the subscription is refresh-only. See Manage scheduled dashboard updates and subscriptions.
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 UUID of the notification destination that receives the subscription,
// as returned by the [Notification Destinations API].
//
// [Notification Destinations API]: https://docs.databricks.com/api/workspace/notificationdestinations
DestinationId string `json:"destination_id"`
}
func (*SubscriptionSubscriberDestination) UnmarshalJSON ¶ added in v0.73.0
func (s *SubscriptionSubscriberDestination) UnmarshalJSON(b []byte) error
type SubscriptionSubscriberUser ¶ added in v0.43.0
type SubscriptionSubscriberUser struct {
// The ID of the workspace user who receives the subscription, as returned
// by the [Workspace Users API].
//
// [Workspace Users API]: https://docs.databricks.com/api/workspace/users
UserId int64 `json:"user_id"`
}
func (*SubscriptionSubscriberUser) UnmarshalJSON ¶ added in v0.73.0
func (s *SubscriptionSubscriberUser) 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"`
// Purpose of this text attachment. A completed message may contain more
// than one text attachment (for example a clarifying follow-up question
// alongside the final answer); use this field to tell them apart.
// `TEXT_ATTACHMENT_PURPOSE_ANSWER` marks the final answer/summary and
// `FOLLOW_UP_QUESTION` marks a clarifying question. Agent-mode messages
// return the answer as their only text attachment.
Purpose TextAttachmentPurpose `json:"purpose,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A text response on a conversation message: the answer, the final summary, or a clarifying follow-up question, along with optional phase and verification metadata.
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 TextAttachmentPurpose ¶ added in v0.92.0
type TextAttachmentPurpose string
Purpose/intent of a text attachment
const TextAttachmentPurposeFollowUpQuestion TextAttachmentPurpose = `FOLLOW_UP_QUESTION`
const TextAttachmentPurposeTextAttachmentPurposeAnswer TextAttachmentPurpose = `TEXT_ATTACHMENT_PURPOSE_ANSWER`
func (*TextAttachmentPurpose) Set ¶ added in v0.92.0
func (f *TextAttachmentPurpose) Set(v string) error
Set raw string value and validate it against allowed values
func (*TextAttachmentPurpose) String ¶ added in v0.92.0
func (f *TextAttachmentPurpose) String() string
String representation for fmt.Print
func (*TextAttachmentPurpose) Type ¶ added in v0.92.0
func (f *TextAttachmentPurpose) Type() string
Type always returns TextAttachmentPurpose to satisfy [pflag.Value] interface
func (*TextAttachmentPurpose) Values ¶ added in v0.92.0
func (f *TextAttachmentPurpose) Values() []TextAttachmentPurpose
Values returns all possible values for TextAttachmentPurpose.
There is no guarantee on the order of the values in the slice.
type Thought ¶ added in v0.127.0
type Thought struct {
// The md formatted content for this thought.
Content string `json:"content,omitempty"`
// The category of this thought. The possible values are: *
// `THOUGHT_TYPE_DESCRIPTION`: A high-level description of how the question
// was interpreted. * `THOUGHT_TYPE_UNDERSTANDING`: How ambiguous parts of
// the question were resolved. * `THOUGHT_TYPE_DATA_SOURCING`: Which tables
// or datasets were identified as relevant. * `THOUGHT_TYPE_INSTRUCTIONS`:
// Which author-defined instructions were referenced. *
// `THOUGHT_TYPE_STEPS`: The logical steps taken to compute the answer.
ThoughtType ThoughtType `json:"thought_type,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A single thought in the AI's reasoning process for a query.
func (Thought) MarshalJSON ¶ added in v0.127.0
func (*Thought) UnmarshalJSON ¶ added in v0.127.0
type ThoughtType ¶ added in v0.127.0
type ThoughtType string
ThoughtType. The possible values are: * `THOUGHT_TYPE_UNSPECIFIED`: Default value that should not be used. * `THOUGHT_TYPE_DESCRIPTION`: A high-level description of how the question was interpreted. * `THOUGHT_TYPE_UNDERSTANDING`: How ambiguous parts of the question were resolved. * `THOUGHT_TYPE_DATA_SOURCING`: Which tables or datasets were identified as relevant. * `THOUGHT_TYPE_INSTRUCTIONS`: Which author-defined instructions were referenced. * `THOUGHT_TYPE_STEPS`: The logical steps taken to compute the answer. The category of a Thought. Additional values may be added in the future.
const ThoughtTypeThoughtTypeDataSourcing ThoughtType = `THOUGHT_TYPE_DATA_SOURCING`
Which tables or datasets were identified as relevant.
const ThoughtTypeThoughtTypeDescription ThoughtType = `THOUGHT_TYPE_DESCRIPTION`
A high-level description of how the question was interpreted.
const ThoughtTypeThoughtTypeInstructions ThoughtType = `THOUGHT_TYPE_INSTRUCTIONS`
Which author-defined instructions were referenced.
const ThoughtTypeThoughtTypeSteps ThoughtType = `THOUGHT_TYPE_STEPS`
The logical steps taken to compute the answer.
const ThoughtTypeThoughtTypeUnderstanding ThoughtType = `THOUGHT_TYPE_UNDERSTANDING`
How ambiguous parts of the question were resolved.
func (*ThoughtType) Set ¶ added in v0.127.0
func (f *ThoughtType) Set(v string) error
Set raw string value and validate it against allowed values
func (*ThoughtType) String ¶ added in v0.127.0
func (f *ThoughtType) String() string
String representation for fmt.Print
func (*ThoughtType) Type ¶ added in v0.127.0
func (f *ThoughtType) Type() string
Type always returns ThoughtType to satisfy [pflag.Value] interface
func (*ThoughtType) Values ¶ added in v0.127.0
func (f *ThoughtType) Values() []ThoughtType
Values returns all possible values for ThoughtType.
There is no guarantee on the order of the values in the slice.
type TrashDashboardRequest ¶ added in v0.36.0
type TrashDashboardRequest struct {
// UUID identifying the dashboard.
DashboardId string `json:"-" url:"-"`
}
func (*TrashDashboardRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *TrashDashboardRequest) UnmarshalJSON(b []byte) error
type UnpublishDashboardRequest ¶ added in v0.37.0
type UnpublishDashboardRequest struct {
// UUID identifying the published dashboard.
DashboardId string `json:"-" url:"-"`
}
func (*UnpublishDashboardRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *UnpublishDashboardRequest) UnmarshalJSON(b []byte) error
type UpdateDashboardRequest ¶ added in v0.35.0
type UpdateDashboardRequest struct {
Dashboard Dashboard `json:"dashboard"`
// UUID identifying the dashboard.
DashboardId string `json:"-" url:"-"`
// Sets the default catalog for all datasets in this dashboard. Does not
// impact table references that use fully qualified catalog names (ex:
// samples.nyctaxi.trips). Leave blank to keep each dataset’s existing
// configuration.
DatasetCatalog string `json:"-" url:"dataset_catalog,omitempty"`
// Sets the default schema for all datasets in this dashboard. Does not
// impact table references that use fully qualified schema names (ex:
// nyctaxi.trips). Leave blank to keep each dataset’s existing
// configuration.
DatasetSchema string `json:"-" url:"dataset_schema,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateDashboardRequest) MarshalJSON ¶ added in v0.35.0
func (s UpdateDashboardRequest) MarshalJSON() ([]byte, error)
func (*UpdateDashboardRequest) UnmarshalJSON ¶ added in v0.35.0
func (s *UpdateDashboardRequest) UnmarshalJSON(b []byte) error
type UpdateScheduleRequest ¶ added in v0.43.0
type UpdateScheduleRequest struct {
// UUID identifying the dashboard to which the schedule belongs.
DashboardId string `json:"-" url:"-"`
// The schedule to update.
Schedule Schedule `json:"schedule"`
// UUID identifying the schedule.
ScheduleId string `json:"-" url:"-"`
}
func (*UpdateScheduleRequest) UnmarshalJSON ¶ added in v0.43.0
func (s *UpdateScheduleRequest) UnmarshalJSON(b []byte) error
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.