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:ย 

How we can read data from adls gen 2 using bash (%sh) command.(without mounting)

SS2
Valued Contributor

Hi @Ananth Arunachalam/Team,

Can we read file from ADLS gen 2 using shell script (%%bash or %%sh ) without doing mounting.โ€‹

Please let me know. Thank you.โ€‹

2 REPLIES 2

karthik_p
Esteemed Contributor

@S Sโ€‹ you can access data in ADLS GEn2 using multiple ways, please check below article.

easy way is using storage account access key method

https://learn.microsoft.com/en-us/azure/databricks/storage/azure-storage

SS2
Valued Contributor

@karthik p i know with the help of pyspark(python) and spark (Scala) you can access.

But my question is that how you can access in shell because shell dose not support Spark.

โ€‹

For ex:- echo "abfss://container@storageAccount.dfs.core.windows.net/external-location/path/to/data"

โ€‹

This will not work.

โ€‹If you're not getting it then try to run this command (echo ..) in your Databricks notebook and see what error you're getting.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group