I am trying to load data from Azure databricks dataframe to cosmos db container using below command
cfg = {
"spark.cosmos.accountEndpoint" : cosmosEndpoint,
"spark.cosmos.accountKey" : cosmosMasterKey,
"spark.cosmos.database" : cosmosDatabaseName,
"spark.cosmos.container" : cosmosContainerName,
}
df.write.format("cosmos.oltp").options(**cfg).mode("append").save()
My query is if the target cosmos container already have data matching with source for a particular id will it try to overwrite the id details or will it update the existing id details to add new items to it or will it only add/append new ids and won't touch existing ones?
What is upsert type and can we use along with append mode?
Background: I am trying to load customer transaction details for a retail by manually running append for different time intervals like from 2012 to 2017 and then 2017 to 2022. Same customer would have made transactions in both the periods so how will this append mode handle?