vscode-cosmosdb icon indicating copy to clipboard operation
vscode-cosmosdb copied to clipboard

Fail to create a collection on the SQL Emulator

Open v-xinda opened this issue 4 years ago • 3 comments

OS: Win10 Build Version: 20210128.1

Repro Steps:

  1. Make sure Azure Cosmos DB Emulator is installed.
  2. Attach both MongoDB Emulator and SQL Emulator.
  3. Create a database named 'data001' under SQL Emulator --> Create a collection.
  4. Check whether the collection is created successfully or not.

Expect: The collection is created successfully.

Actual: Fail to create the collection with an error. image Details in Output:

10:56:39 AM: Error: Partition key path /_partitionKey is invalid for MongoDB API.
ActivityId: 5d887daa-1f88-468e-a36e-c33100e62740, Microsoft.Azure.Documents.Common/2.11.0

v-xinda avatar Jan 29 '21 07:01 v-xinda

Related #1791

neelip avatar Feb 04 '21 23:02 neelip

I am encountering a similar issue.

This also occurs when trying to provision the sample database from the emulator web interface:

image

The same error listed by @v-xinda occurs in VS Code as well.

Database creation works, but attempting to create a container fails.

I believe that this is an issue with the emulator itself.

I am using the latest build of the emulator version 2.11.13

CharlieDigital avatar May 04 '21 16:05 CharlieDigital

Unfortunately I won't have enough time to investigate this issue in 0.21.0. Let's move it to the back log so we can publish 0.21.0 soon.

JasonYeMSFT avatar Mar 08 '24 00:03 JasonYeMSFT