dbfs_streams
Operations on a dbfs_streams
resource.
Overview
Name | dbfs_streams |
Type | Resource |
Id | databricks_workspace.filemanagement.dbfs_streams |
SELECT
not supported for this resource, see the methods section for supported operations.
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
create | INSERT | deployment_name | Opens a stream to write to a file and returns a handle to this stream. There is a 10 minute idle timeout on this handle. If a file or directory already exists on the given path and |
close | DELETE | deployment_name | Closes the stream specified by the input handle. If the handle does not exist, this call throws an exception with |
addblock | EXEC | deployment_name | Appends a block of data to the stream specified by the input handle. If the handle does not exist, this call will throw an exception with |
INSERT
example
Use the following StackQL query and manifest file to create a new dbfs_streams
resource.
- dbfs_streams
- Manifest
/*+ create */
INSERT INTO databricks_workspace.filemanagement.dbfs_streams (
deployment_name,
data__path,
data__overwrite
)
SELECT
'{{ deployment_name }}',
'{{ path }}',
'{{ overwrite }}'
;
- name: your_resource_model_name
props:
- name: path
value: /mnt/foo
- name: overwrite
value: false
DELETE
example
Deletes a dbfs_streams
resource.
/*+ delete */
DELETE FROM databricks_workspace.filemanagement.dbfs_streams
WHERE deployment_name = '{{ deployment_name }}';