File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
16
16
### Fixed
17
17
18
+ - apply_dimension with a 'target_dimension' argument was not correctly adjusting datacube metadata on the client side, causing a mismatch.
19
+
18
20
19
21
## [ 0.31.0] - 2024-07-26
20
22
Original file line number Diff line number Diff line change @@ -1160,11 +1160,16 @@ def apply_dimension(
1160
1160
"process" : process ,
1161
1161
"dimension" : self ._assert_valid_dimension_name (dimension ),
1162
1162
}
1163
+
1164
+ metadata = self .metadata
1163
1165
if target_dimension is not None :
1164
1166
arguments ["target_dimension" ] = target_dimension
1167
+ metadata = self .metadata .reduce_dimension (dimension_name = dimension ) if self .metadata else None
1168
+ if (not target_dimension in self .metadata .dimension_names ()):
1169
+ metadata = self .metadata .add_dimension (target_dimension , label = "unknown" )
1165
1170
if context is not None :
1166
1171
arguments ["context" ] = context
1167
- result_cube = self .process (process_id = "apply_dimension" , arguments = arguments )
1172
+ result_cube = self .process (process_id = "apply_dimension" , arguments = arguments , metadata = metadata )
1168
1173
1169
1174
return result_cube
1170
1175
You can’t perform that action at this time.
0 commit comments