question

AlluriAravind-8869 avatar image
0 Votes"
AlluriAravind-8869 asked Lawrence080-MSFT answered

Can we have the same format (JSON) as cosmos db data in Synapse linked db?

We enabled Synapse link enabled for a cosmos db with SQL serverless (built-in). We have following questions:
1. Can we have the same format of data in Synapse linked resource as that we have in cosmos db?
2. How can we access the data from synapse linked cosmos db from a C# code (azure function)?



azure-synapse-analyticsazure-cosmos-db
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.

1 Answer

Lawrence080-MSFT avatar image
0 Votes"
Lawrence080-MSFT answered

Hi @AlluriAravind-8869,

Thanks for submitting your question to Microsoft Q&A. Regarding your question around Cosmos DB and a Synapse linked database:

  1. JSON is not a supported data type in Synapse, but here is a guide on how to query JSON files in Azure Synapse: https://docs.microsoft.com/en-us/azure/synapse-analytics/sql/query-json-files#parse-json-documents

  2. Can you provide additional context or details for the connectivity you want to achieve between the Synapse, Cosmos DB and C#/Azure Function for accessing data?





· 2
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 @Lawrence080-MSFT for your response.

We will be having the data in Synapse and we do analyze that data. In some cases, we need to call an Azure function as POST with a JSON request body from the data we have it in Synapse. We want to know how to build the request body in JSON from the data that we have in Synapse. FYI, the request body data is readily available in our Cosmos container as JSON (nested document). We just enabled the synapse link from our cosmos collection and expecting to have the data in Synapse to be in the same format as we have in Cosmos collection.

Thanks,
Aravind.

0 Votes 0 ·

Hi @AlluriAravind-8869 ,
Just checking back to see if you got the resolution for the query. If not, please revert back so that we will respond back with the more details and we will try to help . If the above answer helped you, kindly do click Accept Answer and Up-Vote for the same as accepted answers help community as well

0 Votes 0 ·