The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
How do we reference multiple lakehouse within a notebook. Can anyone please help me with sample code for writing data to another lakehouse Table within the workspace.
when I try this code, it gives me error - silver_zone is not defined. but i have created a lakehouse named silver_zone
df.write.format("delta").mode("overwrite") \ .saveAsTable('silver_zone.output_table_Silver')
Thanks,
Pallavi
Solved! Go to Solution.
Hey @pallavi_r ,
I assume that both lakehouses are in the same workspace as the notebook, then this is a strange message because this is my sample code:
# the default lakehouse of the notebook
df_asimpletable.write.mode("overwrite").format("delta").saveAsTable("df_asimpletable_new")
# another lakehouse but the same workspace
df_asimpletable.write.mode("overwrite").format("delta").saveAsTable('a_new_lakehouse.df_asimpletable_newer')
And it works perfectly.
Hopefully, this helps to tackle your challenge.
Regards,
Tom
Hey @pallavi_r ,
I assume that both lakehouses are in the same workspace as the notebook, then this is a strange message because this is my sample code:
# the default lakehouse of the notebook
df_asimpletable.write.mode("overwrite").format("delta").saveAsTable("df_asimpletable_new")
# another lakehouse but the same workspace
df_asimpletable.write.mode("overwrite").format("delta").saveAsTable('a_new_lakehouse.df_asimpletable_newer')
And it works perfectly.
Hopefully, this helps to tackle your challenge.
Regards,
Tom
User | Count |
---|---|
38 | |
14 | |
12 | |
11 | |
8 |
User | Count |
---|---|
49 | |
35 | |
23 | |
21 | |
18 |