Please forgive me if I am asking this question incorrectly or in a wrong place.
I am trying to understand how to use the change feed for the Cosmos DB.
I do have a Cosmos DB Emulator (a version of a Cosmos DB that is running locally on my machine)
I was able to use and populate it successfully. However, unfortunately, I see no way to view or access the change feed.
Is this even possible to access the change feed on the Cosmos DB Emulator?
Thank you very much in advance
There is no UI for the Change Feed, since the Change Feed is a timeline that could be consuming from multiple points on different ways.
Consuming the Change Feed is always programmatic and done through any of the available methods.
Related
Is it possible to review the history of changes to the setting of an Azure Cosmos database. I believe I am colliding with another them who is using the same Cosmos database. I would like to review all the setting that have changed since the database was created. Is that possible?
You can audit control plane operations for any Cosmos DB resource once it has been created. However, the account must be configured such that all control plane operations are done against the Cosmos DB resource provider and not through one of the data plane SDKs. See the link for details on this.
However, ARM does not support providing information on when a resource was created. This is a limitation of ARM, not Cosmos DB.
If you just wanna watch who did operations on your cosmos database, I think 'Activity Log' tab could help you. It records some message like screenshot below.
But I found that I can't get the details of the operations such as changing RU. By the way, I didn't find any documents saying how to review operations in cosmosdb. Or maybe you can provide more details about what information you wanna get from cosmosdb?
https://learn.microsoft.com/en-us/azure/search/search-howto-index-cosmosdb
This page states that you would need to use REST (REST API version 2019-05-06-Preview) to accomplish adding data from Cosmos DB when using the Mongo DB API. Where can I find an updated walk through of this? Or has anyone successfully done this?
Around halfway down that page there's a section called Use REST APIs. This section is an up-to-date walkthrough on how to use the REST API to index data in Cosmos DB. Since you're using the MongoDB API for Cosmos DB, make sure when creating the data source to add ApiKind=MongoDb to the connection string.
I am trying to understand how to use the multi-model api for an individual cosmosdb deployment.
I launched one instance (ref attached image). I got back this url: gccosmosdb.documents.azure.com. The connection string is only for Mongodb.
Q. I need Table & Mongodb api for this db deployment. How can i get connection string for table api also within this db. Please kindly if someone could advise on how to get two api models working side by side that would eliminate 50% of my container workloads.
Today when you create a DB you are asked to choose one of the API and then all the collections in that db will follow the api. That's is true for the portal UI.
However, using the SDK (TableSDK, Mongo SDK) you can create two collections which hold different data models. So, if you have two collections say one with mongo data and other with documents or table. Then these two collections can be accessed independently using Mongo or Document/Table API respectively.
For Mongo you get the connection string from the portal. However for table connection string is as follows:
DefaultEndpointsProtocol=https;AccountName=MYSTORAGEACCOUNT;AccountKey=AUTHKEY;TableEndpoint=https://COSMOSDB.documents.azure.com
Hope this help.
Firebase's realtime database SDK has callback methods built in which allow the client to listen for database changes. (e.g. as per https://firebase.google.com/docs/database/android/start/)
Does Azure have any functionality like that in either the SQL Database or DocumentDB products? If not, why not? And what is the best way to achieve this functionality using Azure?
Thanks.
Edit context: I'm building a cross-platform mobile app using Xamarin.
Microsoft just announced a new feature in DocDb called Change Feed which sounds like what you are looking for. It is enabled by default and included in the cost of DocDb.
From their announcement: "With Change Feed support, DocumentDB provides a sorted list of documents within a DocumentDB collection in the order in which they were modified. This feed can be used to listen for modifications to data within the collection and perform actions..."
Documentation on how to work with the change feed can be found here: https://learn.microsoft.com/en-us/azure/documentdb/documentdb-change-feed
Azure's SQL Database service now has Extended Events (currently in Preview). More info here.
DocumentDB does not have events you can subscribe to. You would need to build your own mechanism for taking action when modifying your database contents.
EDIT: Cosmos DB (formerly called DocumentDB, when this answer was originally posted) provides a change feed you can subscribe to.
As for "best way to achieve this functionality" - there is no best way. It's whatever you decide to build, based on your app, chosen frameworks, etc.
i was wondering if there is a way to enable cloud features for a SQLite database application.
Should i save the whole database to the cloud each time ? For example when i quit the application is it required to save the whole database to the cloud.
What do you suggest ?
Should i drop SQLite and use another database for cloud programming .
iCloud supports SQLite databases.
When properly setup it will only sync change logs instead of the entire database. In theory it's pretty nice. I haven't however had the best of luck using it yet, it seems to be a little too buggy to actually use in ios 5, hopefully it's better in 6.
To be most efficient you could manage a changelog of objects that are modified by the app. Then when its time to sync (while closing the app for instance), you can make operational requests to the Cloud. For add and update you can send the entire object, while for delete just the oid should suffice.
This is a very simple sync scenario. Things can get complicated fast if you are looking to send changes that happen in the Cloud down to the device. That is a scenario for a different thread.
Based on your question, you just need to sync from the device to the Cloud.