cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

external table not being written to data lake

mridultuteja
New Contributor II

I was following a tutorial to learn databricks from https://youtu.be/7pee6_Sq3VY
Great video btw

I am stuck here at 2:52:24
I am trying to create an external table directly to data lake but i am facing some weird issue saying no such location exists.
I have already tried list and it was able to access the path and list all my files on data lake

mridultuteja_0-1746405222446.png

mridultuteja_1-1746405246157.png

 

 

6 REPLIES 6

Brahmareddy
Honored Contributor III

Hi mridultuteja,

How are you doing today?, As per my understanding, If you’re getting an error like “no such location exists” when trying to create an external table, even though dbutils.fs.ls() works and lists your files, the issue is usually related to how paths are referenced when using Unity Catalog. When creating an external table, especially with CREATE TABLE ... LOCATION, Unity Catalog expects the path to be registered as an external location with proper permissions. Just because the notebook can read the path doesn't mean Unity Catalog has the right access. To fix this, go to the Databricks UI, register your external location under Data > External Locations, and make sure your storage credential has the correct access to the path. Once that’s done, try creating the table again using that external location. Let me know if you want help setting up the location registration—it’s a one-time thing, and then it works smoothly!

Regards,

Brahma

Takuya-Omi
Valued Contributor III

@mridultuteja 

Hi,

In addition to Brahma's excellent response, I’ll also attach some helpful links.
This issue has come up multiple times in the community in the past.

https://community.databricks.com/t5/data-governance/no-parent-external-location-for-path-when-browsi...

https://community.databricks.com/t5/databricks-free-trial-help/getting-error-while-creating-external...

 

--------------------------
Takuya Omi (尾美拓哉)

mridultuteja
New Contributor II

I still need help in this 

mridultuteja_0-1746646159374.png

 

Brahmareddy
Honored Contributor III

Hi,

Did you try out my suggestion?

Regards,

Brahma

I need help in registering the location as you have guided.
Thanks in advance.

Isi
Contributor III

Hey @mridultuteja 

To register an external location, you have to first create a Storage Credential, and then create the External Location.

This process allows Databricks to securely access data stored in Azure Data Lake Storage Gen2 (ADLS Gen2), while maintaining fine-grained access control through Unity Catalog. External locations are used to govern access to files and directories outside of the managed Delta Lake tables.

There are different approaches to creating this through SQL or the UI, and I’m sharing a video that could help you understand it more easily 🙂

https://www.youtube.com/watch?v=KBB14qcELD4

Hope this helps, 🙂

Isi

In this video, you'll learn how to create storage credentials and set up an external location using Databricks Unity Catalog. ☕ Buy me a coffee: https://buymeacoffee.com/navalyemul Follow me on LinkedIn: https://www.linkedin.com/in/naval-yemul-a5803523/ Azure link: ...

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now