Coder Social home page Coder Social logo

Comments (5)

mcast avatar mcast commented on July 19, 2024

iquest from the standard icommands will give you the META_DATA_ATTR_ID.

Here's my nearest dev zone file with some AVUs,

mca@casm3-head2:~$ i-cgpdev iquest '%s %s %s %s' "select DATA_ID, META_DATA_ATTR_ID, META_DATA_ATTR_NAME, META_DATA_ATTR_VALUE where COLL_NAME = '/cgp_dev/home/mca2' and DATA_NAME = 'dict-move.pl'"
33464 33465 t-mca-CANT.id_ifile 3892804
33464 33461 t-mca-CANT.md5 ea168b18a53952b38e8ba448d2653f9d
mca@casm3-head2:~$ i-cgpdev imeta ls -d /cgp_dev/home/mca2/dict-move.pl
AVUs defined for dataObj /cgp_dev/home/mca2/dict-move.pl:
attribute: t-mca-CANT.md5
value: ea168b18a53952b38e8ba448d2653f9d
units: 
----
attribute: t-mca-CANT.id_ifile
value: 3892804
units: 
mca@casm3-head2:~$ i-cgpdev imeta rmi -d /cgp_dev/home/mca2/dict-move.pl 33464
remote addresses: 172.30.157.15 ERROR: rcModAVUMetadata failed with error -819000 CAT_SUCCESS_BUT_WITH_NO_INFO 

so DATA_ID is correctly rejected, being an id for the entire file, although if I didn't know why then I'm not sure the error message would help me much.

mca@casm3-head2:~$ i-cgpdev imeta ls -d /cgp_dev/home/mca2/dict-move.pl
AVUs defined for dataObj /cgp_dev/home/mca2/dict-move.pl:
attribute: t-mca-CANT.md5
value: ea168b18a53952b38e8ba448d2653f9d
units: 
----
attribute: t-mca-CANT.id_ifile
value: 3892804
units: 
mca@casm3-head2:~$ i-cgpdev imeta rmi -d /cgp_dev/home/mca2/dict-move.pl 33461
mca@casm3-head2:~$ i-cgpdev imeta ls -d /cgp_dev/home/mca2/dict-move.pl
AVUs defined for dataObj /cgp_dev/home/mca2/dict-move.pl:
attribute: t-mca-CANT.id_ifile
value: 3892804
units: 

I think this is correct but I'm not sure it addresses all of your problem..?

from irods_client_icommands.

fh-afk avatar fh-afk commented on July 19, 2024

Yes, the iquest command would have been a solution for my specific problem, too. However, this requires an iRODS admin to also be familiar with the specific SQL database structure behind iCAT which is not that well documented. META_DATA_ATTR_ID is not even mentioned in the documentation if iquest.

rcModAVUMetadata failed with error -819000 CAT_SUCCESS_BUT_WITH_NO_INFO - It did not take long for me to figure out the meaning of this when I encountered the same message, but it is misleading and confusing, something more to the point, e.g. "ERROR: Metadata ID not found" would be nice.

In any case, I agree there are ways to get the Metadata ID, I mentioned this myself, but I still think my suggestion would a be a good idea - this way an iRODS admin might not even have to know the SQL column names.

from irods_client_icommands.

trel avatar trel commented on July 19, 2024

Hi @fh-afk, iquest attrs will present all the available columns for query/listing. And that is available to any user, not just rodsadmins.

That said, yes, the verbosity flags are a bit of a mess throughout the iCommands. We're looking to fix those as we find egregious ones. This one could certainly be more helpful.

from irods_client_icommands.

fh-afk avatar fh-afk commented on July 19, 2024

Hi @trel, iquest attrs comes in handy when you really want to work on SQL level, so thank you very much for this hint. Unfortunately, it does not print any documentation for those columns, most of the column names are self explanatory, but not all of them, but this is probably very subjective (depending on the level of iRODS experience). I would still consider it a good idea to fully abstract from the SQL database and not even touch it directly once iRODS is fully set up an running.
Anyway, this is only a suggestion. As always, your input was very valuable. Have a nice day!

from irods_client_icommands.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.