Cannot create EXTERNAL TABLE on Azure SQL Databse Cannot create EXTERNAL TABLE on Azure SQL Databse azure azure

Cannot create EXTERNAL TABLE on Azure SQL Databse


The problem is (probably) that you are trying to use PolyBase on an Azure SQL Database, but PolyBase is only supported on on SQL Service 2016 on-premise. It is, however, supported on Azure SQL Datawarehouse: PolyBase Versioned Feature Summary

If you instead of an Azure SQL Database create an Azure SQL Datawarehouse you should have the PolyBase features available, including creating an external file format.

SQL data warehouse in Azure portal

Running this:

CREATE EXTERNAL FILE FORMAT TextFormat WITH (    FORMAT_TYPE = DELIMITEDTEXT,     FORMAT_OPTIONS (        FIELD_TERMINATOR = N'~ΒΆ~',         USE_TYPE_DEFAULT = False    ),     DATA_COMPRESSION = N'org.apache.hadoop.io.compress.GzipCodec')GO  

On an Azure SQL Database will give you an error like:

Msg 102, Level 15, State 1, Line 1Incorrect syntax near 'EXTERNAL'.

Running the same thing on Azure SQL Data warehouse will work

Command(s) completed successfully.

You will not be able to work with Hadoop databases using Azure SQL data warehouse, but working with Azure blob Storage is supported.