Error during rewrite: 'CAST(Census.Time AS Date32)' expression can't be coerced to any members of following cubes:Census

I have Metabase connected to cubecloud. the preaggregation set in Cubecloud is
granulairity : day ,
partition granularity: month

When i create charts i am always able to have the time parameter set as an "Hour or month" but when i set the time parameter as a "day" or a "week" i get the following error:

Error during rewrite: 'CAST(Census.Time AS Date32)' expression can't be coerced to any members of following cubes:Census

or

ERROR: Error during rewrite: 'CAST(datetrunc(Utf8("week"),Census.Time + IntervalDayTime("4294967296")) AS Timestamp(Nanosecond, None)) + IntervalDayTime("-4294967296")' expression can't be coerced to any members of following cubes: Census.

How can i fix this?

FYI hour, date, week and month group by options work correctly on Cube Playground.

Hi @dvyach
Post "Diagnostic Info" from Admin > Troubleshooting, and how you're connecting to Cube.
I'm guessing there's some type incompatibility as Metabase doesn't have nanosecond support.
Have you looked at other issues in the Cube repo? https://github.com/cube-js/cube.js/issues

Yes i have checked the Cube bug list - i couldnt find anything relatedto the error im seeing.

Here is the infor from Diagnostic Info:

{
"browser-info": {
"language": "en-IN",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15",
"vendor": "Apple Computer, Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.16.1+1",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.16.1",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.16.1+1",
"os.name": "Linux",
"os.version": "5.15.0-1019-aws",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"postgres",
"h2"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "13.8 (Debian 13.8-1.pgdg110+1)"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.4.1"
}
},
"run-mode": "prod",
"version": {
"date": "2022-09-05",
"tag": "v0.45.0-SNAPSHOT",
"branch": "master",
"hash": "97fa561"
},
"settings": {
"report-timezone": null
}
}
}

@dvyach Okay, you're running an old custom build of master. I guess there's some problem with their Postgres compatibility layer they have added.

Thankyou! how do you recommend I fix this? is there a version that you suggest I try?

@dvyach I would recommend that you use an official release: https://github.com/metabase/metabase/releases/latest
But I cannot tell you if it is fixed, sounds like a problem with Cube, so open an issue in their repo.

Thanks! ill check this out