Skip to content

DbfsFile

laktory.models.resources.databricks.DbfsFile ¤

Bases: DbfsFileBase

Databricks DBFS File

Examples:

import io

from laktory import models

file_yaml = '''
source: ./data/stock_prices/prices.json
dirpath: stock_prices/
'''
file = models.resources.databricks.DbfsFile.model_validate_yaml(
    io.StringIO(file_yaml)
)
print(file.path)
# > /stock_prices/prices.json
References
BASE DESCRIPTION
content_base64

Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Terraform state and should only be used in exceptional circumstances, like creating a data pipeline configuration file

TYPE: str | None | VariableType DEFAULT: None

md5

TYPE: str | None | VariableType DEFAULT: None

source

The full absolute path to the file. Conflicts with content_base64

TYPE: str | None | VariableType DEFAULT: None

LAKTORY DESCRIPTION
access_controls

List of file access controls

TYPE: list[AccessControl | VariableType] | VariableType DEFAULT: []

dirpath

Workspace directory inside rootpath in which the DBFS file is deployed. Used only if path is not specified.

TYPE: str | VariableType DEFAULT: None

path_

DBFS filepath for the file. Overwrite dirpath.

TYPE: str | VariableType DEFAULT: None

ATTRIBUTE DESCRIPTION
filename

File filename

TYPE: str

filename property ¤

File filename


laktory.models.resources.databricks.dbfsfile.DbfsFileLookup ¤

Bases: ResourceLookup

PARAMETER DESCRIPTION
limit_file_size

Do not load content for files larger than 4MB.

TYPE: bool | VariableType DEFAULT: True

path

Path on DBFS for the file from which to get content.

TYPE: str | VariableType