@@ -191,7 +191,7 @@ Using the same `cosmos.oltp` data source, we can do partial update in Cosmos DB
191
191
#### [ Python] ( #tab/python )
192
192
193
193
``` python
194
- cfgSet = {" spark.cosmos.accountEndpoint" : cosmosEndpoint,
194
+ cfgPatch = {" spark.cosmos.accountEndpoint" : cosmosEndpoint,
195
195
" spark.cosmos.accountKey" : cosmosMasterKey,
196
196
" spark.cosmos.database" : cosmosDatabaseName,
197
197
" spark.cosmos.container" : cosmosContainerName,
@@ -212,7 +212,7 @@ dfBeforePatch.show()
212
212
data = [{" id" : id , " name" : " Joel Brakus" }]
213
213
patchDf = spark.createDataFrame(data)
214
214
215
- patchDf.write.format(" cosmos.oltp" ).mode(" Append" ).options(** cfgSet ).save()
215
+ patchDf.write.format(" cosmos.oltp" ).mode(" Append" ).options(** cfgPatch ).save()
216
216
217
217
dfAfterPatch = spark.sql(query)
218
218
print (" document after patch operation" )
@@ -225,7 +225,7 @@ For more samples related to partial document update, see the Github code sample
225
225
#### [ Scala] ( #tab/scala )
226
226
227
227
``` scala
228
- val cfgSet = Map (" spark.cosmos.accountEndpoint" -> cosmosEndpoint,
228
+ val cfgPatch = Map (" spark.cosmos.accountEndpoint" -> cosmosEndpoint,
229
229
" spark.cosmos.accountKey" -> cosmosMasterKey,
230
230
" spark.cosmos.database" -> cosmosDatabaseName,
231
231
" spark.cosmos.container" -> cosmosContainerName,
0 commit comments