Package io.delta.kernel.unitycatalog
Class UnityCatalogUtils
Object
io.delta.kernel.unitycatalog.UnityCatalogUtils
-
Method Summary
Modifier and TypeMethodDescriptiongetPropertiesForCreate(io.delta.kernel.commit.CommitMetadata commitMetadata) Same asgetPropertiesForCreate(Engine, SnapshotImpl)but reads from CommitMetadata.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).static List<io.delta.storage.commit.uccommitcoordinator.UCClient.ColumnDef> toColumnDefs(io.delta.kernel.types.StructType schema) Converts a KernelStructTypeschema to a list of UCUCClient.ColumnDefdefinitions suitable for the Unity Catalog createTable API.
-
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 asgetPropertiesForCreate(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 KernelStructTypeschema to a list of UCUCClient.ColumnDefdefinitions suitable for the Unity Catalog createTable API.
-