irods / python-irodsclient

A Python API for iRODS
Other
63 stars 73 forks source link

Metadata timestamps returned for objects and collections #581

Open paulborgermans opened 2 months ago

paulborgermans commented 2 months ago

When querying <data_object|collection>metadata(timestamps=True).items() it returns the timestamps from the avu creation, not when it was added to an item (the timestamps in the r_objt_metamap table for example).

Could this be specified in the query / future API calls or is there another way to obtain those timestamps with GenQuery / GenQuery2 ?

Thanks

paulborgermans commented 2 months ago

Bacground: we want to use those timestamps in workflow/validation scenarios

d-w-moore commented 2 months ago

Hmm, there don't seem to be any GenQuery1 columns that reflect the timestamp of AVU attachment (ie set/add). The META_*_MODIFY_TIME and META_MET2_MODIFY_TIME, in my experimentation , seem to reflect the the creation (or modification) of the AVU itself. Maybe GenQuery2 expands available columns to include the timestamps in the r_objt_metamap table, which do seem to reflect the attachment-ts values we're looking for? @korydraughn ?

d-w-moore commented 2 months ago

If not , I guess specific query will be the workaround / answer. In that case though, baking it into the PRC as a fixture, ie object attribute, will only be appropriate if these columns are available by means of a built-in (non-deletable) specific query.

korydraughn commented 2 months ago

@d-w-moore is correct. That information is not exposed through GenQuery1 or GenQuery2 today.

The only way to fetch that information is by using a SpecificQuery.

I'll open an issue in irods/irods for this.

alanking commented 2 months ago

So, we need to...

Am I missing anything?

d-w-moore commented 2 months ago

@alanking sounds right. The PRC can expose the new timestamp attributes conditionally , based on an optional- or lazy-load policy , informed by whether our new specific query for those timestamps is loaded or not. (as opposed to making the query undeletable, which I'm guessing is not feasible.)

alanking commented 2 months ago

Okay. I'm going to mark this as an enhancement, but I'm willing to be convinced that it's something else. :)

korydraughn commented 2 months ago

@alanking sounds right. The PRC can expose the new timestamp attributes conditionally , based on an optional- or lazy-load policy , informed by whether our new specific query for those timestamps is loaded or not. (as opposed to making the query undeletable, which I'm guessing is not feasible.)

The decision to provide a SpecificQuery is up to the admin.

The only things for us to do are:

@alanking Agreed. Marking as enhancement is good.

paulborgermans commented 2 months ago

Thanks for this, until it lands in a release, I will use a specific query