Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Read data
dfCustomer = spark.read\
.format("cosmos.oltp")\
.option("spark.synapse.linkedService", "AdventureWorksSQL")\
.option("spark.cosmos.container", "Customer")\
.load()
display(dfCustomer.limit(10))
# Write data
dfSalesOrderStatistic.write\
.format("cosmos.oltp")\
.option("spark.synapse.linkedService", "AdventureWorksSQL")\
.option("spark.cosmos.container", "Sales")\
.option("spark.cosmos.write.upsertEnabled", "true")\
.mode('append')\
.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment