function
cubejsTypesToDataStudioTypes
( cubejsField
) {
var
types
= {
number
: function
( cubejsField
) {
return
cubejsNumberType
( cubejsField
. format
);
},
count
: function
( cubejsField
) {
return
cubejsNumberType
( cubejsField
. format
);
},
countDistinct
: function
( cubejsField
) {
return
cubejsNumberType
( cubejsField
. format
);
},
countDistinctApprox
: function
( cubejsField
) {
return
cubejsNumberType
( cubejsField
. format
);
},
sum
: function
( cubejsField
) {
return
cubejsNumberType
( cubejsField
. format
);
},
avg
: function
( cubejsField
) {
return
cubejsNumberType
( cubejsField
. format
);
},
min
: function
( cubejsField
) {
return
cubejsNumberType
( cubejsField
. format
);
},
max
: function
( cubejsField
) {
return
cubejsNumberType
( cubejsField
. format
);
},
runningTotal
: function
( cubejsField
) {
return
cubejsNumberType
( cubejsField
. format
);
},
time:
function
(
cubejsField
) {
if (
cubejsField .title.includes("MONTH")) {
return "YEAR_MONTH";
} else if (
cubejsField .title.includes("WEEK")) {
return "YEAR_WEEK";
} else if (
cubejsField .title.includes("YEAR")) {
return "YEAR";
} else {
return "YEAR_MONTH_DAY";
}
},
string
: function
() {
return
"TEXT"
;
},
boolean
: function
() {
return
"BOOLEAN"
;
},
imageUrl
: function
() {
return
"URL"
;
},
link
: function
() {
return
"URL"
;
},
id
: function
() {
return
"TEXT"
;
},
geo
: function
() {
return
"LATITUDE_LONGITUDE"
;
},
};
return
types
[ cubejsField
. type
]( cubejsField
);
}
But when I test it I have NULL values on the graphic.
Is it possible to set Semantic type in some way?
I thank you all in advance.
Regards,
Larissa