consumer_installations
Operations on a consumer_installations
resource.
Overview
Name | consumer_installations |
Type | Resource |
Id | databricks_workspace.marketplace.consumer_installations |
Fields
Name | Datatype |
---|---|
id | string |
catalog_name | string |
error_message | string |
installed_on | integer |
listing_id | string |
listing_name | string |
recipient_type | string |
repo_name | string |
repo_path | string |
share_name | string |
status | string |
token_detail | object |
tokens | array |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list | SELECT | deployment_name | List all installations across all listings. |
create | INSERT | listing_id, deployment_name | Install payload associated with a Databricks Marketplace listing. |
delete | DELETE | installation_id, listing_id, deployment_name | Uninstall an installation associated with a Databricks Marketplace listing. |
update | UPDATE | installation_id, listing_id, deployment_name | This is a update API that will update the part of the fields defined in the installation table as well as interact with external services according to the fields not included in the installation table |
SELECT
examples
SELECT
id,
catalog_name,
error_message,
installed_on,
listing_id,
listing_name,
recipient_type,
repo_name,
repo_path,
share_name,
status,
token_detail,
tokens
FROM databricks_workspace.marketplace.consumer_installations
WHERE deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new consumer_installations
resource.
- consumer_installations
- Manifest
/*+ create */
INSERT INTO databricks_workspace.marketplace.consumer_installations (
listing_id,
deployment_name,
data__share_name,
data__catalog_name,
data__repo_detail,
data__recipient_type,
data__accepted_consumer_terms
)
SELECT
'{{ listing_id }}',
'{{ deployment_name }}',
'{{ share_name }}',
'{{ catalog_name }}',
'{{ repo_detail }}',
'{{ recipient_type }}',
'{{ accepted_consumer_terms }}'
;
- name: your_resource_model_name
props:
- name: share_name
value: string
- name: catalog_name
value: string
- name: repo_detail
value:
repo_name: string
repo_path: string
- name: recipient_type
value: DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS
- name: accepted_consumer_terms
value:
version: string
UPDATE
example
Updates a consumer_installations
resource.
/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_workspace.marketplace.consumer_installations
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE installation_id = '{{ installation_id }}' AND
listing_id = '{{ listing_id }}' AND
deployment_name = '{{ deployment_name }}';
DELETE
example
Deletes a consumer_installations
resource.
/*+ delete */
DELETE FROM databricks_workspace.marketplace.consumer_installations
WHERE installation_id = '{{ installation_id }}' AND
listing_id = '{{ listing_id }}' AND
deployment_name = '{{ deployment_name }}';