pmscorca - Thanks for the question and using MS Q&A platform.
You can use Microsoft Spark Utilities - to rename file.
mssparkutils.fs
provides utilities for working with various file systems, including Azure Data Lake Storage Gen2 (ADLS Gen2) and Azure Blob Storage.
To demo practically, I had a part-00000 file in the delta folder as shown below:
Utilized mssparkutils.fs.mv
command to rename the part-00000
file with the meaning full name as per your requirement.
old_name = r"abfss://******@cheprasynapse.dfs.core.windows.net/delta/delta-table-0/part-00000-dfd2415b-7a09-4e61-a8e5-96e9f38dc367-c000.snappy.parquet"
new_name = r"abfss://******@cheprasynapse.dfs.core.windows.net/delta/delta-table-0/pradeep.snappy.parquet"
mssparkutils.fs.mv(old_name, new_name)
We had successfully renamed part-00000
file with the meaning full name as per your requirement.
Hope this helps. Do let us know if you any further queries.