question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Azure Cosmos DB write operation support

See original GitHub issue

Background

Spline is not able to track lineage while writing to Azure Cosmos DB

Feature

Azure Cosmos DB write operation support

Example

Sample Scala code of write operation to Cosmos DB, that is not able to track lineage

import com.microsoft.azure.cosmosdb.spark.schema._
import com.microsoft.azure.cosmosdb.spark.CosmosDBSpark
import com.microsoft.azure.cosmosdb.spark.config.Config
import org.apache.spark.sql.SaveMode

val customers_dataset_config_map = Map(
  "Endpoint" -> "<cosmos-db-endpoint>",
  "Masterkey" -> dbutils.secrets.get(scope = "<scope-name>", key = "<key-name-for-cosmos-db-masterkey>"),
  "Database" -> "<cosmos-db-database>",
  "Collection" -> "<cosmos-db-container>",
  "WritingBatchSize" -> "100")

val customers_dataset_config = Config(customers_dataset_config_map)

// Write the output to Azure Cosmos DB
customers_dataset.write.mode(SaveMode.Overwrite).cosmosDB(customers_dataset_config)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wajdacommented, Mar 11, 2020

0.6+

0reactions
prabdebcommented, Mar 11, 2020

Thanks a lot for considering this feature request @wajda . Will it be available for 0.4 and 0.3 both?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimize request cost in Azure Cosmos DB - Microsoft Learn
This article describes how read and write requests translate into Request Units and how to optimize the cost of these requests. Read operations...
Read more >
Request Units in Azure Cosmos DB - Microsoft Learn
Azure Cosmos DB supports many APIs, such as SQL, MongoDB, Cassandra, ... Whether the database operation is a write, point read, or query, ......
Read more >
Transactions and optimistic concurrency control
Azure Cosmos DB allows you to write stored procedures, pre/post triggers, user-defined-functions (UDFs) and merge procedures in JavaScript.
Read more >
A technical overview of Azure Cosmos DB
Natively support multiple data models and popular APIs for accessing data. The translation between the externally exposed APIs and internal data ...
Read more >
Azure Cosmos DB for MongoDB (4.2 server version)
Database commands. Azure Cosmos DB for MongoDB supports the following database commands: Query and write operation commands. Command, Supported ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found