Forum Discussion

kely's avatar
kely
Frequent Visitor
2 years ago
Solved

Lakehouse Schema (preview) issues

So MSFT exposed Lakehouse Schemas as a preview product in the last month or so...  Have you used this feature?     I have, and let me say, I don't understand why MSFT feels the need to push somethi...
  • Anonymous's avatar
    Anonymous
    2 years ago

    HI kely,

    We’re really sorry that the preview feature caused any inconvenience to your experience.

    For your description, I think this should be more related to the preview feature has changed on the Lakehouse schema. So that it may not be compatible with original features, each of them required to re-adaptation between two versions.

    Also, the 'shipped' mark on the preview feature roadmap may not means they fully finished and released to the general environment. (they will be test in internal at first and if release lately if the test works well)

    BTW, these 'shipped' parts may be rollbacked if any internal request/reasons or compatible issues, but the status may not update intime.

    Regards,

    Xiaoxin Sheng

  • kely's avatar
    2 years ago

    Hello everyone!  Being a fairly stubborn guy, and knowing that Fabric sometimes has more than one way to do this, I tested this pyspark and BANG it worked!

     

    Notebook mounts a Lakehouse 1, and writes to Lakehouse 2 with schema enabled... and it works!

     

     

    sql = """

    select *
    from TableInLakehouse1

    """

    df = spark.sql(sql)


    # (over)write table to BusinessModel_DataProduct lakehouse
    df.write.mode("overwrite").option("overwriteSchema", "true").format("delta").save("abfss://[target lakehouse 2 workspace guid]@onelake.dfs.fabric.microsoft.com/[target lakehouse 2 guid]/Tables/dim/schematesttable")

    display(df)