@pulumi/databricks 1.84.0 → 1.85.0-alpha.1770935371
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accountFederationPolicy.d.ts +0 -20
- package/accountFederationPolicy.js +0 -20
- package/accountFederationPolicy.js.map +1 -1
- package/accountNetworkPolicy.d.ts +0 -20
- package/accountNetworkPolicy.js +0 -20
- package/accountNetworkPolicy.js.map +1 -1
- package/accountSettingUserPreferenceV2.d.ts +0 -20
- package/accountSettingUserPreferenceV2.js +0 -20
- package/accountSettingUserPreferenceV2.js.map +1 -1
- package/accountSettingV2.d.ts +0 -20
- package/accountSettingV2.js +0 -20
- package/accountSettingV2.js.map +1 -1
- package/aibiDashboardEmbeddingAccessPolicySetting.d.ts +0 -22
- package/aibiDashboardEmbeddingAccessPolicySetting.js +0 -22
- package/aibiDashboardEmbeddingAccessPolicySetting.js.map +1 -1
- package/aibiDashboardEmbeddingApprovedDomainsSetting.d.ts +0 -22
- package/aibiDashboardEmbeddingApprovedDomainsSetting.js +0 -22
- package/aibiDashboardEmbeddingApprovedDomainsSetting.js.map +1 -1
- package/alert.d.ts +132 -11
- package/alert.js +132 -11
- package/alert.js.map +1 -1
- package/alertV2.d.ts +0 -20
- package/alertV2.js +0 -20
- package/alertV2.js.map +1 -1
- package/app.d.ts +0 -22
- package/app.js +0 -22
- package/app.js.map +1 -1
- package/appsSettingsCustomTemplate.d.ts +0 -20
- package/appsSettingsCustomTemplate.js +0 -20
- package/appsSettingsCustomTemplate.js.map +1 -1
- package/artifactAllowlist.d.ts +0 -22
- package/artifactAllowlist.js +0 -22
- package/artifactAllowlist.js.map +1 -1
- package/budget.d.ts +0 -22
- package/budget.js +0 -22
- package/budget.js.map +1 -1
- package/budgetPolicy.d.ts +0 -20
- package/budgetPolicy.js +0 -20
- package/budgetPolicy.js.map +1 -1
- package/catalog.d.ts +0 -22
- package/catalog.js +0 -22
- package/catalog.js.map +1 -1
- package/catalogWorkspaceBinding.d.ts +0 -22
- package/catalogWorkspaceBinding.js +0 -22
- package/catalogWorkspaceBinding.js.map +1 -1
- package/cluster.d.ts +54 -5
- package/cluster.js +54 -5
- package/cluster.js.map +1 -1
- package/clusterPolicy.d.ts +0 -22
- package/clusterPolicy.js +0 -22
- package/clusterPolicy.js.map +1 -1
- package/connection.d.ts +0 -22
- package/connection.js +0 -22
- package/connection.js.map +1 -1
- package/credential.d.ts +0 -22
- package/credential.js +0 -22
- package/credential.js.map +1 -1
- package/customAppIntegration.d.ts +0 -22
- package/customAppIntegration.js +0 -22
- package/customAppIntegration.js.map +1 -1
- package/dashboard.d.ts +0 -22
- package/dashboard.js +0 -22
- package/dashboard.js.map +1 -1
- package/dataQualityMonitor.d.ts +0 -20
- package/dataQualityMonitor.js +0 -20
- package/dataQualityMonitor.js.map +1 -1
- package/dataQualityRefresh.d.ts +0 -20
- package/dataQualityRefresh.js +0 -20
- package/dataQualityRefresh.js.map +1 -1
- package/databaseDatabaseCatalog.d.ts +0 -20
- package/databaseDatabaseCatalog.js +0 -20
- package/databaseDatabaseCatalog.js.map +1 -1
- package/databaseInstance.d.ts +0 -20
- package/databaseInstance.js +0 -20
- package/databaseInstance.js.map +1 -1
- package/databaseSyncedDatabaseTable.d.ts +0 -20
- package/databaseSyncedDatabaseTable.js +0 -20
- package/databaseSyncedDatabaseTable.js.map +1 -1
- package/dbfsFile.d.ts +0 -22
- package/dbfsFile.js +0 -22
- package/dbfsFile.js.map +1 -1
- package/defaultNamespaceSetting.d.ts +0 -22
- package/defaultNamespaceSetting.js +0 -22
- package/defaultNamespaceSetting.js.map +1 -1
- package/directory.d.ts +0 -22
- package/directory.js +0 -22
- package/directory.js.map +1 -1
- package/disableLegacyAccessSetting.d.ts +0 -6
- package/disableLegacyAccessSetting.js +0 -6
- package/disableLegacyAccessSetting.js.map +1 -1
- package/disableLegacyDbfsSetting.d.ts +0 -22
- package/disableLegacyDbfsSetting.js +0 -22
- package/disableLegacyDbfsSetting.js.map +1 -1
- package/disableLegacyFeaturesSetting.d.ts +0 -22
- package/disableLegacyFeaturesSetting.js +0 -22
- package/disableLegacyFeaturesSetting.js.map +1 -1
- package/entitlements.d.ts +0 -28
- package/entitlements.js +0 -28
- package/entitlements.js.map +1 -1
- package/entityTagAssignment.d.ts +0 -20
- package/entityTagAssignment.js +0 -20
- package/entityTagAssignment.js.map +1 -1
- package/externalLocation.d.ts +0 -22
- package/externalLocation.js +0 -22
- package/externalLocation.js.map +1 -1
- package/externalMetadata.d.ts +0 -20
- package/externalMetadata.js +0 -20
- package/externalMetadata.js.map +1 -1
- package/featureEngineeringFeature.d.ts +18 -20
- package/featureEngineeringFeature.js +0 -20
- package/featureEngineeringFeature.js.map +1 -1
- package/featureEngineeringKafkaConfig.d.ts +0 -20
- package/featureEngineeringKafkaConfig.js +0 -20
- package/featureEngineeringKafkaConfig.js.map +1 -1
- package/featureEngineeringMaterializedFeature.d.ts +0 -20
- package/featureEngineeringMaterializedFeature.js +0 -20
- package/featureEngineeringMaterializedFeature.js.map +1 -1
- package/file.d.ts +0 -22
- package/file.js +0 -22
- package/file.js.map +1 -1
- package/getFeatureEngineeringFeature.d.ts +6 -0
- package/getFeatureEngineeringFeature.js.map +1 -1
- package/gitCredential.d.ts +0 -22
- package/gitCredential.js +0 -22
- package/gitCredential.js.map +1 -1
- package/globalInitScript.d.ts +0 -22
- package/globalInitScript.js +0 -22
- package/globalInitScript.js.map +1 -1
- package/grant.d.ts +0 -22
- package/grant.js +0 -22
- package/grant.js.map +1 -1
- package/grants.d.ts +0 -22
- package/grants.js +0 -22
- package/grants.js.map +1 -1
- package/group.d.ts +0 -22
- package/group.js +0 -22
- package/group.js.map +1 -1
- package/groupMember.d.ts +0 -22
- package/groupMember.js +0 -22
- package/groupMember.js.map +1 -1
- package/instancePool.d.ts +0 -22
- package/instancePool.js +0 -22
- package/instancePool.js.map +1 -1
- package/instanceProfile.d.ts +0 -22
- package/instanceProfile.js +0 -22
- package/instanceProfile.js.map +1 -1
- package/ipAccessList.d.ts +0 -22
- package/ipAccessList.js +0 -22
- package/ipAccessList.js.map +1 -1
- package/job.d.ts +0 -22
- package/job.js +0 -22
- package/job.js.map +1 -1
- package/materializedFeaturesFeatureTag.d.ts +0 -20
- package/materializedFeaturesFeatureTag.js +0 -20
- package/materializedFeaturesFeatureTag.js.map +1 -1
- package/metastore.d.ts +0 -22
- package/metastore.js +0 -22
- package/metastore.js.map +1 -1
- package/metastoreAssignment.d.ts +0 -22
- package/metastoreAssignment.js +0 -22
- package/metastoreAssignment.js.map +1 -1
- package/metastoreDataAccess.d.ts +0 -22
- package/metastoreDataAccess.js +0 -22
- package/metastoreDataAccess.js.map +1 -1
- package/mlflowExperiment.d.ts +0 -22
- package/mlflowExperiment.js +0 -22
- package/mlflowExperiment.js.map +1 -1
- package/mlflowModel.d.ts +0 -22
- package/mlflowModel.js +0 -22
- package/mlflowModel.js.map +1 -1
- package/modelServing.d.ts +0 -22
- package/modelServing.js +0 -22
- package/modelServing.js.map +1 -1
- package/modelServingProvisionedThroughput.d.ts +0 -24
- package/modelServingProvisionedThroughput.js +0 -24
- package/modelServingProvisionedThroughput.js.map +1 -1
- package/mount.d.ts +329 -0
- package/mount.js +329 -0
- package/mount.js.map +1 -1
- package/mwsCredentials.d.ts +6 -22
- package/mwsCredentials.js +6 -22
- package/mwsCredentials.js.map +1 -1
- package/mwsCustomerManagedKeys.d.ts +9 -26
- package/mwsCustomerManagedKeys.js +9 -26
- package/mwsCustomerManagedKeys.js.map +1 -1
- package/mwsNccPrivateEndpointRule.d.ts +0 -20
- package/mwsNccPrivateEndpointRule.js +0 -20
- package/mwsNccPrivateEndpointRule.js.map +1 -1
- package/mwsNetworkConnectivityConfig.d.ts +0 -22
- package/mwsNetworkConnectivityConfig.js +0 -22
- package/mwsNetworkConnectivityConfig.js.map +1 -1
- package/mwsNetworks.d.ts +31 -26
- package/mwsNetworks.js +31 -26
- package/mwsNetworks.js.map +1 -1
- package/mwsPermissionAssignment.d.ts +0 -22
- package/mwsPermissionAssignment.js +0 -22
- package/mwsPermissionAssignment.js.map +1 -1
- package/mwsPrivateAccessSettings.d.ts +0 -20
- package/mwsPrivateAccessSettings.js +0 -20
- package/mwsPrivateAccessSettings.js.map +1 -1
- package/mwsStorageConfigurations.d.ts +8 -28
- package/mwsStorageConfigurations.js +8 -28
- package/mwsStorageConfigurations.js.map +1 -1
- package/mwsVpcEndpoint.d.ts +1 -1
- package/mwsVpcEndpoint.js +1 -1
- package/mwsWorkspaces.d.ts +0 -34
- package/mwsWorkspaces.js +0 -34
- package/mwsWorkspaces.js.map +1 -1
- package/notebook.d.ts +0 -22
- package/notebook.js +0 -22
- package/notebook.js.map +1 -1
- package/notificationDestination.d.ts +0 -22
- package/notificationDestination.js +0 -22
- package/notificationDestination.js.map +1 -1
- package/onlineStore.d.ts +0 -20
- package/onlineStore.js +0 -20
- package/onlineStore.js.map +1 -1
- package/onlineTable.d.ts +0 -22
- package/onlineTable.js +0 -22
- package/onlineTable.js.map +1 -1
- package/package.json +2 -2
- package/permissionAssignment.d.ts +0 -22
- package/permissionAssignment.js +0 -22
- package/permissionAssignment.js.map +1 -1
- package/permissions.d.ts +1 -1
- package/permissions.js +1 -1
- package/pipeline.d.ts +0 -22
- package/pipeline.js +0 -22
- package/pipeline.js.map +1 -1
- package/policyInfo.d.ts +0 -20
- package/policyInfo.js +0 -20
- package/policyInfo.js.map +1 -1
- package/postgresBranch.d.ts +0 -20
- package/postgresBranch.js +0 -20
- package/postgresBranch.js.map +1 -1
- package/postgresEndpoint.d.ts +0 -20
- package/postgresEndpoint.js +0 -20
- package/postgresEndpoint.js.map +1 -1
- package/postgresProject.d.ts +0 -20
- package/postgresProject.js +0 -20
- package/postgresProject.js.map +1 -1
- package/qualityMonitorV2.d.ts +0 -20
- package/qualityMonitorV2.js +0 -20
- package/qualityMonitorV2.js.map +1 -1
- package/query.d.ts +86 -11
- package/query.js +86 -11
- package/query.js.map +1 -1
- package/recipient.d.ts +0 -22
- package/recipient.js +0 -22
- package/recipient.js.map +1 -1
- package/registeredModel.d.ts +0 -22
- package/registeredModel.js +0 -22
- package/registeredModel.js.map +1 -1
- package/repo.d.ts +0 -22
- package/repo.js +0 -22
- package/repo.js.map +1 -1
- package/restrictWorkspaceAdminsSetting.d.ts +0 -22
- package/restrictWorkspaceAdminsSetting.js +0 -22
- package/restrictWorkspaceAdminsSetting.js.map +1 -1
- package/rfaAccessRequestDestinations.d.ts +0 -20
- package/rfaAccessRequestDestinations.js +0 -20
- package/rfaAccessRequestDestinations.js.map +1 -1
- package/schema.d.ts +0 -22
- package/schema.js +0 -22
- package/schema.js.map +1 -1
- package/secret.d.ts +0 -22
- package/secret.js +0 -22
- package/secret.js.map +1 -1
- package/secretAcl.d.ts +0 -22
- package/secretAcl.js +0 -22
- package/secretAcl.js.map +1 -1
- package/secretScope.d.ts +0 -22
- package/secretScope.js +0 -22
- package/secretScope.js.map +1 -1
- package/servicePrincipal.d.ts +0 -22
- package/servicePrincipal.js +0 -22
- package/servicePrincipal.js.map +1 -1
- package/servicePrincipalFederationPolicy.d.ts +0 -20
- package/servicePrincipalFederationPolicy.js +0 -20
- package/servicePrincipalFederationPolicy.js.map +1 -1
- package/share.d.ts +0 -22
- package/share.js +0 -22
- package/share.js.map +1 -1
- package/sqlAlert.d.ts +0 -22
- package/sqlAlert.js +0 -22
- package/sqlAlert.js.map +1 -1
- package/sqlDashboard.d.ts +0 -22
- package/sqlDashboard.js +0 -22
- package/sqlDashboard.js.map +1 -1
- package/sqlEndpoint.d.ts +0 -22
- package/sqlEndpoint.js +0 -22
- package/sqlEndpoint.js.map +1 -1
- package/sqlGlobalConfig.d.ts +0 -22
- package/sqlGlobalConfig.js +0 -22
- package/sqlGlobalConfig.js.map +1 -1
- package/sqlPermissions.d.ts +36 -34
- package/sqlPermissions.js +0 -34
- package/sqlPermissions.js.map +1 -1
- package/sqlQuery.d.ts +0 -22
- package/sqlQuery.js +0 -22
- package/sqlQuery.js.map +1 -1
- package/sqlTable.d.ts +206 -11
- package/sqlTable.js +197 -11
- package/sqlTable.js.map +1 -1
- package/sqlVisualization.d.ts +42 -12
- package/sqlVisualization.js +42 -12
- package/sqlVisualization.js.map +1 -1
- package/sqlWidget.d.ts +0 -22
- package/sqlWidget.js +0 -22
- package/sqlWidget.js.map +1 -1
- package/storageCredential.d.ts +0 -42
- package/storageCredential.js +0 -42
- package/storageCredential.js.map +1 -1
- package/systemSchema.d.ts +0 -22
- package/systemSchema.js +0 -22
- package/systemSchema.js.map +1 -1
- package/tagPolicy.d.ts +0 -20
- package/tagPolicy.js +0 -20
- package/tagPolicy.js.map +1 -1
- package/types/output.d.ts +6 -0
- package/user.d.ts +0 -22
- package/user.js +0 -22
- package/user.js.map +1 -1
- package/vectorSearchEndpoint.d.ts +0 -22
- package/vectorSearchEndpoint.js +0 -22
- package/vectorSearchEndpoint.js.map +1 -1
- package/vectorSearchIndex.d.ts +0 -22
- package/vectorSearchIndex.js +0 -22
- package/vectorSearchIndex.js.map +1 -1
- package/volume.d.ts +0 -22
- package/volume.js +0 -22
- package/volume.js.map +1 -1
- package/warehousesDefaultWarehouseOverride.d.ts +0 -20
- package/warehousesDefaultWarehouseOverride.js +0 -20
- package/warehousesDefaultWarehouseOverride.js.map +1 -1
- package/workspaceBinding.d.ts +20 -12
- package/workspaceBinding.js +20 -12
- package/workspaceBinding.js.map +1 -1
- package/workspaceEntityTagAssignment.d.ts +0 -20
- package/workspaceEntityTagAssignment.js +0 -20
- package/workspaceEntityTagAssignment.js.map +1 -1
- package/workspaceFile.d.ts +0 -22
- package/workspaceFile.js +0 -22
- package/workspaceFile.js.map +1 -1
- package/workspaceNetworkOption.d.ts +0 -20
- package/workspaceNetworkOption.js +0 -20
- package/workspaceNetworkOption.js.map +1 -1
- package/workspaceSettingV2.d.ts +0 -20
- package/workspaceSettingV2.js +0 -20
- package/workspaceSettingV2.js.map +1 -1
package/sqlTable.d.ts
CHANGED
|
@@ -2,27 +2,213 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
2
2
|
import * as inputs from "./types/input";
|
|
3
3
|
import * as outputs from "./types/output";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Within a metastore, Unity Catalog provides a 3-level namespace for organizing data: Catalogs, databases (also called schemas), and tables/views.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* A `databricks.SqlTable` is contained within databricks_schema, and can represent either a managed table, an external table, or a view.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* This resource creates and updates the Unity Catalog table/view by executing the necessary SQL queries on a special auto-terminating cluster it would create for this operation. You could also specify a SQL warehouse or cluster for the queries to be executed on.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* > This resource can only be used with a workspace-level provider!
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* > This resource doesn't handle complex cases of schema evolution due to the limitations of Pulumi itself. If you need to implement schema evolution it's recommended to use specialized tools, such as, [Liquibase](https://medium.com/dbsql-sme-engineering/advanced-schema-management-on-databricks-with-liquibase-1900e9f7b9c0) and [Flyway](https://medium.com/dbsql-sme-engineering/databricks-schema-management-with-flyway-527c4a9f5d67).
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* ## Example Usage
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
19
|
+
* import * as databricks from "@pulumi/databricks";
|
|
20
|
+
* import * as std from "@pulumi/std";
|
|
18
21
|
*
|
|
19
|
-
*
|
|
22
|
+
* const sandbox = new databricks.Catalog("sandbox", {
|
|
23
|
+
* name: "sandbox",
|
|
24
|
+
* comment: "this catalog is managed by terraform",
|
|
25
|
+
* properties: {
|
|
26
|
+
* purpose: "testing",
|
|
27
|
+
* },
|
|
28
|
+
* });
|
|
29
|
+
* const things = new databricks.Schema("things", {
|
|
30
|
+
* catalogName: sandbox.id,
|
|
31
|
+
* name: "things",
|
|
32
|
+
* comment: "this database is managed by terraform",
|
|
33
|
+
* properties: {
|
|
34
|
+
* kind: "various",
|
|
35
|
+
* },
|
|
36
|
+
* });
|
|
37
|
+
* const thing = new databricks.SqlTable("thing", {
|
|
38
|
+
* name: "quickstart_table",
|
|
39
|
+
* catalogName: sandbox.name,
|
|
40
|
+
* schemaName: things.name,
|
|
41
|
+
* tableType: "MANAGED",
|
|
42
|
+
* columns: [
|
|
43
|
+
* {
|
|
44
|
+
* name: "id",
|
|
45
|
+
* type: "int",
|
|
46
|
+
* },
|
|
47
|
+
* {
|
|
48
|
+
* name: "name",
|
|
49
|
+
* type: "string",
|
|
50
|
+
* comment: "name of thing",
|
|
51
|
+
* },
|
|
52
|
+
* ],
|
|
53
|
+
* comment: "this table is managed by terraform",
|
|
54
|
+
* });
|
|
55
|
+
* const thingView = new databricks.SqlTable("thing_view", {
|
|
56
|
+
* name: "quickstart_table_view",
|
|
57
|
+
* catalogName: sandbox.name,
|
|
58
|
+
* schemaName: things.name,
|
|
59
|
+
* tableType: "VIEW",
|
|
60
|
+
* clusterId: "0423-201305-xsrt82qn",
|
|
61
|
+
* viewDefinition: std.format({
|
|
62
|
+
* input: "SELECT name FROM %s WHERE id == 1",
|
|
63
|
+
* args: [thing.id],
|
|
64
|
+
* }).then(invoke => invoke.result),
|
|
65
|
+
* comment: "this view is managed by terraform",
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* ### Use an existing warehouse to create a table
|
|
70
|
+
*
|
|
71
|
+
* ```typescript
|
|
72
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
73
|
+
* import * as databricks from "@pulumi/databricks";
|
|
74
|
+
* import * as std from "@pulumi/std";
|
|
75
|
+
*
|
|
76
|
+
* const _this = new databricks.SqlEndpoint("this", {
|
|
77
|
+
* name: "endpoint",
|
|
78
|
+
* clusterSize: "2X-Small",
|
|
79
|
+
* maxNumClusters: 1,
|
|
80
|
+
* });
|
|
81
|
+
* const thing = new databricks.SqlTable("thing", {
|
|
82
|
+
* name: "quickstart_table",
|
|
83
|
+
* catalogName: sandbox.name,
|
|
84
|
+
* schemaName: things.name,
|
|
85
|
+
* tableType: "MANAGED",
|
|
86
|
+
* warehouseId: _this.id,
|
|
87
|
+
* columns: [
|
|
88
|
+
* {
|
|
89
|
+
* name: "id",
|
|
90
|
+
* type: "int",
|
|
91
|
+
* },
|
|
92
|
+
* {
|
|
93
|
+
* name: "name",
|
|
94
|
+
* type: "string",
|
|
95
|
+
* comment: "name of thing",
|
|
96
|
+
* },
|
|
97
|
+
* ],
|
|
98
|
+
* comment: "this table is managed by terraform",
|
|
99
|
+
* });
|
|
100
|
+
* const thingView = new databricks.SqlTable("thing_view", {
|
|
101
|
+
* name: "quickstart_table_view",
|
|
102
|
+
* catalogName: sandbox.name,
|
|
103
|
+
* schemaName: things.name,
|
|
104
|
+
* tableType: "VIEW",
|
|
105
|
+
* warehouseId: _this.id,
|
|
106
|
+
* viewDefinition: std.format({
|
|
107
|
+
* input: "SELECT name FROM %s WHERE id == 1",
|
|
108
|
+
* args: [thing.id],
|
|
109
|
+
* }).then(invoke => invoke.result),
|
|
110
|
+
* comment: "this view is managed by terraform",
|
|
111
|
+
* });
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* ## Use an Identity Column
|
|
115
|
+
*
|
|
116
|
+
* ```typescript
|
|
117
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
118
|
+
* import * as databricks from "@pulumi/databricks";
|
|
119
|
+
*
|
|
120
|
+
* const sandbox = new databricks.Catalog("sandbox", {
|
|
121
|
+
* name: "sandbox",
|
|
122
|
+
* comment: "this catalog is managed by terraform",
|
|
123
|
+
* properties: {
|
|
124
|
+
* purpose: "testing",
|
|
125
|
+
* },
|
|
126
|
+
* });
|
|
127
|
+
* const things = new databricks.Schema("things", {
|
|
128
|
+
* catalogName: sandbox.id,
|
|
129
|
+
* name: "things",
|
|
130
|
+
* comment: "this database is managed by terraform",
|
|
131
|
+
* properties: {
|
|
132
|
+
* kind: "various",
|
|
133
|
+
* },
|
|
134
|
+
* });
|
|
135
|
+
* const thing = new databricks.SqlTable("thing", {
|
|
136
|
+
* name: "identity_table",
|
|
137
|
+
* catalogName: sandbox.name,
|
|
138
|
+
* schemaName: things.name,
|
|
139
|
+
* tableType: "MANAGED",
|
|
140
|
+
* columns: [
|
|
141
|
+
* {
|
|
142
|
+
* name: "id",
|
|
143
|
+
* type: "bigint",
|
|
144
|
+
* identity: "default",
|
|
145
|
+
* },
|
|
146
|
+
* {
|
|
147
|
+
* name: "name",
|
|
148
|
+
* type: "string",
|
|
149
|
+
* comment: "name of thing",
|
|
150
|
+
* },
|
|
151
|
+
* ],
|
|
152
|
+
* comment: "this table is managed by terraform",
|
|
153
|
+
* });
|
|
154
|
+
* ```
|
|
155
|
+
*
|
|
156
|
+
* ## Enable automatic clustering
|
|
157
|
+
*
|
|
158
|
+
* ```typescript
|
|
159
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
160
|
+
* import * as databricks from "@pulumi/databricks";
|
|
161
|
+
*
|
|
162
|
+
* const thing = new databricks.SqlTable("thing", {
|
|
163
|
+
* name: "auto_cluster_table",
|
|
164
|
+
* catalogName: sandbox.name,
|
|
165
|
+
* schemaName: things.name,
|
|
166
|
+
* tableType: "MANAGED",
|
|
167
|
+
* clusterKeys: ["AUTO"],
|
|
168
|
+
* columns: [{
|
|
169
|
+
* name: "name",
|
|
170
|
+
* type: "string",
|
|
171
|
+
* comment: "name of thing",
|
|
172
|
+
* }],
|
|
173
|
+
* comment: "this table is managed by terraform",
|
|
174
|
+
* });
|
|
175
|
+
* ```
|
|
176
|
+
*
|
|
177
|
+
* ## Migration from `databricks.Table`
|
|
178
|
+
*
|
|
179
|
+
* The `databricks.Table` resource has been deprecated in favor of `databricks.SqlTable`. To migrate from `databricks.Table` to `databricks.SqlTable`:
|
|
20
180
|
*
|
|
21
|
-
*
|
|
181
|
+
* 1. Define a `databricks.SqlTable` resource with arguments corresponding to `databricks.Table`.
|
|
182
|
+
* 2. Add a `removed` block to remove the `databricks.Table` resource without deleting the existing table by using the `lifecycle` block. If you're using Pulumi version below v1.7.0, you will need to use the `terraform state rm` command instead.
|
|
183
|
+
* 3. Add an `import` block to add the `databricks.SqlTable` resource, corresponding to the existing table. If you're using Pulumi version below v1.5.0, you will need to use `pulumi import` command instead.
|
|
22
184
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
185
|
+
* For example, suppose we have the following `databricks.Table` resource:
|
|
186
|
+
*
|
|
187
|
+
* ```typescript
|
|
188
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
189
|
+
* import * as databricks from "@pulumi/databricks";
|
|
190
|
+
*
|
|
191
|
+
* const _this = new databricks.Table("this", {
|
|
192
|
+
* catalogName: "catalog",
|
|
193
|
+
* schemaName: "schema",
|
|
194
|
+
* name: "table",
|
|
195
|
+
* tableType: "MANAGED",
|
|
196
|
+
* dataSourceFormat: "DELTA",
|
|
197
|
+
* columns: [{
|
|
198
|
+
* name: "col1",
|
|
199
|
+
* typeName: "STRING",
|
|
200
|
+
* typeJson: "{\"type\":\"STRING\"}",
|
|
201
|
+
* comment: "comment",
|
|
202
|
+
* nullable: true,
|
|
203
|
+
* }],
|
|
204
|
+
* comment: "comment",
|
|
205
|
+
* properties: {
|
|
206
|
+
* key: "value",
|
|
207
|
+
* },
|
|
208
|
+
* });
|
|
25
209
|
* ```
|
|
210
|
+
*
|
|
211
|
+
* The migration would look like this:
|
|
26
212
|
*/
|
|
27
213
|
export declare class SqlTable extends pulumi.CustomResource {
|
|
28
214
|
/**
|
|
@@ -44,6 +230,9 @@ export declare class SqlTable extends pulumi.CustomResource {
|
|
|
44
230
|
* Name of parent catalog. Change forces the creation of a new resource.
|
|
45
231
|
*/
|
|
46
232
|
readonly catalogName: pulumi.Output<string>;
|
|
233
|
+
/**
|
|
234
|
+
* All table CRUD operations must be executed on a running cluster or SQL warehouse. If a clusterId is specified, it will be used to execute SQL commands to manage this table. If empty, a cluster will be created automatically with the name `terraform-sql-table`. Conflicts with `warehouseId`.
|
|
235
|
+
*/
|
|
47
236
|
readonly clusterId: pulumi.Output<string>;
|
|
48
237
|
/**
|
|
49
238
|
* a subset of columns to liquid cluster the table by. For automatic clustering, set `clusterKeys` to `["AUTO"]`. To turn off clustering, set it to `["NONE"]`. Conflicts with `partitions`.
|
|
@@ -130,6 +319,9 @@ export interface SqlTableState {
|
|
|
130
319
|
* Name of parent catalog. Change forces the creation of a new resource.
|
|
131
320
|
*/
|
|
132
321
|
catalogName?: pulumi.Input<string>;
|
|
322
|
+
/**
|
|
323
|
+
* All table CRUD operations must be executed on a running cluster or SQL warehouse. If a clusterId is specified, it will be used to execute SQL commands to manage this table. If empty, a cluster will be created automatically with the name `terraform-sql-table`. Conflicts with `warehouseId`.
|
|
324
|
+
*/
|
|
133
325
|
clusterId?: pulumi.Input<string>;
|
|
134
326
|
/**
|
|
135
327
|
* a subset of columns to liquid cluster the table by. For automatic clustering, set `clusterKeys` to `["AUTO"]`. To turn off clustering, set it to `["NONE"]`. Conflicts with `partitions`.
|
|
@@ -208,6 +400,9 @@ export interface SqlTableArgs {
|
|
|
208
400
|
* Name of parent catalog. Change forces the creation of a new resource.
|
|
209
401
|
*/
|
|
210
402
|
catalogName: pulumi.Input<string>;
|
|
403
|
+
/**
|
|
404
|
+
* All table CRUD operations must be executed on a running cluster or SQL warehouse. If a clusterId is specified, it will be used to execute SQL commands to manage this table. If empty, a cluster will be created automatically with the name `terraform-sql-table`. Conflicts with `warehouseId`.
|
|
405
|
+
*/
|
|
211
406
|
clusterId?: pulumi.Input<string>;
|
|
212
407
|
/**
|
|
213
408
|
* a subset of columns to liquid cluster the table by. For automatic clustering, set `clusterKeys` to `["AUTO"]`. To turn off clustering, set it to `["NONE"]`. Conflicts with `partitions`.
|
package/sqlTable.js
CHANGED
|
@@ -6,27 +6,213 @@ exports.SqlTable = void 0;
|
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Within a metastore, Unity Catalog provides a 3-level namespace for organizing data: Catalogs, databases (also called schemas), and tables/views.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* A `databricks.SqlTable` is contained within databricks_schema, and can represent either a managed table, an external table, or a view.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* This resource creates and updates the Unity Catalog table/view by executing the necessary SQL queries on a special auto-terminating cluster it would create for this operation. You could also specify a SQL warehouse or cluster for the queries to be executed on.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* > This resource can only be used with a workspace-level provider!
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* > This resource doesn't handle complex cases of schema evolution due to the limitations of Pulumi itself. If you need to implement schema evolution it's recommended to use specialized tools, such as, [Liquibase](https://medium.com/dbsql-sme-engineering/advanced-schema-management-on-databricks-with-liquibase-1900e9f7b9c0) and [Flyway](https://medium.com/dbsql-sme-engineering/databricks-schema-management-with-flyway-527c4a9f5d67).
|
|
18
18
|
*
|
|
19
|
-
*
|
|
19
|
+
* ## Example Usage
|
|
20
20
|
*
|
|
21
|
-
*
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
23
|
+
* import * as databricks from "@pulumi/databricks";
|
|
24
|
+
* import * as std from "@pulumi/std";
|
|
22
25
|
*
|
|
23
|
-
*
|
|
26
|
+
* const sandbox = new databricks.Catalog("sandbox", {
|
|
27
|
+
* name: "sandbox",
|
|
28
|
+
* comment: "this catalog is managed by terraform",
|
|
29
|
+
* properties: {
|
|
30
|
+
* purpose: "testing",
|
|
31
|
+
* },
|
|
32
|
+
* });
|
|
33
|
+
* const things = new databricks.Schema("things", {
|
|
34
|
+
* catalogName: sandbox.id,
|
|
35
|
+
* name: "things",
|
|
36
|
+
* comment: "this database is managed by terraform",
|
|
37
|
+
* properties: {
|
|
38
|
+
* kind: "various",
|
|
39
|
+
* },
|
|
40
|
+
* });
|
|
41
|
+
* const thing = new databricks.SqlTable("thing", {
|
|
42
|
+
* name: "quickstart_table",
|
|
43
|
+
* catalogName: sandbox.name,
|
|
44
|
+
* schemaName: things.name,
|
|
45
|
+
* tableType: "MANAGED",
|
|
46
|
+
* columns: [
|
|
47
|
+
* {
|
|
48
|
+
* name: "id",
|
|
49
|
+
* type: "int",
|
|
50
|
+
* },
|
|
51
|
+
* {
|
|
52
|
+
* name: "name",
|
|
53
|
+
* type: "string",
|
|
54
|
+
* comment: "name of thing",
|
|
55
|
+
* },
|
|
56
|
+
* ],
|
|
57
|
+
* comment: "this table is managed by terraform",
|
|
58
|
+
* });
|
|
59
|
+
* const thingView = new databricks.SqlTable("thing_view", {
|
|
60
|
+
* name: "quickstart_table_view",
|
|
61
|
+
* catalogName: sandbox.name,
|
|
62
|
+
* schemaName: things.name,
|
|
63
|
+
* tableType: "VIEW",
|
|
64
|
+
* clusterId: "0423-201305-xsrt82qn",
|
|
65
|
+
* viewDefinition: std.format({
|
|
66
|
+
* input: "SELECT name FROM %s WHERE id == 1",
|
|
67
|
+
* args: [thing.id],
|
|
68
|
+
* }).then(invoke => invoke.result),
|
|
69
|
+
* comment: "this view is managed by terraform",
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* ### Use an existing warehouse to create a table
|
|
74
|
+
*
|
|
75
|
+
* ```typescript
|
|
76
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
77
|
+
* import * as databricks from "@pulumi/databricks";
|
|
78
|
+
* import * as std from "@pulumi/std";
|
|
79
|
+
*
|
|
80
|
+
* const _this = new databricks.SqlEndpoint("this", {
|
|
81
|
+
* name: "endpoint",
|
|
82
|
+
* clusterSize: "2X-Small",
|
|
83
|
+
* maxNumClusters: 1,
|
|
84
|
+
* });
|
|
85
|
+
* const thing = new databricks.SqlTable("thing", {
|
|
86
|
+
* name: "quickstart_table",
|
|
87
|
+
* catalogName: sandbox.name,
|
|
88
|
+
* schemaName: things.name,
|
|
89
|
+
* tableType: "MANAGED",
|
|
90
|
+
* warehouseId: _this.id,
|
|
91
|
+
* columns: [
|
|
92
|
+
* {
|
|
93
|
+
* name: "id",
|
|
94
|
+
* type: "int",
|
|
95
|
+
* },
|
|
96
|
+
* {
|
|
97
|
+
* name: "name",
|
|
98
|
+
* type: "string",
|
|
99
|
+
* comment: "name of thing",
|
|
100
|
+
* },
|
|
101
|
+
* ],
|
|
102
|
+
* comment: "this table is managed by terraform",
|
|
103
|
+
* });
|
|
104
|
+
* const thingView = new databricks.SqlTable("thing_view", {
|
|
105
|
+
* name: "quickstart_table_view",
|
|
106
|
+
* catalogName: sandbox.name,
|
|
107
|
+
* schemaName: things.name,
|
|
108
|
+
* tableType: "VIEW",
|
|
109
|
+
* warehouseId: _this.id,
|
|
110
|
+
* viewDefinition: std.format({
|
|
111
|
+
* input: "SELECT name FROM %s WHERE id == 1",
|
|
112
|
+
* args: [thing.id],
|
|
113
|
+
* }).then(invoke => invoke.result),
|
|
114
|
+
* comment: "this view is managed by terraform",
|
|
115
|
+
* });
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* ## Use an Identity Column
|
|
119
|
+
*
|
|
120
|
+
* ```typescript
|
|
121
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
122
|
+
* import * as databricks from "@pulumi/databricks";
|
|
123
|
+
*
|
|
124
|
+
* const sandbox = new databricks.Catalog("sandbox", {
|
|
125
|
+
* name: "sandbox",
|
|
126
|
+
* comment: "this catalog is managed by terraform",
|
|
127
|
+
* properties: {
|
|
128
|
+
* purpose: "testing",
|
|
129
|
+
* },
|
|
130
|
+
* });
|
|
131
|
+
* const things = new databricks.Schema("things", {
|
|
132
|
+
* catalogName: sandbox.id,
|
|
133
|
+
* name: "things",
|
|
134
|
+
* comment: "this database is managed by terraform",
|
|
135
|
+
* properties: {
|
|
136
|
+
* kind: "various",
|
|
137
|
+
* },
|
|
138
|
+
* });
|
|
139
|
+
* const thing = new databricks.SqlTable("thing", {
|
|
140
|
+
* name: "identity_table",
|
|
141
|
+
* catalogName: sandbox.name,
|
|
142
|
+
* schemaName: things.name,
|
|
143
|
+
* tableType: "MANAGED",
|
|
144
|
+
* columns: [
|
|
145
|
+
* {
|
|
146
|
+
* name: "id",
|
|
147
|
+
* type: "bigint",
|
|
148
|
+
* identity: "default",
|
|
149
|
+
* },
|
|
150
|
+
* {
|
|
151
|
+
* name: "name",
|
|
152
|
+
* type: "string",
|
|
153
|
+
* comment: "name of thing",
|
|
154
|
+
* },
|
|
155
|
+
* ],
|
|
156
|
+
* comment: "this table is managed by terraform",
|
|
157
|
+
* });
|
|
158
|
+
* ```
|
|
24
159
|
*
|
|
25
|
-
*
|
|
160
|
+
* ## Enable automatic clustering
|
|
26
161
|
*
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
162
|
+
* ```typescript
|
|
163
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
164
|
+
* import * as databricks from "@pulumi/databricks";
|
|
165
|
+
*
|
|
166
|
+
* const thing = new databricks.SqlTable("thing", {
|
|
167
|
+
* name: "auto_cluster_table",
|
|
168
|
+
* catalogName: sandbox.name,
|
|
169
|
+
* schemaName: things.name,
|
|
170
|
+
* tableType: "MANAGED",
|
|
171
|
+
* clusterKeys: ["AUTO"],
|
|
172
|
+
* columns: [{
|
|
173
|
+
* name: "name",
|
|
174
|
+
* type: "string",
|
|
175
|
+
* comment: "name of thing",
|
|
176
|
+
* }],
|
|
177
|
+
* comment: "this table is managed by terraform",
|
|
178
|
+
* });
|
|
29
179
|
* ```
|
|
180
|
+
*
|
|
181
|
+
* ## Migration from `databricks.Table`
|
|
182
|
+
*
|
|
183
|
+
* The `databricks.Table` resource has been deprecated in favor of `databricks.SqlTable`. To migrate from `databricks.Table` to `databricks.SqlTable`:
|
|
184
|
+
*
|
|
185
|
+
* 1. Define a `databricks.SqlTable` resource with arguments corresponding to `databricks.Table`.
|
|
186
|
+
* 2. Add a `removed` block to remove the `databricks.Table` resource without deleting the existing table by using the `lifecycle` block. If you're using Pulumi version below v1.7.0, you will need to use the `terraform state rm` command instead.
|
|
187
|
+
* 3. Add an `import` block to add the `databricks.SqlTable` resource, corresponding to the existing table. If you're using Pulumi version below v1.5.0, you will need to use `pulumi import` command instead.
|
|
188
|
+
*
|
|
189
|
+
* For example, suppose we have the following `databricks.Table` resource:
|
|
190
|
+
*
|
|
191
|
+
* ```typescript
|
|
192
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
193
|
+
* import * as databricks from "@pulumi/databricks";
|
|
194
|
+
*
|
|
195
|
+
* const _this = new databricks.Table("this", {
|
|
196
|
+
* catalogName: "catalog",
|
|
197
|
+
* schemaName: "schema",
|
|
198
|
+
* name: "table",
|
|
199
|
+
* tableType: "MANAGED",
|
|
200
|
+
* dataSourceFormat: "DELTA",
|
|
201
|
+
* columns: [{
|
|
202
|
+
* name: "col1",
|
|
203
|
+
* typeName: "STRING",
|
|
204
|
+
* typeJson: "{\"type\":\"STRING\"}",
|
|
205
|
+
* comment: "comment",
|
|
206
|
+
* nullable: true,
|
|
207
|
+
* }],
|
|
208
|
+
* comment: "comment",
|
|
209
|
+
* properties: {
|
|
210
|
+
* key: "value",
|
|
211
|
+
* },
|
|
212
|
+
* });
|
|
213
|
+
* ```
|
|
214
|
+
*
|
|
215
|
+
* The migration would look like this:
|
|
30
216
|
*/
|
|
31
217
|
class SqlTable extends pulumi.CustomResource {
|
|
32
218
|
/**
|
package/sqlTable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlTable.js","sourceRoot":"","sources":["../sqlTable.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"sqlTable.js","sourceRoot":"","sources":["../sqlTable.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;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SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACjD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;;AApKL,4BAqKC;AAvJG,gBAAgB;AACO,qBAAY,GAAG,oCAAoC,CAAC"}
|
package/sqlVisualization.d.ts
CHANGED
|
@@ -1,26 +1,56 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* !> This resource is deprecated and will be removed in future.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* > Please switch to databricks.Dashboard to author new AI/BI dashboards using the latest tooling
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* To manage [SQLA resources](https://docs.databricks.com/sql/get-started/concepts.html) you must have `databricksSqlAccess` on your databricks.Group or databricks_user.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* > documentation for this resource is a work in progress.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* A visualization is always tied to a query. Every query may have one or more visualizations.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* ## Example Usage
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
17
|
+
* import * as databricks from "@pulumi/databricks";
|
|
16
18
|
*
|
|
17
|
-
*
|
|
19
|
+
* const q1v1 = new databricks.SqlVisualization("q1v1", {
|
|
20
|
+
* queryId: q1.id,
|
|
21
|
+
* type: "table",
|
|
22
|
+
* name: "My Table",
|
|
23
|
+
* description: "Some Description",
|
|
24
|
+
* options: JSON.stringify({
|
|
25
|
+
* itemsPerPage: 25,
|
|
26
|
+
* columns: [
|
|
27
|
+
* {
|
|
28
|
+
* name: "p1",
|
|
29
|
+
* type: "string",
|
|
30
|
+
* title: "Parameter 1",
|
|
31
|
+
* displayAs: "string",
|
|
32
|
+
* },
|
|
33
|
+
* {
|
|
34
|
+
* name: "p2",
|
|
35
|
+
* type: "string",
|
|
36
|
+
* title: "Parameter 2",
|
|
37
|
+
* displayAs: "link",
|
|
38
|
+
* highlightLinks: true,
|
|
39
|
+
* },
|
|
40
|
+
* ],
|
|
41
|
+
* }),
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
18
44
|
*
|
|
19
|
-
*
|
|
45
|
+
* ## Separating `visualization definition` from IAC configuration
|
|
20
46
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
47
|
+
* Since `options` field contains the full JSON encoded string definition of how to render a visualization for the backend API - `sql/api/visualizations`, they can get quite verbose.
|
|
48
|
+
*
|
|
49
|
+
* If you have lots of visualizations to declare, it might be cleaner to separate the `options` field and store them as separate `.json` files to be referenced.
|
|
50
|
+
*
|
|
51
|
+
* ### Example
|
|
52
|
+
*
|
|
53
|
+
* - directory tree
|
|
24
54
|
*/
|
|
25
55
|
export declare class SqlVisualization extends pulumi.CustomResource {
|
|
26
56
|
/**
|
package/sqlVisualization.js
CHANGED
|
@@ -6,27 +6,57 @@ exports.SqlVisualization = void 0;
|
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* !> This resource is deprecated and will be removed in future.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* > Please switch to databricks.Dashboard to author new AI/BI dashboards using the latest tooling
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* To manage [SQLA resources](https://docs.databricks.com/sql/get-started/concepts.html) you must have `databricksSqlAccess` on your databricks.Group or databricks_user.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* > documentation for this resource is a work in progress.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* A visualization is always tied to a query. Every query may have one or more visualizations.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
19
|
+
* ## Example Usage
|
|
20
20
|
*
|
|
21
|
-
*
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
23
|
+
* import * as databricks from "@pulumi/databricks";
|
|
22
24
|
*
|
|
23
|
-
*
|
|
25
|
+
* const q1v1 = new databricks.SqlVisualization("q1v1", {
|
|
26
|
+
* queryId: q1.id,
|
|
27
|
+
* type: "table",
|
|
28
|
+
* name: "My Table",
|
|
29
|
+
* description: "Some Description",
|
|
30
|
+
* options: JSON.stringify({
|
|
31
|
+
* itemsPerPage: 25,
|
|
32
|
+
* columns: [
|
|
33
|
+
* {
|
|
34
|
+
* name: "p1",
|
|
35
|
+
* type: "string",
|
|
36
|
+
* title: "Parameter 1",
|
|
37
|
+
* displayAs: "string",
|
|
38
|
+
* },
|
|
39
|
+
* {
|
|
40
|
+
* name: "p2",
|
|
41
|
+
* type: "string",
|
|
42
|
+
* title: "Parameter 2",
|
|
43
|
+
* displayAs: "link",
|
|
44
|
+
* highlightLinks: true,
|
|
45
|
+
* },
|
|
46
|
+
* ],
|
|
47
|
+
* }),
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
24
50
|
*
|
|
25
|
-
*
|
|
51
|
+
* ## Separating `visualization definition` from IAC configuration
|
|
26
52
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
53
|
+
* Since `options` field contains the full JSON encoded string definition of how to render a visualization for the backend API - `sql/api/visualizations`, they can get quite verbose.
|
|
54
|
+
*
|
|
55
|
+
* If you have lots of visualizations to declare, it might be cleaner to separate the `options` field and store them as separate `.json` files to be referenced.
|
|
56
|
+
*
|
|
57
|
+
* ### Example
|
|
58
|
+
*
|
|
59
|
+
* - directory tree
|
|
30
60
|
*/
|
|
31
61
|
class SqlVisualization extends pulumi.CustomResource {
|
|
32
62
|
/**
|
package/sqlVisualization.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlVisualization.js","sourceRoot":"","sources":["../sqlVisualization.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"sqlVisualization.js","sourceRoot":"","sources":["../sqlVisualization.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAa,gBAAiB,SAAQ,MAAM,CAAC,cAAc;IACvD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA6B,EAAE,IAAmC;QAC3H,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACvE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,gBAAgB,CAAC,YAAY,CAAC;IACjE,CAAC;IAkBD,YAAY,IAAY,EAAE,WAA0D,EAAE,IAAmC;QACrH,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAgD,CAAC;YAC/D,cAAc,CAAC,aAAa,CAAC,GAAG,KAAK,EAAE,WAAW,CAAC;YACnD,cAAc,CAAC,MAAM,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC;YACr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