Skip to main content

consumer_installations

Creates, updates, deletes, gets or lists a consumer_installations resource.

Overview

Nameconsumer_installations
TypeResource
Iddatabricks_workspace.marketplace.consumer_installations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring
listing_idstring
catalog_namestring
listing_namestring
repo_namestring
share_namestring
error_messagestring
installed_oninteger
recipient_typestringCreate a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />&gt;&gt;&gt; class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> &gt;&gt;&gt; Color.RED<br /> &lt;Color.RED: 1&gt;<br /><br />- value lookup:<br /><br /> &gt;&gt;&gt; Color(1)<br /> &lt;Color.RED: 1&gt;<br /><br />- name lookup:<br /><br /> &gt;&gt;&gt; Color['RED']<br /> &lt;Color.RED: 1&gt;<br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />&gt;&gt;&gt; len(Color)<br />3<br /><br />&gt;&gt;&gt; list(Color)<br />[&lt;Color.RED: 1&gt;, &lt;Color.BLUE: 2&gt;, &lt;Color.GREEN: 3&gt;]<br /><br />Methods can be added to enumerations, and members can have their own<br />attributes -- see the documentation for details. (DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS, DELTA_SHARING_RECIPIENT_TYPE_OPEN)
repo_pathstring
statusstringCreate a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />&gt;&gt;&gt; class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> &gt;&gt;&gt; Color.RED<br /> &lt;Color.RED: 1&gt;<br /><br />- value lookup:<br /><br /> &gt;&gt;&gt; Color(1)<br /> &lt;Color.RED: 1&gt;<br /><br />- name lookup:<br /><br /> &gt;&gt;&gt; Color['RED']<br /> &lt;Color.RED: 1&gt;<br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />&gt;&gt;&gt; len(Color)<br />3<br /><br />&gt;&gt;&gt; list(Color)<br />[&lt;Color.RED: 1&gt;, &lt;Color.BLUE: 2&gt;, &lt;Color.GREEN: 3&gt;]<br /><br />Methods can be added to enumerations, and members can have their own<br />attributes -- see the documentation for details. (FAILED, INSTALLED)
token_detailobject
tokensarray

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_for_listingselectlisting_id, deployment_namepage_size, page_tokenList all installations for a particular listing.
listselectdeployment_namepage_size, page_tokenList all installations across all listings.
createinsertlisting_id, deployment_nameInstall payload associated with a Databricks Marketplace listing.
updatereplacelisting_id, installation_id, deployment_name, installationThis is a update API that will update the part of the fields defined in the installation table as well
deletedeletelisting_id, installation_id, deployment_nameUninstall an installation associated with a Databricks Marketplace listing.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
installation_idstring
listing_idstring
page_sizeinteger
page_tokenstring

SELECT examples

List all installations for a particular listing.

SELECT
id,
listing_id,
catalog_name,
listing_name,
repo_name,
share_name,
error_message,
installed_on,
recipient_type,
repo_path,
status,
token_detail,
tokens
FROM databricks_workspace.marketplace.consumer_installations
WHERE listing_id = '{{ listing_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;

INSERT examples

Install payload associated with a Databricks Marketplace listing.

INSERT INTO databricks_workspace.marketplace.consumer_installations (
accepted_consumer_terms,
catalog_name,
recipient_type,
repo_detail,
share_name,
listing_id,
deployment_name
)
SELECT
'{{ accepted_consumer_terms }}',
'{{ catalog_name }}',
'{{ recipient_type }}',
'{{ repo_detail }}',
'{{ share_name }}',
'{{ listing_id }}',
'{{ deployment_name }}'
RETURNING
installation
;

REPLACE examples

This is a update API that will update the part of the fields defined in the installation table as well

REPLACE databricks_workspace.marketplace.consumer_installations
SET
installation = '{{ installation }}',
rotate_token = {{ rotate_token }}
WHERE
listing_id = '{{ listing_id }}' --required
AND installation_id = '{{ installation_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND installation = '{{ installation }}' --required
RETURNING
installation;

DELETE examples

Uninstall an installation associated with a Databricks Marketplace listing.

DELETE FROM databricks_workspace.marketplace.consumer_installations
WHERE listing_id = '{{ listing_id }}' --required
AND installation_id = '{{ installation_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;