How to delete a cosmosDB document that ends with blank space? - azure-cosmosdb

Somehow we have managed to insert a document where the id ends with a space, now this document fails to load in portal and in any db tool I have tried with the following error
Resource Id cannot end with space
How can I delete this document?

There is a valid workaround using the .NET SDK: https://learn.microsoft.com/azure/cosmos-db/sql/troubleshoot-not-found#invalid-character-in-an-item-id

Related

Custom properties/tags is replaced with actual values in MS Word using code or any SDK

I have scenario as I have a template in a Microsoft Word document (.docx) that has placeholders / tags / custom properties that say "{!CompanyName}" since I have a business necessity. This will later, after processing, be combined with the real database table contents or any other source values, and saved as a new Word document (.doc).
Which free SDK works the best for .net core?
Support for the following key feature should be included in the SDK 
tag replacement with actual data
Auto-generated table and rows
Image insertion into the template
Conditional check.
Please make a suggestion here!

Google Firestore find deleted subcollections for a deleted document

When I go to delete a document from the Firestore console, I get the following message:
"This will permanently delete all data at this location, including all nested data."
However, the Firestore documentation reads: "Deleting a document does not delete the documents in its subcollections"
Can someone clarify this relationship for me?
If I delete a document from the Firestore console, it appears to remove all subcollections and nested data. If it doesn't, how can I delete said sub collections since I can no longer see them?
The console will do exactly what it says - delete the document and all of the subcollections organized under it.
The client APIs will not. If you delete a document using the standard delete() method on a document reference, it will not delete anything organized under it.

Download Images from server location saved in Sqlite

I am developing a android application. In one activity I have to download multiple images associated with a List Item say 2 images per List Item. The Image URLs are saved in Sqlite DB. These images are LowRes and HighRes Images. I have to download them when I first launch the application. I have also set boolean flag (with each IMAGE URL )in DB to check whether the image has been downloaded or not. If not fetch them else proceed to next URL. If image is fetched successfully, I have to save in storage and mark the corresponding flag as true so that I can directly search folder for the file. My understanding is:
1. Go through the DB file and find the items(rows) whose downloaded flag is false.
2. Gather all these URLs and send these to AsyncTask to download them.
My Sample DB structure:
| ItemName | LowResImageURL| HighResImageURL | LowResDownloaded | HighResDownloaded|
Query:
1. Once a image is downloaded, how can I get the reference of corresponding flag in DB so that I can set it as 'True' i.e.How to get/pass row reference to my ImageDownload method?
2. Best way to download approx 300 images from server.
Thanks
Sam
One thing that is coming to my mind is that I have to create a class to store the values from the DB then pass the object to async task, update the object accordingly after the image is downloaded and saved. After its done, update the DB from the updated class object.

Changing Field Names In Firebase

Somehow in my firebase account 2 sets of data have changed the fieldname for 'DeviceID' to 'PeripheralID' and 'DeviceUUID'. Is there a way that I can search these and change them to be 'DeviceID'? I would prefer to do this by command line but will do whatever is easier.
Im thinking something along the line of firebase update:database ?
To answer the question with comments under question:
There is no tool for it. You'll have to download the data from database, edit JSON with some kind of text editor and upload it back to database.
This operation OVERRIDES information in database with information in JSON. In other words: uploading JSON changes database.
If you're using firebase console and data you want to change is not in whole database, you could open certain tree level and do those operation just there.

How to get last modified date & author from search:search API?

I am uploading some documents in Marklogic Server (doc, docx, pdf, txt etc). Now I am building an interface in HTML & XQuery that allows a user to enter a search term and if that matches the contents of any documents, then that document name is displayed in the grid. I am using search:search API for searching. Now I also want to show last modified date and author of the document in the grid. Every windows document have last modified date and author property. But how can I get this information from search:search API so that I can show these information in the grid ?
If you have enabled the settings "maintain last modified," Marklogic keeps the last modified information in document property fragments. However, this is unrelated to the properties information kept in Windows, which are lost by default when you load them in Marklogic.
If you want to retain the Windows properties data, set up a filter in Information Studio to populate the Marklogic property fragments with the data. Alternately, you could write your own XSLT and use xdmp:document-filter() to store the data directly in the document.
Once you have loaded your documents and populated them with the properties you need, you can access the data directly if stored in the document, or using xdmp:document-properties() if stored in document properties.

Resources