Jess
Jess

Reputation: 3725

Cosmosdb SQL how to list all containers?

How to list all containers here? I wanna use it in the "lookup" activity of Azure Data Factory.

enter image description here

Upvotes: 0

Views: 848

Answers (1)

SaurabhSharma
SaurabhSharma

Reputation: 936

@Kyaka, It is not possible to list the containers using Lookup activity in Azure Data Factory as CosmosDB linked service needs a collection name to be passed. You may try to call the REST endpoint - https://{databaseaccount}.documents.azure.com/dbs/{db-id}/colls from an Azure Function and use Azure Function Activity to get collections list. enter image description here

You can also check for other alternatives of calling REST API from ADF like Web Activity based on your requirements.

Please refer to the documentation List Collections for details.

Thanks

Upvotes: 2

Related Questions