@@ -73,7 +73,7 @@ export class YamlCompiler {
7373 cubeObj . measures = this . yamlArrayToObj ( cubeObj . measures || [ ] , 'measure' , errorsReport ) ;
7474 cubeObj . dimensions = this . yamlArrayToObj ( cubeObj . dimensions || [ ] , 'dimension' , errorsReport ) ;
7575 cubeObj . segments = this . yamlArrayToObj ( cubeObj . segments || [ ] , 'segment' , errorsReport ) ;
76- cubeObj . preAggregations = this . yamlArrayToObj ( cubeObj . preAggregations || [ ] , 'segment ' , errorsReport ) ;
76+ cubeObj . preAggregations = this . yamlArrayToObj ( cubeObj . preAggregations || [ ] , 'preAggregation ' , errorsReport ) ;
7777 cubeObj . joins = this . yamlArrayToObj ( cubeObj . joins || [ ] , 'join' , errorsReport ) ;
7878
7979 return this . transpileYaml ( cubeObj , [ ] , cubeObj . name , errorsReport ) ;
@@ -222,7 +222,10 @@ export class YamlCompiler {
222222 return { } ;
223223 }
224224
225- const remapped = yamlArray . map ( ( { name, ...rest } ) => {
225+ const remapped = yamlArray . map ( ( { name, indexes, ...rest } ) => {
226+ if ( memberType === 'preAggregation' && indexes ) {
227+ indexes = this . yamlArrayToObj ( indexes || [ ] , `${ memberType } .index` , errorsReport ) ;
228+ }
226229 if ( ! name ) {
227230 errorsReport . error ( `name isn't defined for ${ memberType } : ${ YAML . stringify ( rest ) } ` ) ;
228231 return { } ;
0 commit comments