Skip to content

Support Synapse Serverless OPENROWSET syntax #5114

@daviewales

Description

@daviewales

Search before asking

  • I searched the issues and found no similar issues.

What Happened

I have some code similar to this example code:

SELECT *
FROM OPENROWSET(BULK 'https://<storage account>.dfs.core.windows.net/container/folder/*.parquet',
                FORMAT = 'PARQUET') AS [file]

When I run sqlfluff lint, I get:

Found unparsable section: "from OPENROWSET(\n        BULK 'https..."

Expected Behaviour

I expect this syntax to be parsed.

Observed Behaviour

❯ sqlfluff lint --dialect=tsql test.sql
== [test.sql] FAIL
L:   1 | P:   1 | AM04 | Query produces an unknown number of result columns.
                       | [ambiguous.column_count]
L:   2 | P:   1 |  PRS | Line 2, Position 1: Found unparsable section: "FROM
                       | OPENROWSET(\n    BULK 'https://examp..."
WARNING: Parsing errors found and dialect is set to 'tsql'. Have you configured your dialect correctly?
All Finished 📜 🎉!

How to reproduce

sqlfluff lint --dialect=tsql test.sql

test.zip

Dialect

tsql

See OPENROWSET docs.

Version

sqlfluff, version 2.3.0
Python 3.10.10

Configuration

No configuration required to reproduce.

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingt-sqlIssues related to the T-SQL/TSQL/Transact SQL dialect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions