Forum Discussion

Shmyg's avatar
Shmyg
Copper Contributor
Mar 25, 2025

Cannot create an external table in SQL Server

Hi,

I have an on-premise SQL Server 16.01.1135.2. I am trying to create an external file format:

CREATE EXTERNAL FILE FORMAT skipHeader_CSV

WITH (FORMAT_TYPE = DELIMITEDTEXT,

      FORMAT_OPTIONS(

          FIELD_TERMINATOR = ',',

          STRING_DELIMITER = '"',

          FIRST_ROW = 2,

          USE_TYPE_DEFAULT = True)

);

but it gives me the following error:

Msg 102, Level 15, State 1, Line 1

Incorrect syntax near 'EXTERNAL'.

Completion time: 2025-03-24T23:13:46.7487583+01:00

Table creation clause is copied from the documentation. What am I doing wrong?

2 Replies

  • ccaab's avatar
    ccaab
    Copper Contributor

    EXEC sp_configure 'polybase enabled', 1;

     RECONFIGURE;

  • rodgerkong's avatar
    rodgerkong
    Iron Contributor

    It seems you need to enable PolyBase first. Check this document https://learn.microsoft.com/en-us/sql/relational-databases/polybase/virtualize-csv?view=sql-server-ver16

Resources