Azure Cosmos DB Gremlin API via Synapse Link using the serverless SQL pool - Stack Overflow

admin2025-04-22  1

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
Share Improve this question asked Jan 21 at 15:21 SKARVA BodavulaSKARVA Bodavula 9651 gold badge11 silver badges20 bronze badges 2
  • Are you using private endpoint in Synapse workspace and Cosmos DB ? – Dileep Raj Narayan Thumula Commented Jan 22 at 1:45
  • I am not using any private endpoints, and the other graph with fewer documents is returning results. – SKARVA Bodavula Commented Jan 22 at 4:39
Add a comment  | 

1 Answer 1

Reset to default 0

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;

转载请注明原文地址:http://anycun.com/QandA/1745300979a90574.html