I get an error I don't understand when trying to save a dataframe I've been working on to a documentDB collection.
Others similar issues on stack pointed to incorrect or case sensitive names provided for the Database or the Collection But I Checked Those... What other explanations could there be ? PartitionKey ? Region ?...
On an other hand I was unable to find a complete doc on which options were eventually to be provided to the line df.write.format("com.microsoft.azure.cosmosdb.spark").mode('overwrite').options(**ddbconfig).save()
Error given by Spark on Databricks is :
com.microsoft.azure.documentdb.DocumentClientException: Message: {'Errors':['Owner resource does not exist']}
The StackTrace gave those
Py4JJavaError:
An error occurred while calling o646.save. :
com.microsoft.azure.documentdb.DocumentClientException:
Message: {"Errors":["Owner resource does not exist"]}
Response gave in the storereadresult
LSN: 623, GlobalCommittedLsn: 623, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, IsGone: False, IsNotFound: True, IsInvalidPartition: False, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#623, ResourceType: Collection, OperationType: Read
edit : different situation than in similar linked posts. This error occuring when trying to write data in a new, empty collection. Not reading existing data. And I had already clarified in my question that I have explored every path (collection/database names mismatches mainly) that I had found in those similar posts.