Sitelet https://github.com/microsoft/SqlScriptDOM/issues/126
Skip to content

Parsing errors in Azure Synapse Analytics examples #126

Description

@naveennaik1

We have listed out the examples in Azure Synapse Dedicated SQL Pool that are currently not supported in Microsoft SQL Parser ( TSql160Parser ) Version - 170.28.0

Microsoft documentation references :

Data Definition Language (DDL) statements

Sr no. Keyword Reference links Error Message
1 ALTER TABLE Link Option 'RESUMABLE' is not a valid index option in 'ALTER TABLE' statement.
2 CREATE DATABASE Link Incorrect syntax near 'MAXSIZE'.
3 CREATE MATERIALIZED VIEW AS SELECT Link Incorrect syntax near 'materialized'.
4 CREATE STATISTICS Link Incorrect syntax near 'ON'.
5 CREATE TABLE AS SELECT Link Incorrect syntax near 'FORMAT_OPTIONS'.
6 DROP TABLE Link Expected but did not find a closing quotation mark after the character string 't NULL
7 RENAME Link , Link Incorrect syntax near 'DATABASE'.

Query statements

Sr no. Keyword Reference links Error Message
1 WITH common_table_expression (Transact-SQL) Link Incorrect syntax near 'FORMAT_OPTIONS'.
2 FROM clause plus JOIN, APPLY, PIVOT (Transact-SQL) Link , Link ,Link Incorrect syntax near 'REDUCE'.
3 OPTION clause (Transact-SQL) Link , Link Expected BYPASS but encountered FORCE instead.

Security statements

Sr no. Keyword Reference links Error Message
1 BACKUP CERTIFICATE Link Incorrect syntax near '='.
2 CREATE CERTIFICATE Link Incorrect syntax near '='.
3 CREATE USER Link Incorrect syntax near 'ON'.

T-SQL language elements for dedicated SQL pool in Azure Synapse Analytics

Sr no. Keyword Reference links Error Message
1 Transactions Link Incorrect syntax near 'AUTOCOMMIT'.
2 CREATE DIAGNOSTICS SESSION Link Incorrect syntax near 'DIAGNOSTICS'.

Steps to reproduce

        static void Main(string[] args)
        {
            var script = @"<EXAMPLE_SCRIPT>";

            var parser = new TSql160Parser(true, 0);
            var fragment = parser.Parse(new StringReader(script), out var parseErrors);

            if (parseErrors.Count > 0)
            {
                Console.WriteLine(parseErrors[0].Message);
            }
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions