irule -F rulemsiLoadMetadataFromDataObj.r
ERROR: rcExecMyRule error. status = -1097000 NO_RULE_OR_MSI_FUNCTION_FOUND_ERR
Level 0: DEBUG: error: cannot find rule for action "msiGetDataObjAVUs" available: 100.
line 10, col 2
msiGetDataObjAVUs(*Filepath,*Buf);
^ --
--
"iRODS: the Integrated Rule-Oriented Data-management System; A community driven, open source, data grid software solution" https://www.irods.org
iROD-Chat: http://groups.google.com/group/iROD-Chat
---
You received this message because you are subscribed to the Google Groups "iRODS-Chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
irule -F rulemsiLoadMetadataFromDataObj.r
ERROR: rcExecMyRule error. status = -1232000 RE_DYNAMIC_TYPE_ERROR
Level 0: DEBUG: Unable to get valid ICAT column index for META_DATA_ATTR_UNIT.
line 12, col 58
*rs = SELECT META_DATA_ATTR_NAME, META_DATA_ATTR_VALUE, META_DATA_ATTR_UNIT WHERE DATA_NAME = "metadata-target5.txt" AND COLL_NAME = "/tempZone/home/felipe"cat rulemsiLoadMetadataFromDataObj.r
myTestRule {
msiLoadMetadataFromDataObj(*Path,*Status);
# msiGetDataObjAVUs(*Filepath,*Buf);
# writeBytesBuf("stdout",*Buf);
}To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+...@googlegroups.com.
You may want to try META_DATA_ATTR_UNITS as your column name, as per https://github.com/irods/irods/blob/master/lib/core/include/rodsGenQueryNames.h#L105
[root@fedora20 irules]# cat rulemsiLoadMetadataFromDataObj.r
myTestRule {
msiLoadMetadataFromDataObj(*Path,*Status);
# msiGetDataObjAVUs(*Filepath,*Buf);
# writeBytesBuf("stdout",*Buf);
*rs = SELECT META_DATA_ATTR_NAME, META_DATA_ATTR_VALUE, META_DATA_ATTR_UNITS WHERE DATA_NAME = "metadata-target5.txt" AND COLL_NAME = "/tempZone/home/felipe"
foreach(*row in *rs) {
writeBytesBuf("stdout", *row.META_DATA_ATTR_NAME ++ *row.META_DATA_ATTR_VALUE ++ *row.META_DATA_ATTR_UNITS);
}
}
INPUT *Path="/tempZone/home/felipe/load-metadata.txt", *Filepath="/tempZone/home/felipe/metadata-target.txt"
OUTPUT ruleExecOut
[root@fedora20 irules]# cat metadata-target5.txt
felipe oliveira gutierrez
gutierrez ggg ffff
clube corinthians paulista
musica saudosa maloca
cantor Adoniram Barbosa
[root@fedora20 irules]# irule -F rulemsiLoadMetadataFromDataObj.r
ERROR: [-] iRODS/lib/core/src/procApiRequest.cpp:266:readAndProcApiReply : status [SYS_HEADER_READ_LEN_ERR] errno [] -- message []
[-] iRODS/lib/core/src/sockComm.cpp:199:readMsgHeader : status [SYS_HEADER_READ_LEN_ERR] errno [] -- message [failed to call 'read header']
[-] libssl.cpp:577:ssl_read_msg_header : status [SYS_HEADER_READ_LEN_ERR] errno [] -- message [read 0 expected 4]
ERROR: rcExecMyRule error. status = -4000 SYS_HEADER_READ_LEN_ERR
ERROR: [-] iRODS/lib/core/src/rcConnect.cpp:269:rcDisconnect : status [SYS_HEADER_WRITE_LEN_ERR] errno [Broken pipe] -- message []
[-] iRODS/lib/core/src/sockComm.cpp:1386:sendRodsMsg : status [SYS_HEADER_WRITE_LEN_ERR] errno [Broken pipe] -- message [failed to call 'write body']
[-] libssl.cpp:1058:ssl_send_rods_msg : status [SYS_HEADER_WRITE_LEN_ERR] errno [Broken pipe] -- message [Write message header failed.]
[-] iRODS/lib/core/src/sockComm.cpp:473:writeMsgHeader : status [SYS_HEADER_WRITE_LEN_ERR] errno [Broken pipe] -- message []
[-] libssl.cpp:1001:ssl_write_msg_header : status [SYS_HEADER_WRITE_LEN_ERR] errno [Broken pipe] -- message [Wrote -1 expected 140.]
ERROR: [-] iRODS/lib/core/src/rcConnect.cpp:281:rcDisconnect : status [SSL_SHUTDOWN_ERROR] errno [] -- message []
[-] iRODS/lib/core/src/sockComm.cpp:100:sockClientStop : status [SSL_SHUTDOWN_ERROR] errno [] -- message [failed to call 'client stop']
[-] libssl.cpp:648:ssl_client_stop : status [SSL_SHUTDOWN_ERROR] errno [] -- message [error shutting down the SSL connection]The input metadata file for that microservice should have one AVU per line. Each AVU line contains the target path, attribute name, attribute value, and attribute unit separated by pipe characters (which must be escaped with '\' when used inside the tokens).
The target path can be a file or a collection and can be different for each line.
Example:
C-/tempZone/home/rods/testColl |CollAttr000 |CollVal00 |CollUnits00
/tempZone/home/rods/testColl/file00.txt |myAttr000 |myVal001
/tempZone/home/rods/testColl/file00.txt |myAttr001 |myVal001 |myUnits001
# Some comments
/tempZone/home/rods/testColl/file01.txt |myAttr011 |myVal011
/tempZone/home/rods/testColl/file01.txt |myAttr010 |myVal011
This is fairly old stuff but that microservice may also work for you:
https://github.com/DICE-UNC/microservices/tree/master/microservices/msiLoadMetadataFromXml