0

I'm able to create an external table in Serverless Pool, but the table won't allow me to select first row.

As you can see from the screen shot columns C1, C2, C3, C4, C5 apear in the first row

enter image description here

Even though I have specified to use the first row when creating the external table.

enter image description here

Patterson
  • 1,927
  • 1
  • 19
  • 56

1 Answers1

0

indeed you've to set First Row to 2 if you would like to skip the headers in the file. Besides I wasn't able to see first row statement on the screenshots of the scripts in your question.

Please have a look at the official documentation here.

In your Create External File Format section of your script you have to say "Format_Options(FIRST_ROW = 2)".

By the way this is also very good explained in another Stackoverflow question here.

Onur Omer
  • 506
  • 3
  • 12
  • Hi @Onur, I change the format to the following but it failed ```IF NOT EXISTS (SELECT * FROM sys.external_file_formats WHERE name = 'SynapseDelimitedTextFormat') CREATE EXTERNAL FILE FORMAT [SynapseDelimitedTextFormat] WITH ( FORMAT_TYPE = DELIMITEDTEXT , FORMAT_OPTIONS ( FIELD_TERMINATOR = ',', USE_TYPE_DEFAULT = FALSE FIRST_ROW =2) )) GO``` – Patterson Dec 19 '22 at 16:03
  • 1
    `USE_TYPE_DEFAULT = FALSE ,FIRST_ROW =2` give comma between the options – Aswin Dec 20 '22 at 07:25