Reputation: 338
I'm trying to get a very simple data migration to work, where I want 3 fields from Cosmos Db documents to be inserted as entities in Table Storage. The challenge seems to be in the fact that I want an Id from the document, also to be the value of the partition key and row key. I took the Copy data activity, defined Cosmos Db as source, table storage as sink and defined mappings to get the right data into the right field.
In the sink you can specify what to do with partition key and row key. When I specify the partition key to be the id from the document, it works.
However, when I do the same for row key (instead of a generated identifier), I get this error "The specified AzureTableRowKeyName 'UserId' doesn't exist in the source data".
The weird thing is that there appears to be no problem regarding the partition key for that value.
Any one who can point me in the right direction?
Upvotes: 0
Views: 747
Reputation: 338
Thanks to @BhanunagasaiVamsi-MT for pointing me in the right direction. For completeness sake, I'm dropping my solution here, although the link in that post also explains it.
You need to:
Upvotes: 1
Reputation: 2739
I tried to reproduce the same in my environment and got the same error as below:
If I specify unique identifier its working fine.
Note: Specify the name of the column whose column values are used as the row key. If not specified, use a GUID for each row
For more information refer this Microsoft documentation.
Upvotes: 0