How to query the Cosmos DB document using container name in data flow inside azure data factory

When we use the container name in the query (SELECT * FROM [Case]) we get the error "at Source 'source1': java.util.NoSuchElementException: None.get"
How to query the Cosmos DB document using container name in data flow inside azure data factory

When we use the container name in the query (SELECT * FROM [Case]) we get the error "at Source 'source1': java.util.NoSuchElementException: None.get"
Hello @Arunkumar-6418,
Thanks for the question and using MS Q&A platform.
Could you please run the same query in Azure Cosmos DB => Data Explorer and see if the query works as excepted?

You can run the same query on ADF data flows as shown below:
SELECT * FROM [items] - throws error message
SELECT * FROM items - works as excepted

In case, if you are still facing the same error message, could you please share the complete error message which you are experiencing along with the screenshot?
Hope this will help. Please let us know if any further queries.
Please don't forget to click on
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
Want a reminder to come back and check responses? Here is how to subscribe to a notification
If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
Thanks for your response.
If the container name is item that time query working fine but if the container name different that time we are getting error.
Blow i attached the screenshot for your reference.


Please let me know if you need more info
Hello @Arunkumar-6418,
The collection is selected on the Dataset level and not at the query level.
Note: Case is the collection name and not the items available in the collection and the query should be SELECT * FROM c or SELECT * FROM items.

Hope this will help. Please let us know if any further queries.
11 people are following this question.