Forum Discussion

Ali_CloudBI's avatar
Ali_CloudBI
Frequent Visitor
1 year ago

Select data from Lakehouse table from schema

Hi all,

I have an issue working with the delta table in Lakehouse when the data is created in a schema other than dbo. The table is created under the schema by  SourceDF.write.format("delta").mode("overwrite").save(TablePath), however, I get an error on reading the table. Has anyone tested this before?

 

5 Replies

  • can you run queries against dbo tables?

    Maybe omit the db name?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Ali_CloudBI ,

     

    Thanks for the reply from lbendlin .

     

    I get an error when I query the table below the dbo using your syntax.

     

    After switching to this syntax, it runs fine.

    %%sql
    USE daisyTest1;
    SELECT * FROM products LIMIT 1000.

     

    This syntax can not specify the schema in the red box, only the blue box.

     

    If you have any other questions please feel free to contact me.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    • Ali_CloudBI's avatar
      Ali_CloudBI
      Frequent Visitor

      I know it works without schema, my intention is to create different schemas and create the related tables under each own schema