1

I am trying out the new Polybase-Feature in SQL-Server by connecting to a CSV. However I do not manage to connect to the Azure Blob Storage:

CREATE EXTERNAL DATA SOURCE AzureBlob WITH (
    TYPE = HADOOP,
    LOCATION = 'wasbs://myfolder@myblob.blob.core.windows.net',
    CREDENTIAL = mycredential
);
GO 

I always get an error saying:

Incorrect syntax near 'HADOOP'

My SQL Server runs on an Azure VM, however I am not sure which services are supposed to be running: enter image description here

I also checked TCP/IP is enabled. enter image description here

I also tried using SSDT and dsql-files as suggested in this post - but the error doesn't go away.

5th
  • 2,097
  • 3
  • 22
  • 41

2 Answers2

3

However I do not manage to connect to the Azure Blob Storage

Should it not be a Type=BLOB_STORAGE?

CREATE EXTERNAL DATA SOURCE AzureBlob WITH (
    TYPE = BLOB_STORAGE,
    LOCATION = 'wasbs://myfolder@myblob.blob.core.windows.net',
    CREDENTIAL = mycredential
);

Update 2020-02-18:

I encounter the same famous message recently:

Incorrect syntax near 'HADOOP'

It can be fixed running:

exec sp_configure 'polybase enabled', 1;
GO
RECONFIGURE

Microsoft built a nice page: Configure PolyBase to access external data in Azure Blob Storage. However, they didn't include that important command.

I think it could also be a reason of the initial issue of 5th

Alexander Volok
  • 5,630
  • 3
  • 17
  • 33
  • Thanks it works now, for some reason I assumed Microsoft documentation is up-to-date :P – 5th Feb 07 '19 at 10:27
  • @5th, you welcome, despite that your SQL Instance run in Azure VM, it is still fully sized instance and not Azure SQL DB. Perhaps this can be misleading.. – Alexander Volok Feb 07 '19 at 10:34
  • Thanks - I am aware of that. For some reason in my firm we do not have VM-Ware, I guess they will act when I use AzureVMs often enough. – 5th Feb 07 '19 at 12:38
  • @Blue Clouds, this is correct, PolyBase is not part of Azure SQL DB – Alexander Volok Feb 17 '20 at 08:19
1

While I accepted Alexander's answer, it turns out that the option BLOB_STORAGE doesn't allow to create external tables. The option HADOOP was the correct one for me. There were three steps I needed to do to make the HADOOP option work:

  1. Re-install Java Runtime Environment
  2. Repair the SQL Server Installation
  3. Restart the Virtual Machine

Then the SQL-Statement from my question worked.

5th
  • 2,097
  • 3
  • 22
  • 41