Using JSON AUTO in Azure Synapse Analytics SQL pool

Shafique 27 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,373 questions
SQL Server Other
{count} votes

Accepted answer
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    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,486 Reputation points Microsoft Employee Moderator
    2021-01-22T23:22:19.44+00:00

    Hello @Anonymous ,
    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.