Class UnityCatalogUtils

Object
io.delta.kernel.unitycatalog.UnityCatalogUtils

public class UnityCatalogUtils extends Object
  • Method Details

    • getPropertiesForCreate

      public static Map<String,String> getPropertiesForCreate(io.delta.kernel.engine.Engine engine, io.delta.kernel.internal.SnapshotImpl postCreateSnapshot)
      Extract all properties that should be sent to Unity Catalog when creating a table (version 0).

      This method extracts:

      • All table properties from the metadata configuration
      • Protocol-derived properties (e.g., delta.minReaderVersion=3, delta.feature.XXX=supported)
      • UC-specific properties (delta.lastUpdateVersion, delta.lastCommitTimestamp)
      • Clustering properties if a clustering domain metadata is present
      Parameters:
      engine - the engine to use for I/O operations (to retrieve the commit timestamp)
      postCreateSnapshot - the snapshot after version 0 has been written
      Returns:
      a map of properties to send to Unity Catalog
      Throws:
      IllegalArgumentException - if the snapshot is not version 0
    • getPropertiesForCreate

      public static Map<String,String> getPropertiesForCreate(io.delta.kernel.commit.CommitMetadata commitMetadata)
      Same as getPropertiesForCreate(Engine, SnapshotImpl) but reads from CommitMetadata.
    • toColumnDefs

      public static List<io.delta.storage.commit.uccommitcoordinator.UCClient.ColumnDef> toColumnDefs(io.delta.kernel.types.StructType schema)
      Converts a Kernel StructType schema to a list of UC UCClient.ColumnDef definitions suitable for the Unity Catalog createTable API.