Closed tiborsimko closed 4 years ago
Stemming from #8 , we should also fix the behaviour of --output-fields. This currently allows to select only metadata, created, ... and other top-level fields from the /api/records output. This is not very useful.
--output-fields
metadata
created
/api/records
While the power users can do things like:
$ cernopendata-client get-metadata --recid 1 | jq -S '.metadata.title' "/BTau/Run2010B-Apr21ReReco-v1/AOD" $ cernopendata-client get-metadata --recid 1 | jq -S '.metadata.system_details.global_tag' "FT_R_42_V10A::All"
it would be useful to amend --output-fields to allow searching inside metadata section, so that users could write instead:
$ cernopendata-client get-metadata --recid 1 --output-fields title /BTau/Run2010B-Apr21ReReco-v1/AOD $ cernopendata-client get-metadata --recid 1 --output-fields system_details.global_tag FT_R_42_V10A::All
IOW, --output-fields should be able to print out a wanted JSON path value directly.
Stemming from #8 , we should also fix the behaviour of
--output-fields
. This currently allows to select onlymetadata
,created
, ... and other top-level fields from the/api/records
output. This is not very useful.While the power users can do things like:
it would be useful to amend
--output-fields
to allow searching inside metadata section, so that users could write instead:IOW,
--output-fields
should be able to print out a wanted JSON path value directly.