Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Potpot
Frequent Visitor

Unable to rename Lakehouse Table

Using the UI renaming a LakeHouse table doesn't update the table name. No change is made.

2 REPLIES 2
Heaven
Regular Visitor

HOW CAN WE CHANGE THE COLUMN HERE??

GilbertQ
Super User
Super User

Hi @Potpot 

 

As far as I am aware, you would likely need to use a Python notebook to rename the table.

 

Here is the same code below where I am renaming my table from "fact_daily_f2" to "fact_daily"

# Welcome to your new notebook
# Type here in the cell editor to add code!
from pyspark.sql import SparkSession

# Create a Spark session
spark = SparkSession.builder \
    .appName("RenameDeltaTable") \
    .config("spark.databricks.delta.retentionDurationCheck.enabled", "false") \
    .getOrCreate()

# Rename Delta table
spark.sql("ALTER TABLE fact_daily_f2 RENAME TO fact_daily")

# Stop the Spark session
spark.stop()

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors