Skip to content

Commit 442ee9f

Browse files
committed
fix(cube): Meta type for switch dimension
1 parent f556b62 commit 442ee9f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/cubejs-schema-compiler/src/compiler/CubeToMetaTransformer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class CubeToMetaTransformer {
103103
R.map((nameToDimension) => ({
104104
name: `${cube.name}.${nameToDimension[0]}`,
105105
title: this.title(cubeTitle, nameToDimension),
106-
type: nameToDimension[1].type,
106+
type: this.dimensionDataType(nameToDimension[1].type),
107107
description: nameToDimension[1].description,
108108
shortTitle: this.title(cubeTitle, nameToDimension, true),
109109
suggestFilterValues:
@@ -197,6 +197,10 @@ export class CubeToMetaTransformer {
197197
return defaultValue;
198198
}
199199

200+
dimensionDataType(dimensionType) {
201+
dimensionType == 'switch' ? 'string' : dimensionType;
202+
}
203+
200204
measureConfig(cubeName, cubeTitle, nameToMetric) {
201205
const name = `${cubeName}.${nameToMetric[0]}`;
202206
// Support both old 'drillMemberReferences' and new 'drillMembers' keys

0 commit comments

Comments
 (0)