CosmosDB
CosmosDB copied to clipboard
Issue with Get-CosmosDbDocument - One of the input values is invalid
Issue
- [ ] Powershell 7.4
- [ ] Visual Studio Code Powershell Extension
- [ ] Windows 11
- [ ] CosmosDB 5.0.0
Trying to run the following but keep getting the error "code": "BadRequest", "message": "One of the input values is invalid...."
$query = "SELECT * FROM c JOIN v IN c.vehicles WHERE (v.modelVariant = 'LFDAS')" $documents = Get-CosmosDbDocument -Context $cosmosDbContext -CollectionId $containerName -Query $query -QueryEnableCrossPartition $true -MaxItemCount 5
I know the context is good because I can run the same code without the query and queryenablecrosspartition parameters and it works fine. It also fails when using just the query parameter as well. The query itself works in the Azure Portal and returns items there.
Any assistance much appreciated