question

NasirShafique-4239 avatar image
0 Votes"
NasirShafique-4239 asked tanakpad commented

Using JSON AUTO in Azure Synapse Analytics SQL pool

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

sql-server-generalazure-synapse-analytics
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Hello, sorry I have the same problem, how did you solve it?

0 Votes 0 ·

Hello, sorry I have the same problem, how did you solve it?

0 Votes 0 ·

Have you find work around for this?

0 Votes 0 ·
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered NasirShafique-4239 commented

Indeed, it does not seem to be your lucky day. Look here:
https://docs.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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for clarifying. I'll have to find another way to handle it.

0 Votes 0 ·
HimanshuSinha-MSFT avatar image
0 Votes"
HimanshuSinha-MSFT answered NasirShafique-4239 commented

Hello @NasirShafique-4239 ,
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


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks Himanshu. I have requested for it. Hopefully it will be picked up soon.

1 Vote 1 ·