I am attempting to run queries on Azure Cosmos DB Gremlin API via Synapse Link using the serverless SQL pool, but I'm encountering an "error: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) ".
SELECT top 1
*
FROM OPENROWSET (
'CosmosDB',
N'Account=cosbbbbbbbbiv01t;Database=bbbbb;key=bbbbbbbbbbbb==',
Graph1
) AS q1
I am attempting to run queries on Azure Cosmos DB Gremlin API via Synapse Link using the serverless SQL pool, but I'm encountering an "error: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) ".
SELECT top 1
*
FROM OPENROWSET (
'CosmosDB',
N'Account=cosbbbbbbbbiv01t;Database=bbbbb;key=bbbbbbbbbbbb==',
Graph1
) AS q1
I have tried the below approach:
Using the Azure CLI you need to enable Synapse Link in your Gremlin Database account & enable-analytical-storage
az cosmosdb update --capabilities EnableGremlin --name <Your Cosmos gremlin>--resource-group <Your resource group name>--enable-analytical-storage true
Next, use the below code
az cosmosdb gremlin graph update `
--resource-group <Your Resource group Name> `
--account-name germilndilip `
--database-name DB02 `
--name G01 `
--analytical-storage-ttl -1
Once the analytical-storage enabled I am able to query the cosmos gremiln graph using synapse serverles pool.
SELECT TOP 10 *
FROM OPENROWSET(
'CosmosDB',
'Account=germilndilip;Database=DB02;Key=<YOUR COSMOS PRIMARY KEY>',
G01) AS documents;