Azure Cosmos DB Tutorial | Globally distributed NoSQL database
Vložit
- čas přidán 24. 07. 2024
- Azure Cosmos DB is globally distributed and highly responsive database in the cloud. With just few clicks you can get multi-regional distribution and redundancy with high availability of 99.999%.
In this episode I will cover basics of Cosmos DB with live demo of Portal Features and dotnet programming, but I also will explain most important features of Cosmos DB.
Source: github.com/MarczakIO/azure4ev...
Want to connect?
- Blog marczak.io/
- Twitter / marczakio
- Facebook / marczakio
- LinkedIn / adam-marczak
- Site azure4everyone.com
more to come..
Next steps for you after watching the video
1. Check data factory docs
docs.microsoft.com/en-us/azur...
2. Build CRUD operations with VueJS, dotnet and Cosmos DB
marczak.io/posts/netcore-vuej...
3. Cosmos DB intro video series from Microsoft
docs.microsoft.com/en-us/lear...
See you next time! - Věda a technologie
At 7:32 there is a typo about partition types. Instead of "two kind od partitions", it should be "two kinds of partitions" :) Thanks Davide T. for letting me know :)
Still mentioning wrong meaning. You wrote "Two king od partitions". I dont think it does a matter because we understand your good explanation. Good work and keep it on!
@ELVIS PRESLEY during container creation, you can choose "Manual" instead of "Autoscale"
@@RohanHazara c9xcx999xx99c999c9x99c99f999x9cfcx99x9c999xfgxc99x99cg9c909c9c9
I was so confused about the terminology of containers and documents, and you made it crystal clear for me in just a slide. Thank you so much, Adam :)
Thank you, Adam! It's not everyday that I watch a learning video that provides easy to understand language, content, and flow. You obviously know your stuff and, bonus for everyone, you're a natural teacher who's willing to produce and share your knowledge.
Awesome! Thanks for such nice feedback!
This is really good info!
Thank you Adam!
Adam you made my life so easy, I started watching your videos since last 15 days, I got impressed with the way you teach, please keep continuing.
Thanks a lot, Adam. Your videos are very helpful and interesting. You summarize how thing work, and then provide great demos. Well balanced and well done.
My pleasure!
Thank you @Adam Marczak. It is really nice to see you are progressing with your way of explaining things. Since this video is of last year. I can tell the difference with your latest videos. Really good work! ✌️
I know right! It's been a looong way. Spent hundreds of hours perfecting presentations, agenda, structure and even signed for additional English lessons with British native so I can speak more fluently with better pronunciation :) Moving on all tutorials will only get better. Every few years when there will be major changes to the service I definitely plan to do a refresher video with all the improvements :) Thanks!
Dzięki Adam for these insights. I totally need this for one of my projects. Great video!
Dziękuje 😁
Thanks Adam. Your an Azure Certified Teacher . Its very easy to understand your videos and acquiring deep knowledge. Well done bro!
Wow, thanks!
Very informative and easy to understand. Hope to watch more about the usage with demos.
More are coming but pipeline of videos is long but definitely a hot topic to cover. Added to the list, thanks for the feedback!
Thank you Adam for sharing these learning videos. You are making azure journey easy for everyone.
My pleasure! Thank you so much :)
You've been my learning source for a while now. Thanks a lot for your videos!!
Extremely useful and well done material. Congrats Adam!
Very good video! I'm always impressed how how much information you can teach clearly in a 31 minutes video! You know well Azure, and you are a very talented teacher! Go from almost 0 knowledge on Cosmos DB to excited beginner in 31 minutes! ;-)
Superb content...very crisp and to the point...helps a lot while preparing my dp-200 certification👍👍
Thanks a ton :)
Your Azure videos are great! Thank you so much!
Glad you think so!
It is always nice liearning azure with you Adam! Thank you so much!
Very nicely done. Easy to understand these complex concepts. Just subscribed to this channel. Looking forward for more knowledgeable videos. Thank you!
Awesome, thank you!
Lovely to see this well articulated video. Thanks
Very well presented. Thank you for an easy to understand information video. Just what I was looking for.
Glad it was helpful!
Great walk through Adam, appreciate the content 👍
Great video to pick up Cosmos DB. Thank you Adam!
My pleasure!
Your video's are very helpful to understand content without any confusion. Thank you so much!
Happy to hear that!
Very nice explanation! Learning azure is very easy using your videos and demonstrations! Thanks bro!!
Happy to help!
Great video. Very crisp and great explanation.
Thank you kindly!
Adam you are really amazing ,
keep going thanks !
Adam, this is was great share. Thanks Man !
Hello Adam - thanks for very nice piece of Azure knowledge !
Clear and objective! Nice video!
Very clear and useful, thank you !
Glad it was helpful!
Awesome Video on Cosmos DB !!!. To the point to understand cosmos DB !!!
Thank you :)
Dziękuję bardzo za super filmiki!
Dziękuje za wizytę i komentarz :)
Thank you, Adam. Very helpful
Glad it was helpful!
Another Good Video. Thank you for sharing the knowledge.
Thanks for watching!
Great introduction!!!
your vids are the best azure tutorials thanks for your support
Glad you like them!
Really a great video all of your Azure
Thanks!
Very nice video for basic understanding 👍
Thanks!
This was amazing, I got a new job and there they used cosmos db, just wanted to know what it is and how its works, I now have a very clear picture of how they are using the cosmos db, next step is learning azure functions, will go and check if you have any material on that, otherwise some other resource :( , anyways Thank you very much for the clean tutorial.
Thank you, Adam!!! 😀
Thanks so much still relevant in 2020!
Yes! Thanks! :D
Perfect Session!!!!
Rock on!
Adam, you are awesome man
Thank you for the video!
great video with nice descriptions..
Thank you very much!
Another great video, thanks!
Glad you enjoyed it!
Great overview
Fantastic Adam!
Many thanks! :)
Great work, thank you very much.
Glad you liked it!
Amazing Tutorial, thanks
Thanks a lot for the video, it helped me a lot
Glad it helped
Great video, thank you!
My pleasure!
Great video! Hopefully MS fixes the cost issue with Cosmos, as currently it's a very expensive option.
I hope so too. I like cosmos db but and I use it in my projects but I would use it more if it would cost less.
Yes, it's certainly not cheap is it?
Great tutorial!
Thank you!
This was very helpful thanks
Glad you enjoyed it!
Great tutorial for overview
Glad it was helpful!
Very easy and good learning place
Great video!!!
Thank you! :)
Thanks for this insight.
My pleasure!
thanks for the demo
my pleasure
All videos are excellent @Adam, where can I look for more contents, how to subscribe to your portal.
Very good content!
Thanks!
Superb.
Thank you! Cheers!
Amazing contents .. thanks
My pleasure!
Great course, Adam! Do you have any plan to do any Kubernetes course? Thanks.
great content
Thanks!
Really insightful video! The change feed section caught my eye and I am curious to more about it. My question is: May the change feed facilitate input into source systems, i.e. a online website?
Let's say you have a customer that has bought a product and that information is sent to a Cosmos DB that uses SQL API for document storage. Furthermore, that information is sent to a Cosmos DB that uses the Gremlin API to uncover relationships between data, i.e. the customer has bought product A and based on the data we have in Gremlin API DB, the customer might like product B. Then this information is sent back to the website and next time the customer visit the website, the recommendation for product B is there.
Wow, this turned out to be quite the message!
Thanks! Change feed is great, also check out samples with event grid and signalr if you want to build real time applications. Remember that cosmos can't use multiple APIs at the same time so you would need two of them. But sounds like an interesting project and good use-case. Good luck.
Shoudn't you avoid joins for cross-query over logical partitions? Isn't it a better idea to introduce some extra property in both container-docs and merge the two conatainers in order to query one logical partition?
Great tutorials!
Partitioning and query optimization is a big topic. And in general you should avoid cross-partition queries as they consume more RUs but it's hard to design database so sometimes you might still need to do it. There is a lot of factors to consider and too many for a simple comment section to fit in. Thanks for watching :)
Great tks! .... what if i need to handle two or more containers from c # ?, do i need to create a connection for each container?
For now I found information about how register a connection to single container in the Startup.cs
Tks again.
Yes, correct. You can reuse connection. Check out the samples from MS docs.microsoft.com/bs-latn-ba/azure/cosmos-db/sql-api-dotnet-v3sdk-samples
@@AdamMarczakYT. I really apreciate it!
At firts sight, I think these lines could help in this scenario:
Container container = database.GetContainer(containerId);
ContainerProperties containerProperties = await container.ReadContainerAsync();
Will test it... thanks!
@Azure 4 everyone: I have to choose between Cosmos DB sql API and gramelin API ? Do you know when to use which one? Could please provide me any link if u have stating diifrence between gramelin and sql Api
Hey Aniket. Gremlin is for graph databases, so it's not a question of API but question of business problem you are trying to solve. If you need graph database then this is for you. If you want to check what are the challenges that graph database solve check this doc docs.microsoft.com/en-us/azure/cosmos-db/graph-introduction#scenarios-that-can-use-gremlin-api
Fabulous
Cheers!
Thank you Adam, Great Job. your videos are nice . DP 200 videos if you could share that would be helpful.
Thanks, Noted!
can you please explain how we will fetch ru used in a resorces group for a particular database container
Hello, I have a query. We need to bring oracle oltp data to cosmos db. What will be the best way as we need the data as soon as available. We wanted to use fivetran but it seems like it has not created connection to cosmos db.
Nice thnk u ☺
Hi Adam, I have a use case and need your advice on that...
So i need a Azure DB for storing some Large size files(ranging 1MB to 4 GB) and some meta data for those file and an API / link using which we can download the files from the DB. There is going to be a lot of reads/writes as well.
You should not store files in the database. You should store them on blob storage and only store paths to file in the database. Your API should generate expiring SAS urls to those files and send them to users for direct download.
@@AdamMarczakYT Thanks Adam this is very helpful. :)
One question. Is it possible to have an azure cosmos db accessible to both a .net api and one that's node.js api?
Hi Arthur, what you ask is two different SDKs, but they use the same API underneath. So the answer is, yes you can use both .NET and nodejs.
Great tutorial brother, Just a question ; how to call cosmosdb using sample logic app with managed identity authentication?
You can. I don't think default connector supports this but you should be able to craft HTTP request instead :)
This tutorial does it on VM but it should be good enough to transfer this to HTTP call from Logic App
docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-cosmos-db?WT.mc_id=AZ-MVP-5003556 please note that logic apps automatically get tokens sso no need for extra HTTP call.
I have very similar approach with Managed Identity and Blob Storage call shown in this video czcams.com/video/xVFmpszXmC0/video.html
Hi Adam, Can you help how to delete the cosmos collection using Azure data factory.
Can you please provide guidance about how to copy large json files (>16 MB) to cosmos db
Hi Adam..hope you're doing well. I have question. If someone deleted the data in cosmos db containers . Is it possible to verify how deleted the data.
You can check a lot of stuff in the activity log in Azure as long as it's a platform change, not sure if deletion of containers is here but possibly. Thanks for watching! :)
Hey Adam,
Nice video once again. Thanks for sharing the knowledge
do you know some good courses to learn more about Azure? Am specially interested in Data factory and databricks, some recommendation? :)
Hey. Glad to see you are coming back for more :) I personally like Azure Friday videos on official Microsoft Azure channel czcams.com/users/windowsazuresearch?query=data+factory
@@AdamMarczakYT thanks, i will check it ;)
Thank you.
thanks so much
You're welcome! Thanks for stopping by!
Hello, I want to create NOSQL database, one DB in singapore and one in US. Want to access both database as one without copying over. Just reference with possibility of CRUD operation. Data from singapore database shouldnt be moved out of singapore database. How should i do it ?
Hi,
I have a situation where one microservice (written in spring boot) needs to connection two different cosmos db (via SQL API).
Microservice will only perform read operation collections present in both cosmos DB
Is it possible ?
Can you please send me some example code.
Thanks in advance.
Hey, I'm not a java expert so I can't help you with that. Never used spring boot.
could you tell me how do we change from azure cosmos DB to Postgres sql db
How to upgrade tls/ssl version in existing azure cosmos db?
Can we store same way in Azure Table Storage?
What about deleting 1,000s of documents? is there any support now for that? TTL is not always an option.
I think this is still pain. There is also Bulk Delete using Cosmos DB SDK but I never checked what does it do in the backend (if it just deletes in loops/paralell or uses some bulk delete api).
Thank you
Hello Adam ,Can the link service can connect an remoted mongoDB,which is not in Azure portal,thx
If you mean from data factory, then yes.
docs.microsoft.com/en-us/azure/data-factory/connector-mongodb?WT.mc_id=AZ-MVP-5003556
How do we do Order by with Group by in Cosmos DB?
Hi, when I try to open my azure cosmos db emulator it shows Unable to add firewall rule settings. Please restart the Azure Cosmos Emulator with/NOFirewall Option.
How to solve this issue?
I just installed visual studio code. To correct CosmosClient (ctrl + .), drop down is not showing - “using MicrosoftAzure.Cosmos”. May I know which extension I need to install to get this??
I think intellisense for .NET should be out of the box. Just make sure to install the packages using provided command and then run "dotnet restore" to get the packages.
@Adam Marczak - Azure for Everyone Thank you Adam for your quick update but how to reference the environment parameter here, so that read replication can be done only in Production environment and not in any other environment, basically how to put condition . Please suggest, awaiting for your valuable reply on the same.
Unfortunately I don't provide consultancy for work efforts. This isn't an Azure question either, this is a question on how to code with PowerShell. Feel free to check some online tutorials on the subject.
can we have a video with Mongo Db APi and show the way of partition.
I might do partitioning video for cosmos db at some point. :)
Good video
Glad you enjoyed
@Adam, I can't install the Microsoft.Azure.Cosmos package, I got the error "There are no versions available for the package 'Microsoft.Azure.Cosmos' can you help me out here ?
Great Video:) Thanks for this. and appreciate you could throw some points here.
c:\labs\Program.cs(11,30): error CS0246: The type or namespace name 'Task' could not be found (are you missing a using directive or an assembly reference?)
c:\labs\Program.cs(11,30): error CS0246: The type or namespace name 'Task' could not be found (are you missing a using directive or an assembly reference?)
This has been shown in the video around 18:20 mark.
Thank you Adam for this awesome tutorial...Great one indeed !!!
How to enable Replication on Cosmos DB in Production only via Automation Script in East US 2 (Read regions) whereas write region is in Central US .Already have one common environment (dev/prod) ARM template for cosmos DB via which Cosmos DB been created.
Awaiting for your valuable reply.
Thanks in advance!!
Use update function in powershell. Location parameter is array so you can pass multiple.
docs.microsoft.com/en-us/powershell/module/az.cosmosdb/update-azcosmosdbaccountregion?WT.mc_id=AZ-MVP-5003556&view=azps-4.7.0
@@AdamMarczakYT Thank you Adam for your quick update but how to reference the environment parameter here, so that read replication can be done only in Production environment and not in any other environment, basically how to put condition . Please suggest, awaiting for your valuable reply on the same.