0

As we can read and write data into cosmosdb using pyspark as follws,

cfg = {
"spark.cosmos.accountEndpoint" : "xx:443/",
"spark.cosmos.accountKey" : "xx==",
"spark.cosmos.database" : "graphdb",
"spark.cosmos.container" : "graph" ,
"spark.cosmos.read.customQuery" : "select * FROM c where c.label =Email"
}

cosmosDbFormat = "cosmos.oltp"

df = spark.read.format("cosmos.oltp").options(**cfg).load()

Similarly is there a way tro delete the vertex using pyspark...

Please note the vertex wont be overwritten because its created using uuid.. So everytime a vertex which has a deletion in the original table, doesnt get removed..

Sneha Nair
  • 103
  • 9

1 Answers1

0

As from my knowledge, it is not possible to delete a vertex in cosmos DB using pyspark connector. You can cosmos Spark connector to read from or write to cosmos DB. You can use the Azure data explorer by using the .drop().

Azure Cosmos DB Gremlin graph support and compatibility with TinkerPop features

Oury-MSFT
  • 181
  • 3