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.

[Cosmos DB] Suppress output (resourceBody) for successful batch operation

See original GitHub issue
  • Package Name: @azure/cosmos
  • Package Version: 3.9.1
  • Operating system: MacOS
  • nodejs
    • version: 10.16.3
  • browser
    • name/version:
  • typescript
    • version:
  • Is the bug related to documentation in

Describe the bug Not really a bug but more of a clarification question. When I perform a batch/bulk operation (say Upsert), for all the documents that returned 200 status code, the document content is echoed back in resourceBody:

{
    statusCode: 200,
    requestCharge: 12.952380952380953,
    eTag: '"2f0079c7-0000-0700-0000-5f5b90960000"',
    resourceBody: {
        "FirstName": "Blah",
        "LastName": "Blah",
        "ZipCode": "22222"
    }
}

I am wondering if there’s a parameter that I can pass to the operation which essentially does not echo back the resource body? I would very much like the response to look like:

{
    statusCode: 200,
    requestCharge: 12.952380952380953,
    eTag: '"2f0079c7-0000-0700-0000-5f5b90960000"',
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
zfostercommented, Sep 15, 2020

Thanks for the reply @gmantri. Cosmos has support for Prefer in the request headers as well, I believe we support it in places in the SDK. I can look into if it already works with Bulk or what we need to do to get it working. Thanks again!

0reactions
gmantricommented, Sep 15, 2020

Thanks @zfoster! I’ll close this issue now. Hoping to see the support for this in the SDK soon. I do have a clarification question about the bulk operations (basically trying to understand the behavior). I will create a separate issue for that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transactional batch operations in Azure Cosmos DB using the ...
Learn how to use TransactionalBatch in the Azure Cosmos DB .NET or Java SDK to perform a group of point operations that either...
Read more >
Cosmos DB - TransactionalBatch support #17771 - GitHub
OperationResults contain all the individual operation results, each operation in a batch has its own response. Each operation result exposes: // ...
Read more >
azcosmos - Go Packages
Azure Cosmos DB is a globally distributed, multi-model database service. ... operation results for index, operation := range batchResponse.
Read more >
How to do bulk and transactional batch operations ... - YouTube
Matías Quaranta shows Donovan Brown how to do bulk operations with the Azure Cosmos DB .NET SDK to maximize throughput, and how to...
Read more >
Suppress command line output - batch file - Stack Overflow
ERROR: The process "test.exe" not found. Why does this error message get displayed, even though I have redirected output to NUL? How can...
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