Skip to content

DbfsFile

laktory.models.resources.databricks.DbfsFile ¤

Bases: BaseModel, PulumiResource, TerraformResource

Databricks DBFS File

ATTRIBUTE DESCRIPTION
access_controls

List of file access controls

TYPE: list[AccessControl]

dirpath

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

TYPE: str

lookup_existing

Specifications for looking up existing resource. Other attributes will be ignored.

TYPE: DbfsFileLookup

path

DBFS filepath for the file. Overwrite rootpath and dirpath.

TYPE: str

rootpath

Root directory to which all DBFS files are deployed to. Used only if path is not specified.

TYPE: str

source

Path to file on local filesystem.

TYPE: str

Examples:

from laktory import models

file = models.resources.databricks.DbfsFile(
    source="./data/stock_prices/prices.json",
)
print(file.path)
# > /prices.json

file = models.resources.databricks.DbfsFile(
    source="./data/stock_prices/prices.json",
    rootpath="/data/",
)
print(file.path)
# > /data/prices.json

file = models.resources.databricks.DbfsFile(
    source="./data/stock_prices/prices.json",
    rootpath="/data/",
    dirpath="stock_prices/",
)
print(file.path)
# > /data/stock_prices/prices.json
ATTRIBUTE DESCRIPTION
filename

File filename

TYPE: str

resource_key

path with special characters /, ., \ replaced with -

TYPE: str

Attributes¤

filename property ¤

filename

File filename

resource_key property ¤

resource_key

path with special characters /, ., \ replaced with -

--

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

Bases: ResourceLookup

ATTRIBUTE DESCRIPTION
path

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

TYPE: str

limit_file_size

Do not load content for files larger than 4MB.

TYPE: bool