So i am trying to implement some BI with Python Cubes Framework and i am running into some problems.
Basically i am trying to do a "simple" PointCut/slice and dice and i am not having any luck with it. I am using a PostgreSQL database with PostGis.
My model.json
is:
{
"dimensions": [
{"name": "user", "attributes": ["id", "username"]},
{"name": "resources", "attributes": ["id", "resource_simple_name"]},
{"name":"created_on", "role": "time"}
],
"cubes": [
{
"name": "users_resources_likes",
"dimensions": ["user", "resources", "created_on"],
"mappings": {
"user.id": "auth_user.id",
"user.username": "auth_user.username",
"resources.id": "resources.id",
"resources.resource_simple_name": "resources.resource_simple_name",
"created_on": "created_on"
},
"joins": [
{
"master": "user_id",
"detail": "auth_user.id"
},
{
"master": "resource_id",
"detail": "resources.id"
}
]
}
]
}
if i try do a poincut with date on slicer
aggregate?drilldown=created_on&cut=created_on:2012
i get a DataError: (DataError) invalid input syntax for type timestamp with time zone: "2012"
After searching a while i read that it could be because my postgresql database has a timestamp:
created_on timestamp with time zone NOT NULL DEFAULT '2014-02-10 00:00:00+00'::timestamp with time zone,
SO i tried to do:
?drilldown=created_on&cut=created_on:2012-09-15T09:37:59+00:00
and i get a :
{
error: "unknown_user_error",
message: "Wrong dimension cut string: 'created_on:2012-09-15T09:37:59 00:00'"
}
What am i doing wrong? is the problem in my model.json
?