AzureCosmosDB / data-migration-desktop-tool

MIT License
129 stars 53 forks source link

Not working through zip .exe or through built source code #67

Open troyha opened 1 year ago

troyha commented 1 year ago

First I downloaded the zip for Windows and ran it in PS but it got stuck on "Select Source" with no options. I had already fully configured the source and sink (see below) so that seemed strange.

I then cloned the repo and used dotnet build on the .sln in VS Code, overwrite the migrationsettings file in the build folder and run dmt.exe. This time it seemed to run properly and reading from the correct source but 0 records copied when there are definitely records in the source collection: info: CosmosDataSinkExtension[0] Added 0 total records in 2.38s info: Cosmos.DataTransfer.Core.RunCommand.CommandHandler[0] Data transfer complete

My migrationsettings.json file: { "Source": "cosmos-nosql", "Sink": "cosmos-nosql", "SourceSettings": { "ConnectionString": "AccountEndpoint=...", "Database":"srcDB", "Container":"srcContainer", "PartitionKeyValue": "/pk", "IncludeMetadataFields": true },

"SinkSettings": { "ConnectionString": "AccountEndpoint=...", "Database": "sinkDB", "Container": "sinkContainer", "PartitionKeyPath": "/pk", "ConnectionMode": "Direct", "RecreateContainer": false, "CreatedContainerMaxThroughput": 5000, "WriteMode": "Insert", "IsServerlessAccount": true } }

ascosmin09 commented 1 year ago

Have the same exact issue, although yesterday it worked for the first time, I can't understand why it doesn't work anymore.

bowencode commented 1 year ago

In your SourceSettings the PartitionKeyValue is probably not what you intended. PartitionKeyPath in SinkSettings is the path that is configured on your container, but PartitionKeyValue is used for actual data values of partition keys and works more like a query filter to only pull data from a specific partition. For your case, that should probably not be included at all in your Source settings.

To your earlier issue, did you happen to see the path to the Extensions folder in the command line output ("Loading extensions from")? That folder should contain all of the extension dlls and supporting files to be loaded at runtime but if nothing is loading it may be the wrong path or have extension files missing.