Why does fsspec always connects to blob?

Robin Kühling 6 Reputation points
2021-10-26T13:18:18.77+00:00

I am currently working in an Azure Synapse Notebook. I use fsspec (https://learn.microsoft.com/en-us/azure/synapse-analytics/machine-learning/tutorial-spark-pool-filesystem-spec) to connect to a datalake storage to read and write json files.

Although everything is configured to connect to datalake storage, fsspec seems to try to build a connection to a blob storage which is not accessable:

ServiceRequestError: Cannot connect to host accountname.blob.core.windows.net:443 ssl:True [Name or service not known]

What am I doing wrong? My code looks like this:

import fsspec
import pandas

adls_account_name = 'accountname' #Provide exact ADLS account name
sas_key = TokenLibrary.getConnectionString('Staging')

fsspec_handle = fsspec.open('abfs://sandbox/marketing/schema.json', account_name = adls_account_name, sas_token=sas_key)

with fsspec_handle.open() as f:
df = pandas.read_json(f)

df.head()

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,342 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Robin Kühling 6 Reputation points
    2021-10-28T10:22:49.83+00:00

    It seems like fsspec always routes over blob.core even if the private endpoints specifies the url as dfs.core. After creating a private endpoints for the data lake which explioctly routes over blob.core the code works again.

    1 person found this answer helpful.