provider_files
Operations on a provider_files
resource.
Overview
Name | provider_files |
Type | Resource |
Id | databricks_workspace.marketplace.provider_files |
Fields
Name | Datatype |
---|---|
id | string |
created_at | integer |
display_name | string |
download_link | string |
file_parent | object |
marketplace_file_type | string |
mime_type | string |
status | string |
status_message | string |
updated_at | integer |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | file_id, deployment_name | Get a file |
list | SELECT | deployment_name | List files attached to a parent entity. |
create | INSERT | deployment_name | Create a file. Currently, only provider icons and attached notebooks are supported. |
delete | DELETE | file_id, deployment_name | Delete a file |
SELECT
examples
- provider_files (list)
- provider_files (get)
SELECT
id,
created_at,
display_name,
download_link,
file_parent,
marketplace_file_type,
mime_type,
status,
status_message,
updated_at
FROM databricks_workspace.marketplace.provider_files
WHERE deployment_name = '{{ deployment_name }}';
SELECT
id,
created_at,
display_name,
download_link,
file_parent,
marketplace_file_type,
mime_type,
status,
status_message,
updated_at
FROM databricks_workspace.marketplace.provider_files
WHERE file_id = '{{ file_id }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new provider_files
resource.
- provider_files
- Manifest
/*+ create */
INSERT INTO databricks_workspace.marketplace.provider_files (
deployment_name,
data__file_parent,
data__marketplace_file_type,
data__mime_type,
data__display_name
)
SELECT
'{{ deployment_name }}',
'{{ file_parent }}',
'{{ marketplace_file_type }}',
'{{ mime_type }}',
'{{ display_name }}'
;
- name: your_resource_model_name
props:
- name: file_parent
value:
parent_id: string
file_parent_type: PROVIDER
- name: marketplace_file_type
value: PROVIDER_ICON
- name: mime_type
value: string
- name: display_name
value: string
DELETE
example
Deletes a provider_files
resource.
/*+ delete */
DELETE FROM databricks_workspace.marketplace.provider_files
WHERE file_id = '{{ file_id }}' AND
deployment_name = '{{ deployment_name }}';