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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Jeanxyz
Impactful Individual
Impactful Individual

how to refer to a folder in Lakehouse using Pyspark

Hi, I have written a function which read documents from a local folder, which works well. Now I need to move the script and the local folder to OneLake and I have difficulty to refer to the folder in Fabric. I have tried relative path and absf path, both failed. Any ideas?

Jeanxyz_0-1726214292795.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Jeanxyz,

I'd like to suggest you use the file API path to instead, you can 'right click' on file stored in the folder and copy its API path.

/lakehouse/default/Files/source_files/

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @Jeanxyz,

I'd like to suggest you use the file API path to instead, you can 'right click' on file stored in the folder and copy its API path.

/lakehouse/default/Files/source_files/

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
FBCApril_Carousel

Fabric Monthly Update - April 2025

Check out the April 2025 Fabric 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
Top Kudoed Authors