Skip to content

Lakehouses

Accessing Lakehouses

import fabias

ws = fabias.workspace("GENESIS")
lakehouse = ws.lakehouse("Analytics")

print(f"Lakehouse: {lakehouse.name}")
print(f"ID: {lakehouse.id}")

Listing Lakehouses

ws = fabias.workspace("GENESIS")

for lh in ws.lakehouses():
    print(f"{lh.name}: {lh.id}")

Creating Lakehouses

ws = fabias.workspace("GENESIS")

new_lh = ws.lakehouses.add(
    name="DataLake",
    description="Central data lake"
)

OneLake Data Access Roles

See OneLake Security for detailed information on managing data access roles, row-level security, and column-level security.

# Quick example
from fabias import Role, Rule, EntraMember, ReadWrite

lakehouse = ws.lakehouse("Analytics")

# Create a reader role
role = Role(
    name="DataReaders",
    rules=[Rule(paths=["tables"], accessLevel=ReadWrite.READ)],
    members=[EntraMember("user-principal-id")]
)

# Save to lakehouse
lakehouse.accessRoles.add(role)