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.
Why does fsspec always connects to blob?
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()