@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.
Files changed (350) hide show
  1. package/accountFederationPolicy.d.ts +0 -20
  2. package/accountFederationPolicy.js +0 -20
  3. package/accountFederationPolicy.js.map +1 -1
  4. package/accountNetworkPolicy.d.ts +0 -20
  5. package/accountNetworkPolicy.js +0 -20
  6. package/accountNetworkPolicy.js.map +1 -1
  7. package/accountSettingUserPreferenceV2.d.ts +0 -20
  8. package/accountSettingUserPreferenceV2.js +0 -20
  9. package/accountSettingUserPreferenceV2.js.map +1 -1
  10. package/accountSettingV2.d.ts +0 -20
  11. package/accountSettingV2.js +0 -20
  12. package/accountSettingV2.js.map +1 -1
  13. package/aibiDashboardEmbeddingAccessPolicySetting.d.ts +0 -22
  14. package/aibiDashboardEmbeddingAccessPolicySetting.js +0 -22
  15. package/aibiDashboardEmbeddingAccessPolicySetting.js.map +1 -1
  16. package/aibiDashboardEmbeddingApprovedDomainsSetting.d.ts +0 -22
  17. package/aibiDashboardEmbeddingApprovedDomainsSetting.js +0 -22
  18. package/aibiDashboardEmbeddingApprovedDomainsSetting.js.map +1 -1
  19. package/alert.d.ts +132 -11
  20. package/alert.js +132 -11
  21. package/alert.js.map +1 -1
  22. package/alertV2.d.ts +0 -20
  23. package/alertV2.js +0 -20
  24. package/alertV2.js.map +1 -1
  25. package/app.d.ts +0 -22
  26. package/app.js +0 -22
  27. package/app.js.map +1 -1
  28. package/appsSettingsCustomTemplate.d.ts +0 -20
  29. package/appsSettingsCustomTemplate.js +0 -20
  30. package/appsSettingsCustomTemplate.js.map +1 -1
  31. package/artifactAllowlist.d.ts +0 -22
  32. package/artifactAllowlist.js +0 -22
  33. package/artifactAllowlist.js.map +1 -1
  34. package/budget.d.ts +0 -22
  35. package/budget.js +0 -22
  36. package/budget.js.map +1 -1
  37. package/budgetPolicy.d.ts +0 -20
  38. package/budgetPolicy.js +0 -20
  39. package/budgetPolicy.js.map +1 -1
  40. package/catalog.d.ts +0 -22
  41. package/catalog.js +0 -22
  42. package/catalog.js.map +1 -1
  43. package/catalogWorkspaceBinding.d.ts +0 -22
  44. package/catalogWorkspaceBinding.js +0 -22
  45. package/catalogWorkspaceBinding.js.map +1 -1
  46. package/cluster.d.ts +54 -5
  47. package/cluster.js +54 -5
  48. package/cluster.js.map +1 -1
  49. package/clusterPolicy.d.ts +0 -22
  50. package/clusterPolicy.js +0 -22
  51. package/clusterPolicy.js.map +1 -1
  52. package/connection.d.ts +0 -22
  53. package/connection.js +0 -22
  54. package/connection.js.map +1 -1
  55. package/credential.d.ts +0 -22
  56. package/credential.js +0 -22
  57. package/credential.js.map +1 -1
  58. package/customAppIntegration.d.ts +0 -22
  59. package/customAppIntegration.js +0 -22
  60. package/customAppIntegration.js.map +1 -1
  61. package/dashboard.d.ts +0 -22
  62. package/dashboard.js +0 -22
  63. package/dashboard.js.map +1 -1
  64. package/dataQualityMonitor.d.ts +0 -20
  65. package/dataQualityMonitor.js +0 -20
  66. package/dataQualityMonitor.js.map +1 -1
  67. package/dataQualityRefresh.d.ts +0 -20
  68. package/dataQualityRefresh.js +0 -20
  69. package/dataQualityRefresh.js.map +1 -1
  70. package/databaseDatabaseCatalog.d.ts +0 -20
  71. package/databaseDatabaseCatalog.js +0 -20
  72. package/databaseDatabaseCatalog.js.map +1 -1
  73. package/databaseInstance.d.ts +0 -20
  74. package/databaseInstance.js +0 -20
  75. package/databaseInstance.js.map +1 -1
  76. package/databaseSyncedDatabaseTable.d.ts +0 -20
  77. package/databaseSyncedDatabaseTable.js +0 -20
  78. package/databaseSyncedDatabaseTable.js.map +1 -1
  79. package/dbfsFile.d.ts +0 -22
  80. package/dbfsFile.js +0 -22
  81. package/dbfsFile.js.map +1 -1
  82. package/defaultNamespaceSetting.d.ts +0 -22
  83. package/defaultNamespaceSetting.js +0 -22
  84. package/defaultNamespaceSetting.js.map +1 -1
  85. package/directory.d.ts +0 -22
  86. package/directory.js +0 -22
  87. package/directory.js.map +1 -1
  88. package/disableLegacyAccessSetting.d.ts +0 -6
  89. package/disableLegacyAccessSetting.js +0 -6
  90. package/disableLegacyAccessSetting.js.map +1 -1
  91. package/disableLegacyDbfsSetting.d.ts +0 -22
  92. package/disableLegacyDbfsSetting.js +0 -22
  93. package/disableLegacyDbfsSetting.js.map +1 -1
  94. package/disableLegacyFeaturesSetting.d.ts +0 -22
  95. package/disableLegacyFeaturesSetting.js +0 -22
  96. package/disableLegacyFeaturesSetting.js.map +1 -1
  97. package/entitlements.d.ts +0 -28
  98. package/entitlements.js +0 -28
  99. package/entitlements.js.map +1 -1
  100. package/entityTagAssignment.d.ts +0 -20
  101. package/entityTagAssignment.js +0 -20
  102. package/entityTagAssignment.js.map +1 -1
  103. package/externalLocation.d.ts +0 -22
  104. package/externalLocation.js +0 -22
  105. package/externalLocation.js.map +1 -1
  106. package/externalMetadata.d.ts +0 -20
  107. package/externalMetadata.js +0 -20
  108. package/externalMetadata.js.map +1 -1
  109. package/featureEngineeringFeature.d.ts +18 -20
  110. package/featureEngineeringFeature.js +0 -20
  111. package/featureEngineeringFeature.js.map +1 -1
  112. package/featureEngineeringKafkaConfig.d.ts +0 -20
  113. package/featureEngineeringKafkaConfig.js +0 -20
  114. package/featureEngineeringKafkaConfig.js.map +1 -1
  115. package/featureEngineeringMaterializedFeature.d.ts +0 -20
  116. package/featureEngineeringMaterializedFeature.js +0 -20
  117. package/featureEngineeringMaterializedFeature.js.map +1 -1
  118. package/file.d.ts +0 -22
  119. package/file.js +0 -22
  120. package/file.js.map +1 -1
  121. package/getFeatureEngineeringFeature.d.ts +6 -0
  122. package/getFeatureEngineeringFeature.js.map +1 -1
  123. package/gitCredential.d.ts +0 -22
  124. package/gitCredential.js +0 -22
  125. package/gitCredential.js.map +1 -1
  126. package/globalInitScript.d.ts +0 -22
  127. package/globalInitScript.js +0 -22
  128. package/globalInitScript.js.map +1 -1
  129. package/grant.d.ts +0 -22
  130. package/grant.js +0 -22
  131. package/grant.js.map +1 -1
  132. package/grants.d.ts +0 -22
  133. package/grants.js +0 -22
  134. package/grants.js.map +1 -1
  135. package/group.d.ts +0 -22
  136. package/group.js +0 -22
  137. package/group.js.map +1 -1
  138. package/groupMember.d.ts +0 -22
  139. package/groupMember.js +0 -22
  140. package/groupMember.js.map +1 -1
  141. package/instancePool.d.ts +0 -22
  142. package/instancePool.js +0 -22
  143. package/instancePool.js.map +1 -1
  144. package/instanceProfile.d.ts +0 -22
  145. package/instanceProfile.js +0 -22
  146. package/instanceProfile.js.map +1 -1
  147. package/ipAccessList.d.ts +0 -22
  148. package/ipAccessList.js +0 -22
  149. package/ipAccessList.js.map +1 -1
  150. package/job.d.ts +0 -22
  151. package/job.js +0 -22
  152. package/job.js.map +1 -1
  153. package/materializedFeaturesFeatureTag.d.ts +0 -20
  154. package/materializedFeaturesFeatureTag.js +0 -20
  155. package/materializedFeaturesFeatureTag.js.map +1 -1
  156. package/metastore.d.ts +0 -22
  157. package/metastore.js +0 -22
  158. package/metastore.js.map +1 -1
  159. package/metastoreAssignment.d.ts +0 -22
  160. package/metastoreAssignment.js +0 -22
  161. package/metastoreAssignment.js.map +1 -1
  162. package/metastoreDataAccess.d.ts +0 -22
  163. package/metastoreDataAccess.js +0 -22
  164. package/metastoreDataAccess.js.map +1 -1
  165. package/mlflowExperiment.d.ts +0 -22
  166. package/mlflowExperiment.js +0 -22
  167. package/mlflowExperiment.js.map +1 -1
  168. package/mlflowModel.d.ts +0 -22
  169. package/mlflowModel.js +0 -22
  170. package/mlflowModel.js.map +1 -1
  171. package/modelServing.d.ts +0 -22
  172. package/modelServing.js +0 -22
  173. package/modelServing.js.map +1 -1
  174. package/modelServingProvisionedThroughput.d.ts +0 -24
  175. package/modelServingProvisionedThroughput.js +0 -24
  176. package/modelServingProvisionedThroughput.js.map +1 -1
  177. package/mount.d.ts +329 -0
  178. package/mount.js +329 -0
  179. package/mount.js.map +1 -1
  180. package/mwsCredentials.d.ts +6 -22
  181. package/mwsCredentials.js +6 -22
  182. package/mwsCredentials.js.map +1 -1
  183. package/mwsCustomerManagedKeys.d.ts +9 -26
  184. package/mwsCustomerManagedKeys.js +9 -26
  185. package/mwsCustomerManagedKeys.js.map +1 -1
  186. package/mwsNccPrivateEndpointRule.d.ts +0 -20
  187. package/mwsNccPrivateEndpointRule.js +0 -20
  188. package/mwsNccPrivateEndpointRule.js.map +1 -1
  189. package/mwsNetworkConnectivityConfig.d.ts +0 -22
  190. package/mwsNetworkConnectivityConfig.js +0 -22
  191. package/mwsNetworkConnectivityConfig.js.map +1 -1
  192. package/mwsNetworks.d.ts +31 -26
  193. package/mwsNetworks.js +31 -26
  194. package/mwsNetworks.js.map +1 -1
  195. package/mwsPermissionAssignment.d.ts +0 -22
  196. package/mwsPermissionAssignment.js +0 -22
  197. package/mwsPermissionAssignment.js.map +1 -1
  198. package/mwsPrivateAccessSettings.d.ts +0 -20
  199. package/mwsPrivateAccessSettings.js +0 -20
  200. package/mwsPrivateAccessSettings.js.map +1 -1
  201. package/mwsStorageConfigurations.d.ts +8 -28
  202. package/mwsStorageConfigurations.js +8 -28
  203. package/mwsStorageConfigurations.js.map +1 -1
  204. package/mwsVpcEndpoint.d.ts +1 -1
  205. package/mwsVpcEndpoint.js +1 -1
  206. package/mwsWorkspaces.d.ts +0 -34
  207. package/mwsWorkspaces.js +0 -34
  208. package/mwsWorkspaces.js.map +1 -1
  209. package/notebook.d.ts +0 -22
  210. package/notebook.js +0 -22
  211. package/notebook.js.map +1 -1
  212. package/notificationDestination.d.ts +0 -22
  213. package/notificationDestination.js +0 -22
  214. package/notificationDestination.js.map +1 -1
  215. package/onlineStore.d.ts +0 -20
  216. package/onlineStore.js +0 -20
  217. package/onlineStore.js.map +1 -1
  218. package/onlineTable.d.ts +0 -22
  219. package/onlineTable.js +0 -22
  220. package/onlineTable.js.map +1 -1
  221. package/package.json +2 -2
  222. package/permissionAssignment.d.ts +0 -22
  223. package/permissionAssignment.js +0 -22
  224. package/permissionAssignment.js.map +1 -1
  225. package/permissions.d.ts +1 -1
  226. package/permissions.js +1 -1
  227. package/pipeline.d.ts +0 -22
  228. package/pipeline.js +0 -22
  229. package/pipeline.js.map +1 -1
  230. package/policyInfo.d.ts +0 -20
  231. package/policyInfo.js +0 -20
  232. package/policyInfo.js.map +1 -1
  233. package/postgresBranch.d.ts +0 -20
  234. package/postgresBranch.js +0 -20
  235. package/postgresBranch.js.map +1 -1
  236. package/postgresEndpoint.d.ts +0 -20
  237. package/postgresEndpoint.js +0 -20
  238. package/postgresEndpoint.js.map +1 -1
  239. package/postgresProject.d.ts +0 -20
  240. package/postgresProject.js +0 -20
  241. package/postgresProject.js.map +1 -1
  242. package/qualityMonitorV2.d.ts +0 -20
  243. package/qualityMonitorV2.js +0 -20
  244. package/qualityMonitorV2.js.map +1 -1
  245. package/query.d.ts +86 -11
  246. package/query.js +86 -11
  247. package/query.js.map +1 -1
  248. package/recipient.d.ts +0 -22
  249. package/recipient.js +0 -22
  250. package/recipient.js.map +1 -1
  251. package/registeredModel.d.ts +0 -22
  252. package/registeredModel.js +0 -22
  253. package/registeredModel.js.map +1 -1
  254. package/repo.d.ts +0 -22
  255. package/repo.js +0 -22
  256. package/repo.js.map +1 -1
  257. package/restrictWorkspaceAdminsSetting.d.ts +0 -22
  258. package/restrictWorkspaceAdminsSetting.js +0 -22
  259. package/restrictWorkspaceAdminsSetting.js.map +1 -1
  260. package/rfaAccessRequestDestinations.d.ts +0 -20
  261. package/rfaAccessRequestDestinations.js +0 -20
  262. package/rfaAccessRequestDestinations.js.map +1 -1
  263. package/schema.d.ts +0 -22
  264. package/schema.js +0 -22
  265. package/schema.js.map +1 -1
  266. package/secret.d.ts +0 -22
  267. package/secret.js +0 -22
  268. package/secret.js.map +1 -1
  269. package/secretAcl.d.ts +0 -22
  270. package/secretAcl.js +0 -22
  271. package/secretAcl.js.map +1 -1
  272. package/secretScope.d.ts +0 -22
  273. package/secretScope.js +0 -22
  274. package/secretScope.js.map +1 -1
  275. package/servicePrincipal.d.ts +0 -22
  276. package/servicePrincipal.js +0 -22
  277. package/servicePrincipal.js.map +1 -1
  278. package/servicePrincipalFederationPolicy.d.ts +0 -20
  279. package/servicePrincipalFederationPolicy.js +0 -20
  280. package/servicePrincipalFederationPolicy.js.map +1 -1
  281. package/share.d.ts +0 -22
  282. package/share.js +0 -22
  283. package/share.js.map +1 -1
  284. package/sqlAlert.d.ts +0 -22
  285. package/sqlAlert.js +0 -22
  286. package/sqlAlert.js.map +1 -1
  287. package/sqlDashboard.d.ts +0 -22
  288. package/sqlDashboard.js +0 -22
  289. package/sqlDashboard.js.map +1 -1
  290. package/sqlEndpoint.d.ts +0 -22
  291. package/sqlEndpoint.js +0 -22
  292. package/sqlEndpoint.js.map +1 -1
  293. package/sqlGlobalConfig.d.ts +0 -22
  294. package/sqlGlobalConfig.js +0 -22
  295. package/sqlGlobalConfig.js.map +1 -1
  296. package/sqlPermissions.d.ts +36 -34
  297. package/sqlPermissions.js +0 -34
  298. package/sqlPermissions.js.map +1 -1
  299. package/sqlQuery.d.ts +0 -22
  300. package/sqlQuery.js +0 -22
  301. package/sqlQuery.js.map +1 -1
  302. package/sqlTable.d.ts +206 -11
  303. package/sqlTable.js +197 -11
  304. package/sqlTable.js.map +1 -1
  305. package/sqlVisualization.d.ts +42 -12
  306. package/sqlVisualization.js +42 -12
  307. package/sqlVisualization.js.map +1 -1
  308. package/sqlWidget.d.ts +0 -22
  309. package/sqlWidget.js +0 -22
  310. package/sqlWidget.js.map +1 -1
  311. package/storageCredential.d.ts +0 -42
  312. package/storageCredential.js +0 -42
  313. package/storageCredential.js.map +1 -1
  314. package/systemSchema.d.ts +0 -22
  315. package/systemSchema.js +0 -22
  316. package/systemSchema.js.map +1 -1
  317. package/tagPolicy.d.ts +0 -20
  318. package/tagPolicy.js +0 -20
  319. package/tagPolicy.js.map +1 -1
  320. package/types/output.d.ts +6 -0
  321. package/user.d.ts +0 -22
  322. package/user.js +0 -22
  323. package/user.js.map +1 -1
  324. package/vectorSearchEndpoint.d.ts +0 -22
  325. package/vectorSearchEndpoint.js +0 -22
  326. package/vectorSearchEndpoint.js.map +1 -1
  327. package/vectorSearchIndex.d.ts +0 -22
  328. package/vectorSearchIndex.js +0 -22
  329. package/vectorSearchIndex.js.map +1 -1
  330. package/volume.d.ts +0 -22
  331. package/volume.js +0 -22
  332. package/volume.js.map +1 -1
  333. package/warehousesDefaultWarehouseOverride.d.ts +0 -20
  334. package/warehousesDefaultWarehouseOverride.js +0 -20
  335. package/warehousesDefaultWarehouseOverride.js.map +1 -1
  336. package/workspaceBinding.d.ts +20 -12
  337. package/workspaceBinding.js +20 -12
  338. package/workspaceBinding.js.map +1 -1
  339. package/workspaceEntityTagAssignment.d.ts +0 -20
  340. package/workspaceEntityTagAssignment.js +0 -20
  341. package/workspaceEntityTagAssignment.js.map +1 -1
  342. package/workspaceFile.d.ts +0 -22
  343. package/workspaceFile.js +0 -22
  344. package/workspaceFile.js.map +1 -1
  345. package/workspaceNetworkOption.d.ts +0 -20
  346. package/workspaceNetworkOption.js +0 -20
  347. package/workspaceNetworkOption.js.map +1 -1
  348. package/workspaceSettingV2.d.ts +0 -20
  349. package/workspaceSettingV2.js +0 -20
  350. 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
