Using JSON AUTO in Azure Synapse Analytics SQL pool

Nasir, Shafique 26 Reputation points
2021-01-22T17:05:26.703+00:00

Hi all,

I am working with JSON data in SQL Server using Synapse Analytics. The following query is returning syntax error
SQL Error [103010] [S0001]: Parse error at line: 4, column: 1: Incorrect syntax near 'FOR'.

SELECT TOP 5 [qualifier], [textline]
FROM [intg].TestTable
FOR JSON AUTO

Not sure if JSON AUTO is supported. Has anyone used it in Synapse?

Thanks,
Shafique

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,049 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,147 questions
{count} votes

Accepted answer
  1. Erland Sommarskog 113.5K Reputation points MVP
    2021-01-22T22:31:24.953+00:00

    Indeed, it does not seem to be your lucky day. Look here:
    https://learn.microsoft.com/en-us/sql/t-sql/queries/select-for-clause-transact-sql?view=sql-server-ver15
    Synapse is not listed, so you cannot do FOR JSON or FOR XML on Synapse.


1 additional answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,476 Reputation points Microsoft Employee
    2021-01-22T23:22:19.44+00:00

    Hello @Nasir, Shafique ,
    Thanks for the ask and using the forum .
    At this time FOR JSON AUTO is not supported by Synaspse .

    May I request you to please log the ask here . The feature ask are reviewed by the product group and this should help them .

    Thanks
    Himanshu


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.