-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support data object is member of a collection #394
Comments
Suggest adding a Example: $schema: <schema_url>
data:
x: y
z: 1
relations:
member_of:
- <uuid4>
- <uuid4> Upside with using list is to capture when object is member of more than one collection. Downside is searchability. But probably possible to work around. |
Since data object can be member of > 1 collection, input argument must support more than one collection_name. Will use collection_name, not collection_tagname, to avoid confusion with the other "tagname". |
Draft PR for discussions: #396 There are some unanswered questions still. |
Possibly confusing that the |
Instead of specifying Also, ExportData instances have no name/identifier. |
That is an interesting idea, but requires some user awareness: (1) You need to export all needed for you "collection" in the same script using the same instance, and (2) there is a risk of the opposite; people exports stuff not being indented as a collection by using the same instance. So they get a number of "unaware" collections... For (1), the instance settings (properties) needs also to be updated in the |
Yes, there are some snags. If combined with a "best practice" description of how we intent fmu-dataio to be used (#395) it could be part of the contract that everything exported within the same instance of So I don't think we should pursuit this.... |
Updated draft PR #396 to produce relations.collections as a list of objects, where each "collection" is a dict containing uuid and name: relations:
collections:
- name: "mycollection" # as written by user in input arguments
uuid: <uuid4> # hash of name + case.uuid, so identical only within context of case |
I wonder if the wanted collection names shall be defined at the "case" level (i.e. they must exists in global config or similar): Reasons:
|
Technically on model level, which makes sense. It has been a stated requirement that a "collection" must be unique to the case (hence it is hashed together with the case.uuid). But it could be that it sometimes must be unique also on iteration (ensemble) level, and possibly on realization level. So, given these "levels" in the "hierarchy": ...we have assumed that it must be unique on Key question here is perhaps "what is the level of uniqueness needed for collections"? Do we need the unique id's at all, or is it enough with a string identifier/name? Ref defining globally: So when exporting a data object tied to a collection, it must be verified that this collection is defined (in global config)? Not 100 % sure about the user experience, but that can be worked on. |
Discussion 23.11.2023
Important that tagged collections can be grouped through Elasticsearch |
From: #396 (comment) @daniel-sol
Yes, I agree. This is conceptually hard to see a smooth solution to, given current constraints etc. Multiple pointers to the same data object probably creates a HUGE overhead in bookkeeping (gut-feeling). Multiple uploads of the same object is an option, but doesn't feel good. A possible option is that collections are pre-defined, and that export scripts point to one or more specific collections when exporting. In the metadata, they are then explicitly listed. But this does not solve how this is to be used by a client. Then the client must also know the context of each collection, etc. The fundamental need here was to be able to link objects together, e.g. "as a consumer of FMU results, I would like to be able to find connected data, so that I can co-visualize connected data in multiple contexts." or something like that. The collections-concept may not be the best way to handle it. The current solution is using |
Discussions 13. november 2023
@jcrivenaes @daniel-sol @HansKallekleiv
In some cases, exported data objects from FMU are related to each other. The specific example discussed revolve around volume calculations, where the same data are represented as a
table
, a3D grid parameter
and asurface
.A need from Webviz is to programmatically link these together. Conceptually, they all "siblings". This has some parallels to the existing
aggregation_id
used for aggregated data, where multiple results from the same operation is assigned a commonaggregation_id
so that they can be linked together.Elements discussed:
collection_id
as an argument toExportData.__init__()
, and then forward this to the outgoing metadata? That means each object from this operation is tagged with the same ID. So, when a client is using one of the siblings, it will know that 1) there are other siblings and 2) be able to identify them from thecollection_id
collection_id
is perhaps not great.member_of
.collection_tagname
(placeholder name) as argument toExportData()
. Generate auuid4
as a hash of currentcase.uuid
andcollection_tag
. This ensures that thecollection_id
(placeholder name) is identical across all realizations, but unique per case.(Also discussions on gathering all Volume-related exports into one single class, to make essentially a "one-liner". This proposal would be a first step towards this, by doing a very small iteration in the right direction - which includes some tag in the outgoing metadata that can be used. @daniel-sol can you describe in separate issue?)
Proposal
collection_tagname
toExportData()
uuid4
as a hash of currentcase.uuid
andcollection_tagname
data.member_of
(placeholder name) in outgoing metadata.In metadata definitions, add the necessary tag. Placeholder name:
member_of
.Example:
Example script:
The collection tagname is in this proposal not directly represented in outgoing metadata. It's only purpose is to be basis for the hash. We could include it, but risk is that it will be directly used by clients.
Please add discussion details I have forgotten.
The text was updated successfully, but these errors were encountered: