Forum Discussion
How to update field names using XMLA for all visuals without power query?
Ok any tools for doing this without destroying visuals ?
- v-dineshya10 months ago
Community Support
Hi jaryszek ,
You can use the Fabric notebooks by using the PySpark code to change the column names of a table in Lakehouse. Please refer below PySpark code. to rename the column names.
spark.read.table("tableName")\
.withColumnRenamed("oldColumnName", "newColumnName")\
.write\
.mode("overwrite")\
.option("overwriteSchema", "true")\
.saveAsTable("tableName")Please refer below example.
1. I have created sample data in Lakehouse.
2. Created a Notebook, and run the below sample PySpark code to rename the column names.
It will change the column names and save the Notebook. And then refresh the table in Lakehouse, it will reflect the changes.
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
- jaryszek10 months ago
Super User
thanks, let's do not close topic, maybe somebody will propsoe another tool also.
Best,
Jacek- v-dineshya10 months ago
Community Support
Hi jaryszek ,
Thank you for the update, we will keep this thread open while continuing to look for alternative solutions. If you discover any workaround , kindly post them here, as it could benefit other community members.
Regards,
Dinesh