Opened 8 years ago
Closed 8 years ago
#1528 closed defect (fixed)
wcst_import should preserve all metadata from netcdf
Reported by: | Dimitar Misev | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 9.4 |
Component: | wcst_import | Version: | development |
Keywords: | Cc: | Vlad Merticariu | |
Complexity: | Medium |
Description (last modified by )
Currently it preserves only the metadata explicitly specified by the user. This should be changed to the following:
- in case metadata: global, in the ingredient is an object (even empty), the current behavior is kept (the metadata indicated in the ingredient is kept)
- in case metadata: global has value "auto", all fields from the file are kept, specified as:
"metadata": { "type": "xml", "global": "auto" } or "metadata": { "type": "json", "global": "auto" }
- in case metadata: global does not exist, the "auto" behavior is assumed.
Case 2: If user wants to add some metadata and keep the existing ones, then he has to add all manually.
Change History (13)
comment:1 by , 8 years ago
Component: | petascope → wcst_import |
---|
comment:2 by , 8 years ago
Consider 4 use-cases:
- user wants to keep all metadata unchanged
- user wants to keep all metadata, and add some
- user wants to keep only some of the metadata from the file
- user wants to keep all metadata, with different keys
All these are currently supported. If we go for automatic preserving, only 1 and 2 are supported.
comment:3 by , 8 years ago
We can support 3 and 4 by allowing to disable auto-preservation of metadata (in which case it would equate to the current behavior)
comment:4 by , 8 years ago
So after discussion we have decided that:
- in case metadata: global, in the ingredient is an object (even empty), the current behavior is kept (the metadata indicated in the ingredient is kept)
- in case metadata: global has value "auto", all fields from the file are kept
- in case metadata: global does not exist, the "auto" behavior happens.
Please correct if there's anything wrong.
comment:5 by , 8 years ago
Can you give a specific example of how the second point would look like in the ingredients? So we have it documented here.
comment:6 by , 8 years ago
Case 2:
"metadata": {
"type": "xml",
"global": "auto"
}
or
"metadata": {
"type": "json",
"global": "auto"
}
comment:7 by , 8 years ago
Description: | modified (diff) |
---|
comment:8 by , 8 years ago
This should produce empty metadata:
"metadata": {
"type": "json",
"global": {}
}
While this should produce "auto" metadata:
"metadata": {
"type": "json"
}
Same in case "metadata" is not specified at all.
comment:9 by , 8 years ago
Description: | modified (diff) |
---|
comment:11 by , 8 years ago
Description: | modified (diff) |
---|
comment:12 by , 8 years ago
We should open a new ticket for that. Right now, metadata of variables is saved into the RageField representing the variable, and its contents are limited to the schema of swe commons. At some point we should treat is as we treat global metadata, and simply add it below "global", in a field with the name of the variable. There is some work on this started by FZ Juelich, but I don't know how advanced it is.
comment:13 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
It should be added new if the metadata field does not exist and overwrite if exists.