Comments (8)
For the typed programming model, we will stop requiring partition key value in the method signature/infer it from the body. For the stream, we would like to avoid parsing the stream.
from azure-cosmos-dotnet-v3.
Sorry this change wasn't super clear. We'll use this issue to track this change. (I'll change the title)
v3 currently only works with partitioned containers. We're working on a backend feature that will make non-partitioned containers able to act like partitioned containers (but you can just pass null
as the partition key if you want to not think about it). You can expect that be out in Jan/Early Feb. That release will also block creation of new non-partitioned containers via the v3 SDK (which is still currently possible in v3 today).
For now, you'll need to use v3 only with partitioned containers.
from azure-cosmos-dotnet-v3.
They mean different things:
When creating a container, you're specifying what field in the documents to use as the partition key for sharding the collection.
When manipulating the resources, you're specifying the actual value for the partition key (field) so that Cosmos DB knows which partition to route to.
from azure-cosmos-dotnet-v3.
They mean different things:
When creating a container, you're specifying what field in the documents to use as the partition key for sharding the collection.
When manipulating the resources, you're specifying the actual value for the partition key (field) so that Cosmos DB knows which partition to route to.
But a Resource modification is done within the context of a Collection, so couldn't the Partition Key Path be mapped to the respective property on the Resource automatically based on the Collection it was going to?
from azure-cosmos-dotnet-v3.
@kirillg Shouldn't this also be the case for the SQL execution path? I'm talking about CreateItemQuery
and CreateItemQueryAsStream
methods which also require the partition key. I thought the server would infer the partition key from the query anyway if the request is marked as a cross partition query (which currently is an internal property).
from azure-cosmos-dotnet-v3.
v3 currently only works with partitioned containers. We're working on a backend feature that will make non-partitioned containers able to act like partitioned containers (but you can just pass
null
as the partition key if you want to not think about it).
@christopheranderson How's this change coming along? I'm porting over from DocumentDB for the Bot Framework team and am running into this issue on the C# side. Node side is working great, though!
Regarding OP's issue, more specifically, I'm also running into this. If I'm using await _container.Items.UpsertItemAsync...
, should it not infer the correct partitionKey
from the _container
? Similarly, it makes it a little difficult to strongly type document upserts if the item
needs to have { <myPartitionKeyName>: <myPartitionValue> }
instead of something like { partitionValue: <myPartitionValue> }
since partitionKey
is already required in the upsertItemAsync
method.
from azure-cosmos-dotnet-v3.
yes partitonkey and id (for replace) can be inferred. Marking it for GA.
from azure-cosmos-dotnet-v3.
Duplicate of #230
from azure-cosmos-dotnet-v3.
Related Issues (20)
- System.IO.FileNotFoundException: Could not find file 'Microsoft.Azure.Cosmos.Direct.resources HOT 1
- Logic App Connector Cosmos DB: Issue with 429 Retries flooding the logs and overcharge for Application Insights. HOT 1
- list databases REST API and SDK Container.ReadThroughputAsync do not work with disable local auth HOT 4
- VmMetadataApiHandler should be only used on VM HOT 1
- Issue when assigning the Data Contributor Role HOT 1
- ICM-537938324 - Analyze the 410-Lease Not Found and Attempt to Fail Faster
- Frequent 449 Errors When Creating or Updating Records in Cosmos DB HOT 1
- StackOverflow Error in FeedResponse.ReadNextAsync When Token is Cancelled
- Issue in GlobalEndpointManager: StartLocationBackgroundRefreshWithTimer() refreshing locations HOT 2
- Logic App Cosmos DB Connector: PatchOperationType.Replace stores JTokenType.Float as if was a string type.
- Azure AI Search datasource / indexer cannot run when "Cosmos DB Built-in Data Reader" assigned at database scope HOT 1
- How to determine the write is tentative(uncommitted) or committed write in multi-region write HOT 1
- [SDK Cold Start] - Retry Metadata Requests in Other Regions When Preferred Regions is Empty and Hub Region is Offlined HOT 3
- Typo in the new hedging API - WithAvailibilityStrategy HOT 1
- Client initialization with NullReferenceException while service start up HOT 3
- SDK Warmup requests should be hedged with the AvailabilityStrategy HOT 2
- Microsoft.Azure.Cosmos references many out of support and vulnerable package versions. HOT 6
- [Client encryption]: Release stable version of `Microsoft.Azure.Cosmos.Encryption.Custom` package HOT 1
- [Client encryption]: Optimize encryption/decryption flows
- Resource Not Found error with UpsertItemStreamAsync HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-cosmos-dotnet-v3.