Closed AlexDo1 closed 3 years ago
I´m not sure about everything I've written here.
We were talking about the get_details()
function but I cannot find the function anywhere, is this the right function that has to be modified? Or is it the entry function get_data()
, which has to be called when someone wants to extract/read data.
I also do not quite understand the self.property
part.
For example, if I run something like entry._colmapping
, it should display the colmapping information?
So the colmapping information should be stored as an attribute of the entry after running get_details()
?
Aaaaaand this topic is probably better off in the metacatalog repository.
I´m not sure about everything I've written here.
We were talking about the
get_details()
function but I cannot find the function anywhere, is this the right function that has to be modified? Or is it the entry functionget_data()
, which has to be called when someone wants to extract/read data.
The function is actually called details_dict
:
I also do not quite understand the
self.property
part.
Yeah, 'property' was a bad synonyme as a property
is a real thing in Python. These functions that behave like read-only attributes. The main problem we were referring to is, that the Entry
class would have to pickup the column-mapping and pass it to the reader (and writer) functions. These functions accept **kwargs
, thus passing them is easy. They just need a fixed name, the read look for, like settings
or props
.
Anyway, I think the better avenue is https://github.com/VForWaTer/metacatalog/issues/124 Check the example out and commet on this avenue. This would also make this issue obsolete.
3D-wind data (u, v, w) from eddy data can be stored in a generic 3D table with the column names value1, value2 and value3 and the timestamp as index. These generic column names must be mapped to the variable names u, v, w when a user extracts (reads) the data from metacatalog.
An idea to do this is to implement the key
_colmapping
in the details.The
get_details()
function must be modified to distinguish between keys that start without an underscore ('normal' keywords) and keys that start with an underscore ('settings' keywords) and append the_colmapping
information to the entry as a property (self.property
).As a last step,
reader.py
must be modified to use the information in_colmapping
to map the column names.With this solution, we could use a generic table with the column names value1, value2 and value3 and map these columnnames to u, v and w.
Necessary steps:
get_details()
to distinguish between underscore and non-underscore keywords_colmapping
information toself.property
reader.py
to map the column names