The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm not able to verify right now, but if I understand a YouTube post by WafaStudies, you can use the provider org.apache.hadoop.fs.azurebfs.sas.FixedSASTokenProvider
to read directly from first generation azure storage:
"31. Acccess ADLS Gen2 or Blob Storage using a SAS token in Azure Databricks"
https://youtu.be/_lkN0lTzl60?si=wo5ZVAhw2joaR-Gj&t=416
Unfortunately, I think I tried that in both ASA Spark and MS Fabric and I believe I got an error indicating that
org.apache.hadoop.fs.azurebfs.sas.FixedSASTokenProvider
doesn't exist.
What is a dirt easy way for me to read from an old deprecated Azure storage account via Microsoft Fabric?
I want to be able to do something like this to get my data out of my old Gen1 storage account:
myDataFrame = spark.read.csv(
'abfs://myContainer@myStorageAccountName.dfs.core.windows.net/data/myDirectoryPath/myFile.csv',
header=True
)
Solved! Go to Solution.
Hi @Shawn_Eary,
Thanks for using Fabric Community. Apologies for the delay in reply from our side.
As I understand you are trying to access a CSV file present in Azure Blob storage. You can do the same by using the following command:
import pandas as pd
data = pd.read_csv('SAS URL of your file')
display(data)
The Blob SAS Url can be found by right clicking on the Azure portal's blob file that you want to import and selecting Generate SAS. Then, click Generate SAS token and URL button and copy the SAS url to above code in place of blob_sas_url.
The above code helps in getting the data from the CSV file. I have created a repro of the scenario at my side and I was successful in fetching the data from Azure Blob Storage. I have attached the screenshots for your reference.
Hope this helps. Do let us know if you have any further queries.
Hi @Shawn_Eary,
Thanks for using Fabric Community. Apologies for the delay in reply from our side.
As I understand you are trying to access a CSV file present in Azure Blob storage. You can do the same by using the following command:
import pandas as pd
data = pd.read_csv('SAS URL of your file')
display(data)
The Blob SAS Url can be found by right clicking on the Azure portal's blob file that you want to import and selecting Generate SAS. Then, click Generate SAS token and URL button and copy the SAS url to above code in place of blob_sas_url.
The above code helps in getting the data from the CSV file. I have created a repro of the scenario at my side and I was successful in fetching the data from Azure Blob Storage. I have attached the screenshots for your reference.
Hope this helps. Do let us know if you have any further queries.
Hi @Shawn_Eary ,
Glad to know that your query got resolved. We expect you to keep using this forum for help on your queries.
User | Count |
---|---|
15 | |
10 | |
7 | |
4 | |
3 |
User | Count |
---|---|
46 | |
23 | |
17 | |
17 | |
12 |