onelake_paths
sqllocks_spindle.fabric.onelake_paths
¶
OneLake path construction for Fabric Lakehouse landing zones.
Classes¶
OneLakePaths
¶
Constructs proper OneLake paths for Fabric Lakehouse items.
Supports the standard landing zone layout::
Files/landing/<domain>/<entity>/dt=YYYY-MM-DD/hour=HH/
Files/landing/<domain>/<entity>/_control/
Files/quarantine/<domain>/<run_id>/
Works both inside a Fabric runtime (auto-detected via FABRIC_RUNTIME
or TRIDENT_RUNTIME_VERSION environment variables) and locally with a
configurable base path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_path
|
str | Path | None
|
Root path for the Lakehouse Files area. If None,
auto-detects: inside Fabric uses |
None
|
Attributes¶
base
property
¶
Return the resolved base path (Path for local, str URI for remote).
Methods:¶
landing_zone_path(domain, entity, dt, hour=None)
¶
Build the landing zone partition path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
str
|
Domain name (e.g. |
required |
entity
|
str
|
Entity / table name (e.g. |
required |
dt
|
str
|
Date string in |
required |
hour
|
str | int | None
|
Optional hour partition ( |
None
|
Returns:
| Type | Description |
|---|---|
Path | str
|
Fully qualified landing zone directory path. |
quarantine_path(domain, run_id)
¶
Build the quarantine directory for failed / rejected rows.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
str
|
Domain name. |
required |
run_id
|
str
|
Unique identifier for the ingestion run. |
required |
Returns:
| Type | Description |
|---|---|
Path | str
|
Quarantine directory path. |
tables_path(table_name)
¶
Build the Tables path for a Delta table (sibling of Files).
This points to <lakehouse_root>/Tables/<table_name> — the
standard location that DeltaWriter targets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table_name
|
str
|
Name of the Delta table. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to the table directory under Tables. |
control_path(domain, entity)
¶
Build the control directory path for manifests and done flags.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
str
|
Domain name. |
required |
entity
|
str
|
Entity / table name. |
required |
Returns:
| Type | Description |
|---|---|
Path | str
|
Control directory path. |
manifest_path(domain, entity, dt)
¶
Build the manifest file path for a given date partition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
str
|
Domain name. |
required |
entity
|
str
|
Entity / table name. |
required |
dt
|
str
|
Date string in |
required |
Returns:
| Type | Description |
|---|---|
Path | str
|
Path to the manifest JSON file. |
done_flag_path(domain, entity, dt)
¶
Build the done-flag (sentinel) file path for a given date partition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
str
|
Domain name. |
required |
entity
|
str
|
Entity / table name. |
required |
dt
|
str
|
Date string in |
required |
Returns:
| Type | Description |
|---|---|
Path | str
|
Path to the |