简体   繁体   中英

How to map my json path into cosmos db from Azure Data Factory

I'm trying to add entries into my cosmosdb using Azure Data Factory - However i am not able to choose the right collection as Azure Data Factory can only see the top level of the database.

在此处输入图像描述 Is there any funny syntax for choosing which collection to pick from Cosmos DB SQL API? - i've tried doing, entities[0] and entities['tasks'] but none of them seem to work

在此处输入图像描述

在此处输入图像描述

The new entries are inserted as we see in the red box, how do i get the entries into the entries collection?

在此处输入图像描述

在此处输入图像描述

Update:

在此处输入图像描述

Original Answer:

If the requirement you mentioned in the comments is what you need, then it is possible. For example, to put JSON data into an existing 'tasks' item, you only need to use the upsert method, and the source json data has the same id as the 'tasks' item.

This is the offcial doc:

https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-cosmos-db#azure-cosmos-db-sql-api-as-sink

The random letters and numbers in your red box appear because you did not specify the document id.

Have a look of this:

在此处输入图像描述

By the way, if the tasks have partitional key, then you also need to specify.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM