Forum Discussion

jashfabric's avatar
jashfabric
Helper II
2 years ago
Solved

Cannot query multiple files in Lakehouse

Hi
I am new to Fabric and experimenting with notebooks. How can I read multiple files present in a Lakehouse using a notebook?

I tried to read the csv files using this code, but receiving an error:

 

df = spark.read.format("csv").option("header","true").load("Files/**")

display(df)

Error: Path not found

Appreciate your help.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi jashfabric 
    Thanks for using Fabric Community.
    You can use the below code:
    df = spark.read.format("csv").option("header","true").load("Files")
    display(df)

    I have created a repro for you. 

     

    Hope this helps. Please let me know if you have any other questions.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi jashfabric 
    Glad that your query got resolved. Please continue using Fabric Community for any help regarding your queries.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi jashfabric 
    Thanks for using Fabric Community.
    You can use the below code:
    df = spark.read.format("csv").option("header","true").load("Files")
    display(df)

    I have created a repro for you. 

     

    Hope this helps. Please let me know if you have any other questions.

    • jashfabric's avatar
      jashfabric
      Helper II

      Thank you so much Anonymous !
      That helped me. Thanks for the detail explaination.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi jashfabric 
        Glad that your query got resolved. Please continue using Fabric Community for any help regarding your queries.