Skip to content

can't run pre-aggregation #9433

@oldoldman

Description

@oldoldman

Hi guys,
I'm trying cube.js with following configurations

package.json

{
  "name": "myapp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "dev": "node --env-file=node.env index.js"
  },
  "template": "express",
  "templateVersion": "1.2.18",
  "dependencies": {
    "@cubejs-backend/cubestore": "^1.2.30",
    "@cubejs-backend/mysql-driver": "^1.2.30",
    "@cubejs-backend/oracle-driver": "^1.2.30",
    "@cubejs-backend/postgres-driver": "^1.2.30",
    "@cubejs-backend/server": "^1.2.30"
  }
}

index.js

const CubejsServer = require('@cubejs-backend/server')

const opt = {
  apiSecret:'secret',
  externalDbType: 'cubestore',
}
const cubeserver = new CubejsServer(opt)

cubeserver.listen().then(({version,port,app,server}) => {
  console.log(`Cube server ${version} is listening on ${port}`)
}).catch(e => {
  console.error('Fatal error during server start: ')
  console.error(e.stack || e)
})

node.env

PORT=7000
CUBEJS_WEB_SOCKETS=true

CUBEJS_DB_TYPE=cubestore
CUBEJS_EXT_DB_TYPE=cubestore
CUBEJS_EXT_DB_HOST=127.0.0.1

CUBEJS_DATASOURCES=ne,default

CUBEJS_DS_NE_DB_TYPE=mysql
CUBEJS_DS_NE_DB_HOST=localhost
CUBEJS_DS_NE_DB_PORT=3307
CUBEJS_DS_NE_DB_USER=sales
CUBEJS_DS_NE_DB_PASS=sales
CUBEJS_DS_NE_DB_NAME=sales

CUBEJS_DS_DEFAULT_DB_TYPE=mysql
CUBEJS_DS_DEFAULT_DB_HOST=localhost
CUBEJS_DS_DEFAULT_DB_PORT=3307
CUBEJS_DS_DEFAULT_DB_USER=sales
CUBEJS_DS_DEFAULT_DB_PASS=sales
CUBEJS_DS_DEFAULT_DB_NAME=sales

cubed.bat

@ECHO OFF
SET CUBESTORE_REMOTE_DIR=remote
SET CUBESTORE_LOG_LEVEL=debug
cubestored

  1. start the frontend server
    npm run dev
  2. start the cubestored server
    cubed.bat
  3. add a cube
cube('users', {
  sql_table: 'users',
  data_source: 'ne',
 
  measures: {
    count: {
      sql: 'id',
      type: 'count',
    },
  },
 
  dimensions: {
    city: {
      sql: 'city',
      type: 'string',
    },
  },
  pre_aggregations: {
    test : {
      type: 'rollup',
      measures: [CUBE.count]
    }
  }
});
  1. got error in the console of frontend server console
Error: Error during upload of dev_pre_aggregations.users_test_pdtibkdy_1etuxvth_1jv7abu-0.csv.gz create table: CREATE TABLE dev_pre_aggregations.users_test_pdtibkdy_1etuxvth_1jv7abu (`users__count` int): Internal: File temp-uploads/dev_pre_aggregations.users_test_pdtibkdy_1etuxvth_1jv7abu-0.csv.gz can't be listed after upload. Either there's Cube Store cluster misconfiguration, or storage can't provide the required consistency.

any suggestion? many thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThe issue is a question. Please use Stack Overflow for questions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions