Problem
You are using Delta Sharing to share partitioned data from partitioned tables between Databricks workspaces. You notice the shared table in the target workspace appears empty except you can see column names. You further notice that all the data is visible after you remove the partition filter from the share.
You have already verified the table in the source workspace contains data, and the partitions are added to the share.
Cause
The partition column in the Delta Sharing partition filter is of decimal(38,4)
data type, which includes trailing zeros.
When you add a partition filter with a value such as “1234”
, it does not match the actual data representation in the source workspace with the trailing zeros, which is “1234.0000”
.
The mismatch causes data not to be returned.
Solution
1. Verify the data type and representation of the partition column in the source workspace.
2. Upon adding a partition filter to the share, use the correct representation of the value including any trailing zeros (`1234.0000`
instead of `1234`
).
3. Use SQL to update the share to use the correct partition value with the correct representation.
ALTER SHARE <your-Delta-share> ADD TABLE <your-table> PARTITION (<col-name> = '1234.0000');