无法在postgres db上使用python多维数据集执行DrillDown操作

时间:2014-01-30 06:05:42

标签: python postgresql olap-cube

我正在尝试在我的示例postgresql数据库上运行Python多维数据集OLAP服务器。

我只有一个名为purachse的表,它有4个字段。

购买

purchase_id | purchase_date |数量| unit_price | TOTAL_COST

我的model.json文件如下所示

{
"dimensions": [

    {"name":"purchase_id"},
    {"name":"purchase_date"}
],
"cubes": [
    {
        "name": "purachse",
        "dimensions": ["purchase_id","purchase_date"],
        "measures": [{"name":"quantity", "label":"quantity"},{"name":"total_cost","label":"total_cost"}],
        "aggregates": [
                {
                    "name": "quantity",
                    "function": "sum",
                    "measure": "quantity"
                },
                {
                    "name":"total_cost",
                    "function":"sum",
                    "measure":"total_cost"
                },
                {
                    "name": "record_count",
                    "function": "count"
                }

            ]
    }

]

}

并且能够在此服务器上执行聚合,剪切等所有操作。 但是当我尝试使用任何文件进行深入分析时,它显示内部服务器错误。 当我尝试使用sqlite使用相同的db时,它的工作效果非常好,包括下钻。 我无法弄清楚问题出在哪里。我是python cube和postgresql的新手 请帮助。

我还在这里附加了.ini文件。日志文件未生成,很难跟踪问题。

[server]
host: 0.0.0.0 
port: 5000
reload: yes
log_level: debug
log: /var/log/cubes.log
prettyprint: yes
backend: sql
[datastore]
type: sql
url: postgresql://postgres:postgres@localhost:5432/purchase

schema: purchase
debug: true

[models]
path: model_postgres.json

0 个答案:

没有答案