AzureCosmosDB / data-migration-desktop-tool

MIT License
122 stars 46 forks source link

When providing a PartitionKeyValue data will not fetch from cosmos-nosql #102

Closed domshyra closed 7 months ago

domshyra commented 9 months ago

This json set up below will yield results, however when I set it up like cosmosReadMe by specifying a pationKeyValue I will get an empty array.

{
  "Source": "Cosmos-nosql",
  "Sink": "JSON",
  "SourceSettings": {
    "ConnectionString": "AccountEndpoint=https://endpointURL.documents.azure.com:443/;AccountKey=MYKey;",
    "Database": "databaseName",
    "Container": "containerName",
    "IncludeMetadataFields": true,
    //"PartitionKeyValue": "/myPartitionKey",
    "Query": "SELECT * FROM c"
  },
  "SinkSettings": {
    "Indented": true,
    "IncludeNullFields": true,
    "BufferSizeMB": 200,
    "FilePath": "C:\\Users\\Dominics\\source\\repos\\ExportData\\extract.json"
  },
  "Operations": [
  ]
}
bowencode commented 7 months ago

PartitionKeyValue is used to filter the queried data to a specific partition (also preventing higher load cross-partition queries) during read operations so should be a specific data value, not a path. This is different than PartitionKeyPath which is a setting on containers that are created during write operations.

For example: querying data from a container that was created with a PartitionKeyPath of "/year", SourceSettings could use "PartitionKeyValue": "2020" to query only data from that year.