Feature #8501

[SDKs] Add client-side join switches to `arv foo list`

Added by Joshua Randall about 5 years ago. Updated about 5 years ago.

Assigned To:
Target version:
Start date:
Due date:
% Done:


Estimated time:
Story points:


It is possible to do client-side joins using the CLI, but it is very cumbersome, and is hard to write efficiently.

This is especially useful when dealing with links (as one rarely cares about the link itself, but rather wants to know something about the entities that are linked), but I think support should be generic and not specific to links.

For example, one might want to lookup collections having a particular tag and give the collection name and owner information. Today, one can accomplish this using the CLI using numerous invocations to `arv get` and `jq`:

$ for collection_uuid in $(arv link list -f '[["link_class","=","tag"],["head_kind","=","arvados#collection"],["name","=","my_favorite_tag"]]' -s '["head_uuid"]' | jq -r '.items[].head_uuid'); do collection_name=$(arv get "${collection_uuid}" | jq -r '.name') && collection_owner_uuid=$(arv get "${collection_uuid}" | jq -r '.owner_uuid') && owner_name=$(arv get "${collection_owner_uuid}" | jq -r '.name') && owner_kind=$(arv get "${collection_owner_uuid}" | jq -r '.kind') && echo "${collection_owner_uuid} "'{"collection_name":"'${collection_name}'","owner_name":"'${owner_name}'","owner_kind":"'${owner_kind}'"}'; done

One way this could be made simpler would be by adding a "join" option for `arv foo list` along with having extended syntax for select and filter options that allow one to refer to columns namespaced to be within the joined objects.

An example of how an invocation might look:

arv link list -s '["collection.name", "owner.name", "owner.kind"]' -j '{"collection":"head_uuid","owner":"collection.owner_uuid"}' -f '[["link_class","=","tag"],["head_kind","=","arvados#collection"],["name","=","my_favorite_tag"]]'


#1 Updated by Brett Smith about 5 years ago

  • Subject changed from `arv foo list` client-side joins to [SDKs] Add client-side join switches to `arv foo list`

#2 Updated by Brett Smith about 5 years ago

  • Target version set to Arvados Future Sprints

Also available in: Atom PDF