Skip to content

WorkspaceFile

laktory.models.resources.databricks.WorkspaceFile ¤

Bases: BaseModel, PulumiResource, TerraformResource

Databricks Workspace File

ATTRIBUTE DESCRIPTION
access_controls

List of file access controls

TYPE: list[AccessControl]

dirpath

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

TYPE: str

path

Workspace filepath for the file. Overwrite rootpath and dirpath.

TYPE: str

rootpath

Root directory to which all workspace files are deployed to. Can also be configured by settings LAKTORY_WORKSPACE_LAKTORY_ROOT environment variable. Default is /.laktory/. 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.WorkspaceFile(
    source="./notebooks/dlt/dlt_laktory_pl.py",
)
print(file.path)
# > /.laktory/dlt_laktory_pl.py

file = models.resources.databricks.WorkspaceFile(
    source="./notebooks/dlt/dlt_laktory_pl.py",
    rootpath="/src/",
)
print(file.path)
# > /src/dlt_laktory_pl.py

file = models.resources.databricks.WorkspaceFile(
    source="./notebooks/dlt/dlt_laktory_pl.py",
    rootpath="/src/",
    dirpath="notebooks/dlt/",
)
print(file.path)
# > /src/notebooks/dlt/dlt_laktory_pl.py
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 -