Class OneLakeLocation

java.lang.Object
io.openlineage.client.utils.OneLakeLocation

public final class OneLakeLocation extends Object
What is known about a location in OneLake, Microsoft Fabric's storage, and the fabric_onelake dataset facet built from it.

OneLake paths have the form abfss://<workspace>@onelake.dfs.fabric.microsoft.com/<item>/<section>/..., where the section is Tables or Files. This class reads the form written with IDs, d1f6473b-...@onelake.dfs.fabric.microsoft.com/c7a14054-.../Tables/sales/orders. Every field is optional: each producer sets only what it knows locally, without calling Fabric.

  • Field Details

  • Method Details

    • parse

      public static Optional<OneLakeLocation> parse(String namespace, String name)
      Reads a OneLake location written with IDs from a dataset's namespace and name, such as abfss://<workspace ID>@onelake.dfs.fabric.microsoft.com and <item ID>/Tables/<table>.
      Returns:
      the location, or empty if this isn't a OneLake path that names an item by ID
    • guid

      public static Optional<UUID> guid(String value)
      Reads an ID, returning empty instead of failing when the text isn't one.
    • guidIdentifier

      public Optional<DatasetIdentifier> guidIdentifier()
      The location written with IDs, as abfss://<workspace ID>@onelake.dfs.fabric.microsoft.com/<item ID>/..., with lowercase IDs and no trailing slash.
      Returns:
      the location, or empty if either ID isn't known or there's no path after the item, as the item's root isn't a dataset
    • guidLocation

      public Optional<String> guidLocation()
      guidIdentifier() as a single path.
    • toFacet

      public OpenLineage.FabricOneLakeDatasetFacet toFacet(OpenLineage openLineage)
      Builds the fabric_onelake facet from everything known. The table ID is written in lowercase, as the spec requires.
    • builder

      public static OneLakeLocation.OneLakeLocationBuilder builder()
    • toBuilder

    • getWorkspaceId

      public UUID getWorkspaceId()
    • getWorkspaceName

      public String getWorkspaceName()
    • getItemId

      public UUID getItemId()
    • getItemName

      public String getItemName()
    • getItemType

      public String getItemType()
      Fabric's name for the item's type, such as Lakehouse or Warehouse.
    • getPath

      @NonNull public @NonNull List<String> getPath()
      Path segments after the item, such as [Tables, sales, orders].
    • getTableId

      public String getTableId()
      ID of the table's Delta metadata (metaData.id).
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object