Hi Saurabh,
Thanks for your reply.
Please confirm, as I'm not able to understand your answer.
I have only issues with accessing Azure Blob Storage "wasbs" NOT Gen2 "abfss". My Synapse workspace do not have a managed VNET, only the blob storage are in a Vnet.
Let me give you an example. Using linked services I am able to:
blob_sas_token = mssparkutils.credentials.getConnectionStringOrCreds(linked_service)
spark.conf.set(
f"fs.azure.sas.{container}.{account}.dfs.core.windows.net",
blob_sas_token)
abfss_path = f'abfss://{blob_container_name}@{blob_account_name}.dfs.core.windows.net/path/part0.snappy.parquet'
df = spark.read.load(abfss_path, format='parquet')
display(df.limit(10))
I'm even able to read this without having to get and pass as spark config the blob_sas_token.
If I take the same code, but for blob storage (wasbs). I get the error:
Py4JJavaError: An error occurred while calling o167.load. : org.apache.hadoop.fs.azure.AzureException: com.microsoft.azure.storage.StorageException: Public access is not permitted on this storage account.
Which I find it weird due to the fact I can access to it form the SQL pool.
The example code, as above:
blob_sas_token = mssparkutils.credentials.getConnectionStringOrCreds(linked_service)
spark.conf.set(
f"fs.azure.sas.{container}.{account}.blob.core.windows.net",
blob_sas_token)
wasbs_path = f'wasbs://{blob_container_name}@{blob_account_name}.blob.core.windows.net/path/part0.snappy.parquet'
df = spark.read.load(wasbs_path, format='parquet')
display(df.limit(10))
** for each of them I have created a linked service
Any advice/idea on I should be doing this is very much welcome