- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2025 11:09 AM
Root Cause:
Unity Catalog’s CREATE TABLE command automatically adds default Delta table properties (like collation) which do not match the existing properties stored inside the table’s _delta_log folder on disk.
Solution thinking:
Use Unity Catalog CLI (uc table create) with parameters that exactly match the existing table metadata and properties.
The CLI command is used to create an external table in Unity Catalog that points to existing data stored in an external location (e.g., an S3 path containing a Delta table).
Key Required Parameters
--full_name: The full name of the table including catalog, schema, and table name.
Example: my_catalog.my_schema.my_table
--columns: The schema of the table expressed as SQL column definitions with names and data types.
Example: "id INT, name STRING, ts TIMESTAMP"
--storage_location: The external storage path where the Delta table files reside.
Example: s3://my-bucket/path/to/delta_table
Optional Parameters
--format: Data format (default is DELTA), explicitly specify if needed.
--properties: Table properties JSON string that must exactly match the existing Delta table properties on disk to avoid mismatch errors.
Example CLI command to register existing Delta table:
bash
bin/uc table create \
--full_name my_catalog.my_schema.my_table \
--columns "id INT, name STRING, ts TIMESTAMP" \
--storage_location "s3://my-bucket/path/to/delta_table" \
--format DELTA \
--properties '{"delta.appendOnly": "false", "delta.autoOptimize.optimizeWrite.enabled": "true", "collation": "..."}'
Here, --properties must reflect the actual properties from the _delta_log folder of the existing Delta table (including the collation property if present).
This avoids errors such as [DELTA_CREATE_TABLE_WITH_DIFFERENT_PROPERTY] caused due to property mismatches.