how to retrieve key from siblings in riak - riak

I have sibling like this "RAtqxEhJvwUGkv54TmRlUaOXwEk" in riak.
Now I want to retrive key of this sibling using curl GET request.
Is their any way to find out key

The key is the same for all siblings of an object, that's why they are called siblings. If you want to retrieve a particular sibling, use vtag request parameter. For example, curl http://127.0.0.1:8098/buckets/MY_BUCKET/keys/MY_KEY?vtag=RAtqxEhJvwUGkv54TmRlUaOXwEk. See https://docs.basho.com/riak/kv/latest/developing/api/http/fetch-object/#siblings-examples

Related

kotlin firebase remove child

I'm trying to delete a specific value from a firebase realtime database, but I don't know how to do it because I don't know to save or find the key value of the child which is automatically generate.
If you see the picture I've only managed to remove all the children from the first key with
FirebaseDatabase.getInstance().reference.child("Comentarios").removeValue()
But I need to delete just by the child creadoPor
Is there any way of skkiping an unnamed child?
FirebaseDatabase.getInstance().reference.child("Comentarios").removeValue()
But I need to delete just by the child creadoPor.
Since you know the "grantparent" key of the data and the value of one of the nodes properties, you can use a query to find the nodes that match that value.
FirebaseDatabase.instance
.ref("Comentarios")
.child("-NGi7xP...")
.orderByChild("creadoPor")
.equalTo("R7lji3...")
When you get the DataSnapshot from the query, you'll need to loop over its children as shown in the documentation on listening for value events. Even when there's only one result, you'll get a list of one child node and thus will need to loop over them.

DynamoDB: Is it possible to retrieve the existent item when using attribute_not_exists?

I am using put_item along with ConditionExpression='attribute_not_exists(#primary_key)' to avoid duplicates for some dataset inserts.
Is it possible to allow put_item to return the duplicate item without having to perform any other client API call?
According to the put_item docs
Use ReturnValues if you want to get the item attributes as they appeared before they were updated with the PutItem request. For PutItem, the valid values are:
NONE - If ReturnValues is not specified, or if its value is NONE, then nothing is returned. (This setting is the default for ReturnValues.)
ALL_OLD - If PutItem overwrote an attribute name-value pair, then the content of the old item is returned.
I'm not sure how this behavior works when using attribute_not_exists, but perhaps it can give you a starting point?

is there any I can exclude attitube from results on get_item using boto3

I would like to exclude user_name from my response of get_item.
Below is my query
results = TABLE.get_item(
Key={
'id': is,
}
)
return results['Item']
How can I exclude user_name from this response?
The DynamoDB GetItem operation has a ProjectionExpression parameter (or the archaic AttributesToGet parameter) which can be used to only request specific attributes, but there is no syntax to specific that you want all the attributes except one specific attribute.
If your items do not have a known list of attributes, all you can do in this case is to just retrieve the entire item with all its attributes, and then remove the user_name attribute from the response object, in Python.
Usually, there is no downside to doing this; Note that in any case you pay for the read based on the entire item's size - regardless of which attributes you ask to retrieve. So when the attribute you wish to exclude is small, the networking overhead is small anyway, and when the attribute you wish to exclude is large, you'll be paying for reading it anyway - so you should probably change your data model.

Alfresco: Search all nodes without parents

I'd like to know how to get all nodes of a given type ts:folderSet which has no parent association of type ts:FolderSubSet informed.
Currently:
So, I mean, I need all nodes of type ts:folderSet where tsfss:folderSubSet-folder is null or not informed.
Currently, I'm using admin tool in order to build this query, but I'll need to use it into a java code.
So I mean, I can use FTS or lucene...
Any ideas?
If your parent type is different you can do:
+TYPE:"ts:folderSet"
The problem is that the PARENT keyword in search uses the primary parent. Your ts:folderSubSet object is a secondary parent to your ts:folderSet object. I don't think you will be able to write a single query that can find instances of ts:folderSet that do not have an instance of ts:folderSubSet as a secondary parent.
You can write a query that returns ts:folderSet objects and then you can iterate over each one of the results checking its list of parents for the secondary object. Not ideal, but it is probably the best you can do.
You can search for a type of nodes using the following Lucene query
TYPE:"cm:folder"

Modality work list - Which items are returned for C-FIND request of a sequence?

My question is a really basic question. Consider to query a modality work list to get some work items by a C-FIND query. Consider using a sequence (SQ) as Return Key attribute for the C-FIND query, for example: [0040,0100] (Scheduled Procedure Step) and universal matching.
What should I expect in the SCP's C-FIND response? Or, better say, what should I expect to find with regards of the scheduled procedure step for a specific work item? All the mandatory items that Modality Work List Information Model declare as encapsulated in the sequence? Should I instead explicitly issue a C-FIND request for those keys I want the SCP return in the response?
For example: if I want the SCP return the Scheduled Procedure Step Start Time and Scheduled Procedure Start Date, do I need to issue a specific C-FIND request with those keys or querying for Scheduled Procedure Step key is enough to force the SCP to send all items related to the Scheduled Procedure Step itself?
Yes, you should include the Scheduled Procedure Step Start Time / Date Tags into the 0040,0100 sequence.
See also Service Class Specifications (K6.1.2.2)
This will not ensure you will retrieve this information, because it depends on the Modality Worklist Provider, which information will be returned.
You could also request a Dicom Conformance Statement from the Modality Provider to know the necessary tags for request/retrieve.
As for table K.6-1, you can consider it as showing only the requirement of the SCP side or what SCP is required to use for matching key (i.e. query filter) and additional required attribute values to return (i.e. Return Key) with successful match. It is up to SCP’s implementation to support matching against required key but you can always expect SCP to use the values in matching key for query filter.
Also note that, SCP is only required to return values for attributes that are present in the C-FIND Request. One exception is the sequence matching and there you have the universal matching like mechanism where you can pass a zero length ITEM to retrieve entire sequence. So as stated in PS 3.4 section C.2.2.2.6, you can just include an empty ITEM (FFFE, E000) element with VR of SQ under Scheduled Procedure Step Sequence (0040, 0100) for universal matching.

Resources