0

I am trying to copy my documents from one container of my db to another container in the same db. I followed this document https://learn.microsoft.com/en-us/azure/cosmos-db/cosmosdb-migrationchoices

and tried using DMT tool. After verifying my connection string of source and target and on clicking Import, I get error as

Errors":["The collection cannot be accessed with this SDK version as it was created with newer SDK version."]}".

enter image description here

I simply created the target collection from the UI. I tried by both ways(inserting Partition Key and keeping it blank). What wrong am I doing?

3 Answers 3

1

Figured out the issue. It was due to this setting in my source database enabled:

My partition key is larger than 100 bytes.

I created a POC this time a source database without this setting enabled and it worked by DMT tool.

Sign up to request clarification or add additional context in comments.

Comments

1

You should use a newer version of the tool.

I ran into this problem and downloaded version 1.8.3 from the GitHub repo here:

https://github.com/Azure/azure-documentdb-datamigrationtool/releases/tag/1.8.3

With this version the problem is solved.

Comments

0

What wrong am I doing?

You're not doing anything wrong. It's just that the Cosmos DB SDK used by this tool is very old (Microsoft.Azure.DocumentDB version 2.4.1) which targets an older version of the Cosmos DB REST API. Since you created your container using a newer version of the Cosmos DB REST API, you're getting this error.

If your container is pretty basic (in the sense that it does not make use of anything special like auto scaling etc.), what you can do is create the container from the Data Migration Tool UI itself. That way you will not run into compatibility issues.

7 Comments

so it is the target container which is causing the issue. I don't see any option in DMT to create the container. Where do you see that?
Are you using the UI (DTUI.exe)? You should see an input box for the target container. Tool automatically creates a container if it doesn’t exist based on the information you provide (name, partition key and throughput).
added the screen shot and the collection name I provided does not exist. I get the same error
I figured out: the error was due to source container having" My partition key is larger than 100 bytes settings enabled". I created another source container without enabling this settings and it worked.
Awesome. Would you mind posting your solution as answer?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.