microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.55k stars 898 forks source link

Serverless Pool View created on OPENROWSET with csv file source reports errors when the option: HEADER_ROW = TRUE is specified #25053

Open jasonhorner opened 10 months ago

jasonhorner commented 10 months ago

Not entirely sure if this is an issue with dacfx.. It builds fine from the latest version of ADS however the file in ADS has the infamous red squiggly's:

image

Here are the errors I'm seeing in VS2022: image

Steps to Reproduce:

  1. Valid SQL CREATE VIEW AS SELECT src.id FROM OPENROWSET( BULK 'demo/demofile.csv', DATA_SOURCE = 'dls', FORMAT='CSV', HEADER_ROW = TRUE, PARSER_VERSION = '2.0' ) with (id int ) AS src
  2. CREATE VIEW AS SELECT src.id FROM OPENROWSET( BULK 'demo/demofile.csv', DATA_SOURCE = 'dls', FORMAT='CSV', /* HEADER_ROW = TRUE,*/ PARSER_VERSION = '2.0' ) with (id int ) AS src

Commenting the option out works

for reference here is the entire set of supported options in serverless: https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/develop-openrowset#syntax

Did this occur in prior versions? If not - which version(s) did it work in?

(DacFx/SqlPackage/SSMS/Azure Data Studio)

dzsquared commented 10 months ago

While this is an issue showing up in a few different tools - its coming from a single dependency. (not dacfx) I'm going to move this to the ADS repo so we can track it being updated there and work with the SSDT folks on picking up the fix as well.