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.​

karthik_p
Databricks Partner

@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

karthik.p

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.