- * ## Import
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
- * This resource can be imported by its full name:
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
- * hcl
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
- * import {
11
+ * > This resource can only be used with a workspace-level provider!
12
12
  *
13
- * to = databricks_sql_table.this
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
- * id = "<catalog_name>.<schema_name>.<name>"
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
- * Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command:
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
- * bash
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
- * ```sh
24
- * $ pulumi import databricks:index/sqlTable:SqlTable this "<catalog_name>.<schema_name>.<name>"
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
- * ## Import
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
- * This resource can be imported by its full name:
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
- * hcl
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
- * import {
15
+ * > This resource can only be used with a workspace-level provider!
16
16
  *
17
- * to = databricks_sql_table.this
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
- * id = "<catalog_name>.<schema_name>.<name>"
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
- * Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command:
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
- * bash
160
+ * ## Enable automatic clustering
26
161
  *
27
- * ```sh
28
- * $ pulumi import databricks:index/sqlTable:SqlTable this "<catalog_name>.<schema_name>.<name>"
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;A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,eAAe,CAAC;YAC1D,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,EAAE,SAAS,CAAC;YAC9C,cAAc,CAAC,gBAAgB,CAAC,GAAG,IAAI,EAAE,cAAc,CAAC;YACxD,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC;YAClD,cAAc,CAAC,qBAAqB,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC1D,cAAc,CAAC,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"}
@@ -1,26 +1,56 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  /**
3
- * ## Import
3
+ * !> This resource is deprecated and will be removed in future.
4
4
  *
5
- * You can import a `databricks_sql_visualization` resource with ID like the following:
5
+ * > Please switch to databricks.Dashboard to author new AI/BI dashboards using the latest tooling
6
6
  *
7
- * hcl
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
- * import {
9
+ * > documentation for this resource is a work in progress.
10
10
  *
11
- * to = databricks_sql_visualization.this
11
+ * A visualization is always tied to a query. Every query may have one or more visualizations.
12
12
  *
13
- * id = "<query-id>/<visualization-id>"
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
- * Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command:
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
- * bash
45
+ * ## Separating `visualization definition` from IAC configuration
20
46
  *
21
- * ```sh
22
- * $ pulumi import databricks:index/sqlVisualization:SqlVisualization this <query-id>/<visualization-id>
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
  /**
@@ -6,27 +6,57 @@ exports.SqlVisualization = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
8
  /**
9
- * ## Import
9
+ * !> This resource is deprecated and will be removed in future.
10
10
  *
11
- * You can import a `databricks_sql_visualization` resource with ID like the following:
11
+ * > Please switch to databricks.Dashboard to author new AI/BI dashboards using the latest tooling
12
12
  *
13
- * hcl
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
- * import {
15
+ * > documentation for this resource is a work in progress.
16
16
  *
17
- * to = databricks_sql_visualization.this
17
+ * A visualization is always tied to a query. Every query may have one or more visualizations.
18
18
  *
19
- * id = "<query-id>/<visualization-id>"
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
- * Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command:
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
- * bash
51
+ * ## Separating `visualization definition` from IAC configuration
26
52
  *
27
- * ```sh
28
- * $ pulumi import databricks:index/sqlVisualization:SqlVisualization this <query-id>/<visualization-id>
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
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sqlVisualization.js","sourceRoot":"","sources":["../sqlVisualization.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;GAsBG;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,GAA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