Skip to main content

dbfs_streams

Operations on a dbfs_streams resource.

Overview

Namedbfs_streams
TypeResource
Iddatabricks_workspace.filemanagement.dbfs_streams

SELECT not supported for this resource, see the methods section for supported operations.

Methods

NameAccessible byRequired ParamsDescription
createINSERTdeployment_nameOpens 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
closeDELETEdeployment_nameCloses the stream specified by the input handle. If the handle does not exist, this call throws an exception with
addblockEXECdeployment_nameAppends 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.

/*+ create */
INSERT INTO databricks_workspace.filemanagement.dbfs_streams (
deployment_name,
data__path,
data__overwrite
)
SELECT
'{{ deployment_name }}',
'{{ path }}',
'{{ overwrite }}'
;

DELETE example

Deletes a dbfs_streams resource.

/*+ delete */
DELETE FROM databricks_workspace.filemanagement.dbfs_streams
WHERE deployment_name = '{{ deployment_name }}';