diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 75afa4ea6..62eb1dbba 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -90fefb5618fdecf7dfdf6be7d56c2213d24ad944 \ No newline at end of file +69902d1abe35bd9e78e0231927bf14d11b383a16 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index eb0550232..0ca0850a8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -94,6 +94,7 @@ experimental/mocks/service/oauth2/mock_o_auth_published_apps_interface.go lingui experimental/mocks/service/oauth2/mock_published_app_integration_interface.go linguist-generated=true experimental/mocks/service/oauth2/mock_service_principal_federation_policy_interface.go linguist-generated=true experimental/mocks/service/oauth2/mock_service_principal_secrets_interface.go linguist-generated=true +experimental/mocks/service/oauth2/mock_service_principal_secrets_proxy_interface.go linguist-generated=true experimental/mocks/service/pipelines/mock_pipelines_interface.go linguist-generated=true experimental/mocks/service/provisioning/mock_credentials_interface.go linguist-generated=true experimental/mocks/service/provisioning/mock_encryption_keys_interface.go linguist-generated=true @@ -115,6 +116,7 @@ experimental/mocks/service/settings/mock_credentials_manager_interface.go lingui experimental/mocks/service/settings/mock_csp_enablement_account_interface.go linguist-generated=true experimental/mocks/service/settings/mock_dashboard_email_subscriptions_interface.go linguist-generated=true experimental/mocks/service/settings/mock_default_namespace_interface.go linguist-generated=true +experimental/mocks/service/settings/mock_default_warehouse_id_interface.go linguist-generated=true experimental/mocks/service/settings/mock_disable_legacy_access_interface.go linguist-generated=true experimental/mocks/service/settings/mock_disable_legacy_dbfs_interface.go linguist-generated=true experimental/mocks/service/settings/mock_disable_legacy_features_interface.go linguist-generated=true diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index a478fa6ca..8a00d4fa2 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -11,3 +11,9 @@ ### Internal Changes ### API Changes +* Added `EnvironmentSettings` field for [catalog.ConnectionInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ConnectionInfo). +* Added `EnvironmentSettings` field for [catalog.CreateConnection](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CreateConnection). +* Added `EnvironmentSettings` field for [catalog.UpdateConnection](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateConnection). +* Added `QueryBasedConnectorConfig` field for [pipelines.TableSpecificConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#TableSpecificConfig). +* Added `MetaMarketing` enum value for [pipelines.IngestionSourceType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#IngestionSourceType). +* [Breaking] Removed `Create` method for [w.Dashboards](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#DashboardsAPI) workspace-level service. diff --git a/account_client.go b/account_client.go index c6744bd9f..fa466e0f8 100755 --- a/account_client.go +++ b/account_client.go @@ -32,6 +32,12 @@ type AccountClient struct { // A service serves REST API about Budget policies BudgetPolicy billing.BudgetPolicyInterface + // These APIs manage budget configurations for this account. Budgets enable + // you to monitor usage across your account. You can set up budgets to + // either track account-wide spending, or apply filters to track the + // spending of specific teams, projects, or workspaces. + Budgets billing.BudgetsInterface + // These APIs manage credential configurations for this workspace. // Databricks needs access to a cross-account service IAM role in your AWS // account so that Databricks can deploy clusters in the appropriate VPC for @@ -410,12 +416,6 @@ type AccountClient struct { // platform or on a select custom plan that allows multiple workspaces per // account. Workspaces provisioning.WorkspacesInterface - - // These APIs manage budget configurations for this account. Budgets enable - // you to monitor usage across your account. You can set up budgets to - // either track account-wide spending, or apply filters to track the - // spending of specific teams, projects, or workspaces. - Budgets billing.BudgetsInterface } var ErrNotAccountClient = errors.New("invalid Databricks Account configuration") @@ -449,6 +449,7 @@ func NewAccountClient(c ...*Config) (*AccountClient, error) { AccessControl: iam.NewAccountAccessControl(apiClient), BillableUsage: billing.NewBillableUsage(apiClient), BudgetPolicy: billing.NewBudgetPolicy(apiClient), + Budgets: billing.NewBudgets(apiClient), Credentials: provisioning.NewCredentials(apiClient), CustomAppIntegration: oauth2.NewCustomAppIntegration(apiClient), EncryptionKeys: provisioning.NewEncryptionKeys(apiClient), @@ -476,6 +477,5 @@ func NewAccountClient(c ...*Config) (*AccountClient, error) { WorkspaceAssignment: iam.NewWorkspaceAssignment(apiClient), WorkspaceNetworkConfiguration: settings.NewWorkspaceNetworkConfiguration(apiClient), Workspaces: provisioning.NewWorkspaces(apiClient), - Budgets: billing.NewBudgets(apiClient), }, nil } diff --git a/experimental/mocks/mock_account_client.go b/experimental/mocks/mock_account_client.go index 4fe986b31..543978a7b 100755 --- a/experimental/mocks/mock_account_client.go +++ b/experimental/mocks/mock_account_client.go @@ -33,6 +33,7 @@ func NewMockAccountClient(t interface { AccessControl: iam.NewMockAccountAccessControlInterface(t), BillableUsage: billing.NewMockBillableUsageInterface(t), BudgetPolicy: billing.NewMockBudgetPolicyInterface(t), + Budgets: billing.NewMockBudgetsInterface(t), Credentials: provisioning.NewMockCredentialsInterface(t), CustomAppIntegration: oauth2.NewMockCustomAppIntegrationInterface(t), EncryptionKeys: provisioning.NewMockEncryptionKeysInterface(t), @@ -60,7 +61,6 @@ func NewMockAccountClient(t interface { WorkspaceAssignment: iam.NewMockWorkspaceAssignmentInterface(t), WorkspaceNetworkConfiguration: settings.NewMockWorkspaceNetworkConfigurationInterface(t), Workspaces: provisioning.NewMockWorkspacesInterface(t), - Budgets: billing.NewMockBudgetsInterface(t), }, } @@ -170,6 +170,14 @@ func (m *MockAccountClient) GetMockBudgetPolicyAPI() *billing.MockBudgetPolicyIn return api } +func (m *MockAccountClient) GetMockBudgetsAPI() *billing.MockBudgetsInterface { + api, ok := m.AccountClient.Budgets.(*billing.MockBudgetsInterface) + if !ok { + panic(fmt.Sprintf("expected Budgets to be *billing.MockBudgetsInterface, actual was %T", m.AccountClient.Budgets)) + } + return api +} + func (m *MockAccountClient) GetMockCredentialsAPI() *provisioning.MockCredentialsInterface { api, ok := m.AccountClient.Credentials.(*provisioning.MockCredentialsInterface) if !ok { @@ -385,11 +393,3 @@ func (m *MockAccountClient) GetMockWorkspacesAPI() *provisioning.MockWorkspacesI } return api } - -func (m *MockAccountClient) GetMockbudgetsAPI() *billing.MockBudgetsInterface { - api, ok := m.AccountClient.Budgets.(*billing.MockBudgetsInterface) - if !ok { - panic(fmt.Sprintf("expected Budgets to be *billing.MockBudgetsInterface, actual was %T", m.AccountClient.Budgets)) - } - return api -} diff --git a/experimental/mocks/mock_workspace_client.go b/experimental/mocks/mock_workspace_client.go index ba1a01a92..eb808452e 100755 --- a/experimental/mocks/mock_workspace_client.go +++ b/experimental/mocks/mock_workspace_client.go @@ -81,6 +81,7 @@ func NewMockWorkspaceClient(t interface { ExternalMetadata: catalog.NewMockExternalMetadataInterface(t), FeatureStore: ml.NewMockFeatureStoreInterface(t), Files: files.NewMockFilesInterface(t), + Forecasting: ml.NewMockForecastingInterface(t), Functions: catalog.NewMockFunctionsInterface(t), Genie: dashboards.NewMockGenieInterface(t), GitCredentials: workspace.NewMockGitCredentialsInterface(t), @@ -152,7 +153,6 @@ func NewMockWorkspaceClient(t interface { Workspace: workspace.NewMockWorkspaceInterface(t), WorkspaceBindings: catalog.NewMockWorkspaceBindingsInterface(t), WorkspaceConf: settings.NewMockWorkspaceConfInterface(t), - Forecasting: ml.NewMockForecastingInterface(t), }, } @@ -625,6 +625,14 @@ func (m *MockWorkspaceClient) GetMockFilesAPI() *files.MockFilesInterface { return api } +func (m *MockWorkspaceClient) GetMockForecastingAPI() *ml.MockForecastingInterface { + api, ok := m.WorkspaceClient.Forecasting.(*ml.MockForecastingInterface) + if !ok { + panic(fmt.Sprintf("expected Forecasting to be *ml.MockForecastingInterface, actual was %T", m.WorkspaceClient.Forecasting)) + } + return api +} + func (m *MockWorkspaceClient) GetMockFunctionsAPI() *catalog.MockFunctionsInterface { api, ok := m.WorkspaceClient.Functions.(*catalog.MockFunctionsInterface) if !ok { @@ -1192,11 +1200,3 @@ func (m *MockWorkspaceClient) GetMockWorkspaceConfAPI() *settings.MockWorkspaceC } return api } - -func (m *MockWorkspaceClient) GetMockForecastingAPI() *ml.MockForecastingInterface { - api, ok := m.WorkspaceClient.Forecasting.(*ml.MockForecastingInterface) - if !ok { - panic(fmt.Sprintf("expected Forecasting to be *ml.MockForecastingInterface, actual was %T", m.WorkspaceClient.Forecasting)) - } - return api -} diff --git a/experimental/mocks/service/sql/mock_dashboards_interface.go b/experimental/mocks/service/sql/mock_dashboards_interface.go index 1c181f76d..62dc722ab 100644 --- a/experimental/mocks/service/sql/mock_dashboards_interface.go +++ b/experimental/mocks/service/sql/mock_dashboards_interface.go @@ -24,65 +24,6 @@ func (_m *MockDashboardsInterface) EXPECT() *MockDashboardsInterface_Expecter { return &MockDashboardsInterface_Expecter{mock: &_m.Mock} } -// Create provides a mock function with given fields: ctx, request -func (_m *MockDashboardsInterface) Create(ctx context.Context, request sql.DashboardPostContent) (*sql.Dashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sql.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.DashboardPostContent) (*sql.Dashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.DashboardPostContent) *sql.Dashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.DashboardPostContent) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDashboardsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockDashboardsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sql.DashboardPostContent -func (_e *MockDashboardsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockDashboardsInterface_Create_Call { - return &MockDashboardsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockDashboardsInterface_Create_Call) Run(run func(ctx context.Context, request sql.DashboardPostContent)) *MockDashboardsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.DashboardPostContent)) - }) - return _c -} - -func (_c *MockDashboardsInterface_Create_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDashboardsInterface_Create_Call) RunAndReturn(run func(context.Context, sql.DashboardPostContent) (*sql.Dashboard, error)) *MockDashboardsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - // Delete provides a mock function with given fields: ctx, request func (_m *MockDashboardsInterface) Delete(ctx context.Context, request sql.DeleteDashboardRequest) error { ret := _m.Called(ctx, request) diff --git a/service/aibuilder/api.go b/service/aibuilder/api.go index 2895bb132..403da2347 100755 --- a/service/aibuilder/api.go +++ b/service/aibuilder/api.go @@ -1,6 +1,7 @@ // Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. -// The Custom LLMs service manages state and powers the UI for the Custom LLM product. +// The Custom LLMs service manages state and powers the UI for the Custom LLM +// product. package aibuilder import ( diff --git a/service/apps/api.go b/service/apps/api.go index 38a71b1ac..5ead2c444 100755 --- a/service/apps/api.go +++ b/service/apps/api.go @@ -1,6 +1,8 @@ // Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. -// Apps run directly on a customer’s Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. +// Apps run directly on a customer’s Databricks instance, integrate with their +// data, use and extend Databricks services, and enable users to interact +// through single sign-on. package apps import ( diff --git a/service/billing/impl.go b/service/billing/impl.go index db5ded6ff..b4f232bee 100755 --- a/service/billing/impl.go +++ b/service/billing/impl.go @@ -119,7 +119,7 @@ func (a *budgetPolicyImpl) Update(ctx context.Context, request UpdateBudgetPolic return &budgetPolicy, err } -// unexported type that holds implementations of just budgets API methods +// unexported type that holds implementations of just Budgets API methods type budgetsImpl struct { client *client.DatabricksClient } diff --git a/service/catalog/model.go b/service/catalog/model.go index db2ac9f18..3b1b27878 100755 --- a/service/catalog/model.go +++ b/service/catalog/model.go @@ -747,6 +747,7 @@ func (s ConnectionDependency) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// Next ID: 23 type ConnectionInfo struct { // User-provided free-form text description. Comment string `json:"comment,omitempty"` @@ -760,6 +761,9 @@ type ConnectionInfo struct { CreatedBy string `json:"created_by,omitempty"` // The type of credential. CredentialType CredentialType `json:"credential_type,omitempty"` + // [Create,Update:OPT] Connection environment settings as + // EnvironmentSettings object. + EnvironmentSettings *EnvironmentSettings `json:"environment_settings,omitempty"` // Full name of connection. FullName string `json:"full_name,omitempty"` // Unique identifier of parent metastore. @@ -949,6 +953,9 @@ type CreateConnection struct { Comment string `json:"comment,omitempty"` // The type of connection. ConnectionType ConnectionType `json:"connection_type"` + // [Create,Update:OPT] Connection environment settings as + // EnvironmentSettings object. + EnvironmentSettings *EnvironmentSettings `json:"environment_settings,omitempty"` // Name of the connection. Name string `json:"name"` // A map of key-value properties attached to the securable. @@ -2353,13 +2360,29 @@ type EncryptionDetails struct { SseEncryptionDetails *SseEncryptionDetails `json:"sse_encryption_details,omitempty"` } +type EnvironmentSettings struct { + EnvironmentVersion string `json:"environment_version,omitempty"` + + JavaDependencies []string `json:"java_dependencies,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *EnvironmentSettings) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s EnvironmentSettings) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type ExistsRequest struct { // Full name of the table. FullName string `json:"-" url:"-"` } type ExternalLineageExternalMetadata struct { - Name string `json:"name,omitempty"` + Name string `json:"name,omitempty" url:"name,omitempty"` ForceSendFields []string `json:"-" url:"-"` } @@ -2433,9 +2456,9 @@ type ExternalLineageInfo struct { } type ExternalLineageModelVersion struct { - Name string `json:"name,omitempty"` + Name string `json:"name,omitempty" url:"name,omitempty"` - Version string `json:"version,omitempty"` + Version string `json:"version,omitempty" url:"version,omitempty"` ForceSendFields []string `json:"-" url:"-"` } @@ -2469,17 +2492,17 @@ func (s ExternalLineageModelVersionInfo) MarshalJSON() ([]byte, error) { } type ExternalLineageObject struct { - ExternalMetadata *ExternalLineageExternalMetadata `json:"external_metadata,omitempty"` + ExternalMetadata *ExternalLineageExternalMetadata `json:"external_metadata,omitempty" url:"external_metadata,omitempty"` - ModelVersion *ExternalLineageModelVersion `json:"model_version,omitempty"` + ModelVersion *ExternalLineageModelVersion `json:"model_version,omitempty" url:"model_version,omitempty"` - Path *ExternalLineagePath `json:"path,omitempty"` + Path *ExternalLineagePath `json:"path,omitempty" url:"path,omitempty"` - Table *ExternalLineageTable `json:"table,omitempty"` + Table *ExternalLineageTable `json:"table,omitempty" url:"table,omitempty"` } type ExternalLineagePath struct { - Url string `json:"url,omitempty"` + Url string `json:"url,omitempty" url:"url,omitempty"` ForceSendFields []string `json:"-" url:"-"` } @@ -2539,7 +2562,7 @@ func (s ExternalLineageRelationshipInfo) MarshalJSON() ([]byte, error) { } type ExternalLineageTable struct { - Name string `json:"name,omitempty"` + Name string `json:"name,omitempty" url:"name,omitempty"` ForceSendFields []string `json:"-" url:"-"` } @@ -3856,11 +3879,15 @@ func (s ListCredentialsResponse) MarshalJSON() ([]byte, error) { type ListExternalLineageRelationshipsRequest struct { // The lineage direction to filter on. LineageDirection LineageDirection `json:"-" url:"lineage_direction"` - // The object to query external lineage relationship on. + // The object to query external lineage relationships for. Since this field + // is a query parameter, please flatten the nested fields. For example, if + // the object is a table, the query parameter should look like: + // `object_info.table.name=main.sales.customers` ObjectInfo ExternalLineageObject `json:"-" url:"object_info"` - + // Specifies the maximum number of external lineage relationships to return + // in a single response. The value must be less than or equal to 1000. PageSize int `json:"-" url:"page_size,omitempty"` - + // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` ForceSendFields []string `json:"-" url:"-"` @@ -3935,8 +3962,10 @@ func (s ListExternalLocationsResponse) MarshalJSON() ([]byte, error) { } type ListExternalMetadataRequest struct { + // Specifies the maximum number of external metadata objects to return in a + // single response. The value must be less than or equal to 1000. PageSize int `json:"-" url:"page_size,omitempty"` - + // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` ForceSendFields []string `json:"-" url:"-"` @@ -6397,9 +6426,9 @@ func (s SetArtifactAllowlist) MarshalJSON() ([]byte, error) { type SetRegisteredModelAliasRequest struct { // The name of the alias - Alias string `json:"alias" url:"-"` + Alias string `json:"alias"` // Full name of the registered model - FullName string `json:"full_name" url:"-"` + FullName string `json:"full_name"` // The version number of the model version to which the alias points VersionNum int `json:"version_num"` } @@ -6975,6 +7004,9 @@ type UpdateCatalogWorkspaceBindingsResponse struct { } type UpdateConnection struct { + // [Create,Update:OPT] Connection environment settings as + // EnvironmentSettings object. + EnvironmentSettings *EnvironmentSettings `json:"environment_settings,omitempty"` // Name of the connection. Name string `json:"-" url:"-"` // New name for the connection. diff --git a/service/cleanrooms/model.go b/service/cleanrooms/model.go index e10f47fc7..6eac2286c 100755 --- a/service/cleanrooms/model.go +++ b/service/cleanrooms/model.go @@ -703,7 +703,8 @@ func (s ComplianceSecurityProfile) MarshalJSON() ([]byte, error) { type CreateCleanRoomAssetRequest struct { Asset CleanRoomAsset `json:"asset"` - // Name of the clean room. + // The name of the clean room this asset belongs to. This is an output-only + // field to ensure proper resource identification. CleanRoomName string `json:"-" url:"-"` } diff --git a/service/database/model.go b/service/database/model.go index 3df233c4d..c8b774215 100755 --- a/service/database/model.go +++ b/service/database/model.go @@ -620,10 +620,16 @@ func (s ListDatabaseInstancesResponse) MarshalJSON() ([]byte, error) { // SyncedDatabaseTable. Note that other fields of pipeline are still inferred by // table def internally type NewPipelineSpec struct { + // This field needs to be specified if the destination catalog is a managed + // postgres catalog. + // // UC catalog for the pipeline to store intermediate files (checkpoints, // event logs etc). This needs to be a standard catalog where the user has // permissions to create Delta tables. StorageCatalog string `json:"storage_catalog,omitempty"` + // This field needs to be specified if the destination catalog is a managed + // postgres catalog. + // // UC schema for the pipeline to store intermediate files (checkpoints, // event logs etc). This needs to be in the standard catalog where the user // has permissions to create Delta tables. @@ -940,15 +946,24 @@ type SyncedTableSpec struct { // If true, the synced table's logical database and schema resources in PG // will be created if they do not already exist. CreateDatabaseObjectsIfMissing bool `json:"create_database_objects_if_missing,omitempty"` - // User-specified ID of a pre-existing pipeline to bin pack. This field is - // optional, and should be empty if new_pipeline_spec is set. This field - // will only be set by the server in response messages if it is specified in - // the request. The SyncedTableStatus message will always contain the - // effective pipeline ID (either client provided or server generated), - // however. + // At most one of existing_pipeline_id and new_pipeline_spec should be + // defined. + // + // If existing_pipeline_id is defined, the synced table will be bin packed + // into the existing pipeline referenced. This avoids creating a new + // pipeline and allows sharing existing compute. In this case, the + // scheduling_policy of this synced table must match the scheduling policy + // of the existing pipeline. ExistingPipelineId string `json:"existing_pipeline_id,omitempty"` - // Spec of new pipeline. Should be empty if pipeline_id / - // existing_pipeline_id is set + // At most one of existing_pipeline_id and new_pipeline_spec should be + // defined. + // + // If new_pipeline_spec is defined, a new pipeline is created for this + // synced table. The location pointed to is used to store intermediate files + // (checkpoints, event logs etc). The caller must have write permissions to + // create Delta tables in the specified catalog and schema. Again, note this + // requires write permissions, whereas the source table only requires read + // permissions. NewPipelineSpec *NewPipelineSpec `json:"new_pipeline_spec,omitempty"` // Primary Key columns to be used for data insert/update in the destination. PrimaryKeyColumns []string `json:"primary_key_columns,omitempty"` diff --git a/service/iam/model.go b/service/iam/model.go index a24c91877..712971ccc 100755 --- a/service/iam/model.go +++ b/service/iam/model.go @@ -125,7 +125,7 @@ func (s ComplexValue) MarshalJSON() ([]byte, error) { } type ConsistencyToken struct { - Value string `json:"value"` + Value string `json:"value" url:"value"` } type DeleteAccountGroupRequest struct { @@ -396,7 +396,7 @@ type Group struct { Groups []ComplexValue `json:"groups,omitempty"` // Databricks group ID - Id string `json:"id,omitempty" url:"-"` + Id string `json:"id,omitempty"` Members []ComplexValue `json:"members,omitempty"` // Container for the group identifier. Workspace local versus account. @@ -1432,7 +1432,7 @@ type ServicePrincipal struct { Groups []ComplexValue `json:"groups,omitempty"` // Databricks service principal ID. - Id string `json:"id,omitempty" url:"-"` + Id string `json:"id,omitempty"` // Corresponds to AWS instance profile/arn role. Roles []ComplexValue `json:"roles,omitempty"` // The schema of the List response. @@ -1550,7 +1550,7 @@ type User struct { Groups []ComplexValue `json:"groups,omitempty"` // Databricks user ID. - Id string `json:"id,omitempty" url:"-"` + Id string `json:"id,omitempty"` Name *Name `json:"name,omitempty"` // Corresponds to AWS instance profile/arn role. diff --git a/service/marketplace/model.go b/service/marketplace/model.go index 290694ad2..51cc1b151 100755 --- a/service/marketplace/model.go +++ b/service/marketplace/model.go @@ -704,9 +704,9 @@ func (s FileInfo) MarshalJSON() ([]byte, error) { } type FileParent struct { - FileParentType FileParentType `json:"file_parent_type,omitempty"` + FileParentType FileParentType `json:"file_parent_type,omitempty" url:"file_parent_type,omitempty"` // TODO make the following fields required - ParentId string `json:"parent_id,omitempty"` + ParentId string `json:"parent_id,omitempty" url:"parent_id,omitempty"` ForceSendFields []string `json:"-" url:"-"` } @@ -1668,10 +1668,10 @@ func (s ListingSummary) MarshalJSON() ([]byte, error) { type ListingTag struct { // Tag name (enum) - TagName ListingTagType `json:"tag_name,omitempty"` + TagName ListingTagType `json:"tag_name,omitempty" url:"tag_name,omitempty"` // String representation of the tag value. Values should be string literals // (no complex types) - TagValues []string `json:"tag_values,omitempty"` + TagValues []string `json:"tag_values,omitempty" url:"tag_values,omitempty"` } type ListingTagType string diff --git a/service/ml/impl.go b/service/ml/impl.go index a9d248b8a..83cfb3423 100755 --- a/service/ml/impl.go +++ b/service/ml/impl.go @@ -688,7 +688,7 @@ func (a *featureStoreImpl) UpdateOnlineStore(ctx context.Context, request Update return &onlineStore, err } -// unexported type that holds implementations of just forecasting API methods +// unexported type that holds implementations of just Forecasting API methods type forecastingImpl struct { client *client.DatabricksClient } diff --git a/service/pipelines/api.go b/service/pipelines/api.go index 30a1bc5b1..d843e562a 100755 --- a/service/pipelines/api.go +++ b/service/pipelines/api.go @@ -1,6 +1,19 @@ // Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. -// The Delta Live Tables API allows you to create, edit, delete, start, and view details about pipelines. +// The Delta Live Tables API allows you to create, edit, delete, start, and view +// details about pipelines. +// +// Delta Live Tables is a framework for building reliable, maintainable, and +// testable data processing pipelines. You define the transformations to perform +// on your data, and Delta Live Tables manages task orchestration, cluster +// management, monitoring, data quality, and error handling. +// +// Instead of defining your data pipelines using a series of separate Apache +// Spark tasks, Delta Live Tables manages how your data is transformed based on +// a target schema you define for each processing step. You can also enforce +// data quality with Delta Live Tables expectations. Expectations allow you to +// define expected data quality and specify how to handle records that fail +// those expectations. package pipelines import ( diff --git a/service/pipelines/model.go b/service/pipelines/model.go index 72cf6aff1..bb737ccc3 100755 --- a/service/pipelines/model.go +++ b/service/pipelines/model.go @@ -618,6 +618,45 @@ func (s IngestionPipelineDefinition) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// Configurations that are only applicable for query-based ingestion connectors. +type IngestionPipelineDefinitionTableSpecificConfigQueryBasedConnectorConfig struct { + // The names of the monotonically increasing columns in the source table + // that are used to enable the table to be read and ingested incrementally + // through structured streaming. The columns are allowed to have repeated + // values but have to be non-decreasing. If the source data is merged into + // the destination (e.g., using SCD Type 1 or Type 2), these columns will + // implicitly define the `sequence_by` behavior. You can still explicitly + // set `sequence_by` to override this default. + CursorColumns []string `json:"cursor_columns,omitempty"` + // Specifies a SQL WHERE condition that specifies that the source row has + // been deleted. This is sometimes referred to as "soft-deletes". For + // example: "Operation = 'DELETE'" or "is_deleted = true". This field is + // orthogonal to `hard_deletion_sync_interval_in_seconds`, one for + // soft-deletes and the other for hard-deletes. See also the + // hard_deletion_sync_min_interval_in_seconds field for handling of "hard + // deletes" where the source rows are physically removed from the table. + DeletionCondition string `json:"deletion_condition,omitempty"` + // Specifies the minimum interval (in seconds) between snapshots on primary + // keys for detecting and synchronizing hard deletions—i.e., rows that + // have been physically removed from the source table. This interval acts as + // a lower bound. If ingestion runs less frequently than this value, hard + // deletion synchronization will align with the actual ingestion frequency + // instead of happening more often. If not set, hard deletion + // synchronization via snapshots is disabled. This field is mutable and can + // be updated without triggering a full snapshot. + HardDeletionSyncMinIntervalInSeconds int64 `json:"hard_deletion_sync_min_interval_in_seconds,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *IngestionPipelineDefinitionTableSpecificConfigQueryBasedConnectorConfig) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s IngestionPipelineDefinitionTableSpecificConfigQueryBasedConnectorConfig) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type IngestionSourceType string const IngestionSourceTypeBigquery IngestionSourceType = `BIGQUERY` @@ -630,6 +669,8 @@ const IngestionSourceTypeGa4RawData IngestionSourceType = `GA4_RAW_DATA` const IngestionSourceTypeManagedPostgresql IngestionSourceType = `MANAGED_POSTGRESQL` +const IngestionSourceTypeMetaMarketing IngestionSourceType = `META_MARKETING` + const IngestionSourceTypeMysql IngestionSourceType = `MYSQL` const IngestionSourceTypeNetsuite IngestionSourceType = `NETSUITE` @@ -658,11 +699,11 @@ func (f *IngestionSourceType) String() string { // Set raw string value and validate it against allowed values func (f *IngestionSourceType) Set(v string) error { switch v { - case `BIGQUERY`, `CONFLUENCE`, `DYNAMICS365`, `GA4_RAW_DATA`, `MANAGED_POSTGRESQL`, `MYSQL`, `NETSUITE`, `ORACLE`, `POSTGRESQL`, `SALESFORCE`, `SERVICENOW`, `SHAREPOINT`, `SQLSERVER`, `TERADATA`, `WORKDAY_RAAS`: + case `BIGQUERY`, `CONFLUENCE`, `DYNAMICS365`, `GA4_RAW_DATA`, `MANAGED_POSTGRESQL`, `META_MARKETING`, `MYSQL`, `NETSUITE`, `ORACLE`, `POSTGRESQL`, `SALESFORCE`, `SERVICENOW`, `SHAREPOINT`, `SQLSERVER`, `TERADATA`, `WORKDAY_RAAS`: *f = IngestionSourceType(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "BIGQUERY", "CONFLUENCE", "DYNAMICS365", "GA4_RAW_DATA", "MANAGED_POSTGRESQL", "MYSQL", "NETSUITE", "ORACLE", "POSTGRESQL", "SALESFORCE", "SERVICENOW", "SHAREPOINT", "SQLSERVER", "TERADATA", "WORKDAY_RAAS"`, v) + return fmt.Errorf(`value "%s" is not one of "BIGQUERY", "CONFLUENCE", "DYNAMICS365", "GA4_RAW_DATA", "MANAGED_POSTGRESQL", "META_MARKETING", "MYSQL", "NETSUITE", "ORACLE", "POSTGRESQL", "SALESFORCE", "SERVICENOW", "SHAREPOINT", "SQLSERVER", "TERADATA", "WORKDAY_RAAS"`, v) } } @@ -676,6 +717,7 @@ func (f *IngestionSourceType) Values() []IngestionSourceType { IngestionSourceTypeDynamics365, IngestionSourceTypeGa4RawData, IngestionSourceTypeManagedPostgresql, + IngestionSourceTypeMetaMarketing, IngestionSourceTypeMysql, IngestionSourceTypeNetsuite, IngestionSourceTypeOracle, @@ -1900,6 +1942,8 @@ type TableSpecificConfig struct { IncludeColumns []string `json:"include_columns,omitempty"` // The primary key of the table used to apply changes. PrimaryKeys []string `json:"primary_keys,omitempty"` + + QueryBasedConnectorConfig *IngestionPipelineDefinitionTableSpecificConfigQueryBasedConnectorConfig `json:"query_based_connector_config,omitempty"` // If true, formula fields defined in the table are included in the // ingestion. This setting is only valid for the Salesforce connector SalesforceIncludeFormulaFields bool `json:"salesforce_include_formula_fields,omitempty"` diff --git a/service/pkg.go b/service/pkg.go index 31af35fdc..3fc4eafbb 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -28,6 +28,8 @@ // // - [billing.BudgetPolicyAPI]: A service serves REST API about Budget policies. // +// - [billing.BudgetsAPI]: These APIs manage budget configurations for this account. +// // - [catalog.CatalogsAPI]: A catalog is the first layer of Unity Catalog’s three-level namespace. // // - [cleanrooms.CleanRoomAssetsAPI]: Clean room assets are data and code objects — Tables, volumes, and notebooks that are shared with the clean room. @@ -120,6 +122,8 @@ // // - [files.FilesAPI]: The Files API is a standard HTTP API that allows you to read, write, list, and delete files and directories by referring to their URI. // +// - [ml.ForecastingAPI]: The Forecasting API allows you to create and get serverless forecasting experiments. +// // - [catalog.FunctionsAPI]: Functions implement User-Defined Functions (UDFs) in Unity Catalog. // // - [dashboards.GenieAPI]: Genie provides a no-code experience for business users, powered by AI/BI. @@ -319,10 +323,6 @@ // - [settings.WorkspaceNetworkConfigurationAPI]: These APIs allow configuration of network settings for Databricks workspaces by selecting which network policy to associate with the workspace. // // - [provisioning.WorkspacesAPI]: These APIs manage workspaces for this account. -// -// - [billing.BudgetsAPI]: These APIs manage budget configurations for this account. -// -// - [ml.ForecastingAPI]: The Forecasting API allows you to create and get serverless forecasting experiments. package service import ( @@ -370,6 +370,7 @@ var ( _ *settings.AutomaticClusterUpdateAPI = nil _ *billing.BillableUsageAPI = nil _ *billing.BudgetPolicyAPI = nil + _ *billing.BudgetsAPI = nil _ *catalog.CatalogsAPI = nil _ *cleanrooms.CleanRoomAssetsAPI = nil _ *cleanrooms.CleanRoomTaskRunsAPI = nil @@ -416,6 +417,7 @@ var ( _ *ml.FeatureStoreAPI = nil _ *oauth2.AccountFederationPolicyAPI = nil _ *files.FilesAPI = nil + _ *ml.ForecastingAPI = nil _ *catalog.FunctionsAPI = nil _ *dashboards.GenieAPI = nil _ *workspace.GitCredentialsAPI = nil @@ -516,6 +518,4 @@ var ( _ *settings.WorkspaceConfAPI = nil _ *settings.WorkspaceNetworkConfigurationAPI = nil _ *provisioning.WorkspacesAPI = nil - _ *billing.BudgetsAPI = nil - _ *ml.ForecastingAPI = nil ) diff --git a/service/qualitymonitorv2/api.go b/service/qualitymonitorv2/api.go index 8497c1b4b..e93b2a9a9 100755 --- a/service/qualitymonitorv2/api.go +++ b/service/qualitymonitorv2/api.go @@ -1,6 +1,6 @@ // Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. -// Manage data quality of UC objects (currently support `schema`). +// Manage data quality of UC objects (currently support `schema`) package qualitymonitorv2 import ( diff --git a/service/sql/api.go b/service/sql/api.go index 4c5539109..9c9a4cdc9 100755 --- a/service/sql/api.go +++ b/service/sql/api.go @@ -444,12 +444,6 @@ func (a *DashboardWidgetsAPI) DeleteById(ctx context.Context, id string) error { type DashboardsInterface interface { - // Creates a new dashboard object. Only the name parameter is required in the - // POST request JSON body. Other fields can be included when duplicating - // dashboards with this API. Databricks does not recommend designing dashboards - // exclusively using this API.', - Create(ctx context.Context, request DashboardPostContent) (*Dashboard, error) - // Moves a dashboard to the trash. Trashed dashboards do not appear in list // views or searches, and cannot be shared. Delete(ctx context.Context, request DeleteDashboardRequest) error diff --git a/service/sql/dashboards_usage_test.go b/service/sql/dashboards_usage_test.go index 32c95a5ef..e4bb5f44b 100755 --- a/service/sql/dashboards_usage_test.go +++ b/service/sql/dashboards_usage_test.go @@ -4,8 +4,6 @@ package sql_test import ( "context" - "fmt" - "time" "github.com/databricks/databricks-sdk-go" "github.com/databricks/databricks-sdk-go/logger" @@ -13,89 +11,6 @@ import ( "github.com/databricks/databricks-sdk-go/service/sql" ) -func ExampleDashboardsAPI_Create_dashboards() { - ctx := context.Background() - w, err := databricks.NewWorkspaceClient() - if err != nil { - panic(err) - } - - created, err := w.Dashboards.Create(ctx, sql.DashboardPostContent{ - Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()), - }) - if err != nil { - panic(err) - } - logger.Infof(ctx, "found %v", created) - - // cleanup - - err = w.Dashboards.DeleteByDashboardId(ctx, created.Id) - if err != nil { - panic(err) - } - -} - -func ExampleDashboardsAPI_Delete_dashboards() { - ctx := context.Background() - w, err := databricks.NewWorkspaceClient() - if err != nil { - panic(err) - } - - created, err := w.Dashboards.Create(ctx, sql.DashboardPostContent{ - Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()), - }) - if err != nil { - panic(err) - } - logger.Infof(ctx, "found %v", created) - - err = w.Dashboards.DeleteByDashboardId(ctx, created.Id) - if err != nil { - panic(err) - } - - // cleanup - - err = w.Dashboards.DeleteByDashboardId(ctx, created.Id) - if err != nil { - panic(err) - } - -} - -func ExampleDashboardsAPI_Get_dashboards() { - ctx := context.Background() - w, err := databricks.NewWorkspaceClient() - if err != nil { - panic(err) - } - - created, err := w.Dashboards.Create(ctx, sql.DashboardPostContent{ - Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()), - }) - if err != nil { - panic(err) - } - logger.Infof(ctx, "found %v", created) - - byId, err := w.Dashboards.GetByDashboardId(ctx, created.Id) - if err != nil { - panic(err) - } - logger.Infof(ctx, "found %v", byId) - - // cleanup - - err = w.Dashboards.DeleteByDashboardId(ctx, created.Id) - if err != nil { - panic(err) - } - -} - func ExampleDashboardsAPI_List_dashboards() { ctx := context.Background() w, err := databricks.NewWorkspaceClient() @@ -108,36 +23,4 @@ func ExampleDashboardsAPI_List_dashboards() { panic(err) } logger.Infof(ctx, "found %v", all) - -} - -func ExampleDashboardsAPI_Restore_dashboards() { - ctx := context.Background() - w, err := databricks.NewWorkspaceClient() - if err != nil { - panic(err) - } - - created, err := w.Dashboards.Create(ctx, sql.DashboardPostContent{ - Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()), - }) - if err != nil { - panic(err) - } - logger.Infof(ctx, "found %v", created) - - err = w.Dashboards.Restore(ctx, sql.RestoreDashboardRequest{ - DashboardId: created.Id, - }) - if err != nil { - panic(err) - } - - // cleanup - - err = w.Dashboards.DeleteByDashboardId(ctx, created.Id) - if err != nil { - panic(err) - } - } diff --git a/service/sql/impl.go b/service/sql/impl.go index b003fa853..6f93fce35 100755 --- a/service/sql/impl.go +++ b/service/sql/impl.go @@ -289,17 +289,6 @@ type dashboardsImpl struct { client *client.DatabricksClient } -func (a *dashboardsImpl) Create(ctx context.Context, request DashboardPostContent) (*Dashboard, error) { - var dashboard Dashboard - path := "/api/2.0/preview/sql/dashboards" - queryParams := make(map[string]any) - headers := make(map[string]string) - headers["Accept"] = "application/json" - headers["Content-Type"] = "application/json" - err := a.client.Do(ctx, http.MethodPost, path, headers, queryParams, request, &dashboard) - return &dashboard, err -} - func (a *dashboardsImpl) Delete(ctx context.Context, request DeleteDashboardRequest) error { path := fmt.Sprintf("/api/2.0/preview/sql/dashboards/%v", request.DashboardId) queryParams := make(map[string]any) diff --git a/service/sql/interface.go b/service/sql/interface.go index 1e7059f7a..a62cd4bcd 100755 --- a/service/sql/interface.go +++ b/service/sql/interface.go @@ -145,12 +145,6 @@ type DashboardWidgetsService interface { // Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type DashboardsService interface { - // Creates a new dashboard object. Only the name parameter is required in - // the POST request JSON body. Other fields can be included when duplicating - // dashboards with this API. Databricks does not recommend designing - // dashboards exclusively using this API.', - Create(ctx context.Context, request DashboardPostContent) (*Dashboard, error) - // Moves a dashboard to the trash. Trashed dashboards do not appear in list // views or searches, and cannot be shared. Delete(ctx context.Context, request DeleteDashboardRequest) error diff --git a/service/sql/model.go b/service/sql/model.go index 7325497d0..8b861d577 100755 --- a/service/sql/model.go +++ b/service/sql/model.go @@ -1406,35 +1406,6 @@ func (s DashboardOptions) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -type DashboardPostContent struct { - // Indicates whether the dashboard filters are enabled - DashboardFiltersEnabled bool `json:"dashboard_filters_enabled,omitempty"` - // Indicates whether this dashboard object should appear in the current - // user's favorites list. - IsFavorite bool `json:"is_favorite,omitempty"` - // The title of this dashboard that appears in list views and at the top of - // the dashboard page. - Name string `json:"name"` - // The identifier of the workspace folder containing the object. - Parent string `json:"parent,omitempty"` - // Sets the **Run as** role for the object. Must be set to one of `"viewer"` - // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as - // owner" behavior) - RunAsRole RunAsRole `json:"run_as_role,omitempty"` - - Tags []string `json:"tags,omitempty"` - - ForceSendFields []string `json:"-" url:"-"` -} - -func (s *DashboardPostContent) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s DashboardPostContent) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - // A JSON object representing a DBSQL data source / SQL warehouse. type DataSource struct { // Data source ID maps to the ID of the data source used by the resource and diff --git a/workspace_client.go b/workspace_client.go index d7d7c5dba..75224d652 100755 --- a/workspace_client.go +++ b/workspace_client.go @@ -353,6 +353,10 @@ type WorkspaceClient struct { // [Unity Catalog volumes]: https://docs.databricks.com/en/connect/unity-catalog/volumes.html Files files.FilesInterface + // The Forecasting API allows you to create and get serverless forecasting + // experiments + Forecasting ml.ForecastingInterface + // Functions implement User-Defined Functions (UDFs) in Unity Catalog. // // The function implementation can be any SQL expression or Query, and it @@ -1205,10 +1209,6 @@ type WorkspaceClient struct { // This API allows updating known workspace settings for advanced users. WorkspaceConf settings.WorkspaceConfInterface - - // The Forecasting API allows you to create and get serverless forecasting - // experiments - Forecasting ml.ForecastingInterface } var ErrNotWorkspaceClient = errors.New("invalid Databricks Workspace configuration") @@ -1281,6 +1281,7 @@ func NewWorkspaceClient(c ...*Config) (*WorkspaceClient, error) { ExternalMetadata: catalog.NewExternalMetadata(databricksClient), FeatureStore: ml.NewFeatureStore(databricksClient), Files: files.NewFiles(databricksClient), + Forecasting: ml.NewForecasting(databricksClient), Functions: catalog.NewFunctions(databricksClient), Genie: dashboards.NewGenie(databricksClient), GitCredentials: workspace.NewGitCredentials(databricksClient), @@ -1352,6 +1353,5 @@ func NewWorkspaceClient(c ...*Config) (*WorkspaceClient, error) { Workspace: workspace.NewWorkspace(databricksClient), WorkspaceBindings: catalog.NewWorkspaceBindings(databricksClient), WorkspaceConf: settings.NewWorkspaceConf(databricksClient), - Forecasting: ml.NewForecasting(databricksClient), }, nil }