Skip to content

Issue with Get-CosmosDbDocument - One of the input values is invalid #490

@donaldanixon

Description

@donaldanixon

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

Metadata

Metadata

Assignees

Labels

needs investigationThe issue needs to be investigated by the maintainers or/and the community.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions