Did you include the angle brackets in the URI? Those are only mark that the values are placeholders.
QLServer 2019 Polybase - CREATE EXTERNAL DATA SOURCE returns unsupported URI
I am trying to create an external data source in SQL Server to an Azure Storage account. I have created the database scoped credential, but when I execute the CREATE EXTERNAL DATA SOURCE command, I get this:
Msg 105080, Level 16, State 1, Line 7
105080;CREATE EXTERNAL TABLE failed because the URI contains an unsupported path, fragment, user info, or query. Revise the URI and try again.
My create statement looks like this (obviously I have provided the correct container and account, just making it generic here for the sake of security):
CREATE EXTERNAL DATA SOURCE Blob_CSV
WITH
(
LOCATION = 'abs://<container>@<account>.blob.core.windows.net/',
CREDENTIAL = BlobStorageCredential
);
So I am not sure why I am getting the error. I have essentially followed the instructions here:
Thanks in advance.
Azure Blob Storage
SQL Server Other
3 answers
Sort by: Most helpful
-
Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
2023-09-19T21:04:38.4133333+00:00 -
Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
2023-09-19T21:42:02.2133333+00:00 I look the external data source I have set up, and it looks slightly different:
CREATE EXTERNAL DATA SOURCE [testelitest_container] WITH (LOCATION = N'abs://MyResourceGroup.blob.core.windows.net/testelitest', CREDENTIAL = [testelitest])
So there is no @ in it. Then again, when I added a @ in the middle of it that worked. I should add that this is on SQL 2022. My Polybase on SQL 2019 is broken.
-
Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
2023-09-20T21:05:22.1733333+00:00 I think there is a quite simple answer. The URL in your original question ends in sql-server-ver16, and SQL 16 is SQL 2022. And this page says that it applies to SQL 2022 with no mention of earlier versions. So the
abs
interface is simply not available on SQL 2019. It seems that you can use wasb for blob storage on SQL 2019, but you may not get the direct CSV support. See https://learn.microsoft.com/en-us/sql/t-sql/statements/create-external-data-source-transact-sql?view=sql-server-ver15&tabs=dedicated.