Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

external pre_aggregations with cubestore ER_INTERNAL_ERROR: Custom type 'int8' is not supported #1796

Closed
rongfengliang opened this issue Jan 18, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@rongfengliang
Copy link
Contributor

rongfengliang commented Jan 18, 2021

env


version: '3'
services:
  pg: 
    image: postgres:12
    environment:
      - "POSTGRES_PASSWORD=dalong"
    ports:
    - "5432:5432"
  redis:
    image: redis
    ports:
    - "6379:6379"
  cubestorage:
    image:  cubejs/cubestore:build-100
    ports:
    - "3306:3306"
    

cube.js

// Cube.js configuration options: https://cube.dev/docs/config
const PostgresDriver = require("@cubejs-backend/postgres-driver");
const CubeStoreDriver = require("@cubejs-backend/cubestore-driver")
module.exports = {
    devServer: true,
    dbType: ({ dataSource } = {}) => {
        return 'postgres';
    },
    telemetry: false,
    apiSecret: "b2db7688e328d316d85e924d8b9a0737d87162a9f2cf36325f1ca0ae08dbdaa990520750847226cf8dcbb1fb4c07afe1087c7cb03b8f9f05b9abad3eb4058f3f",
    driverFactory: ({ dataSource } = {}) => {
        return new PostgresDriver({
            user: "postgres",
            database: "postgres",
            password: "dalong",
            port: 5432,
            host: "127.0.0.1",
            readOnly: true  // this is the cause with readOnly 
        });
    },
    externalDbType: 'cubestore',
    externalDriverFactory: () => new CubeStoreDriver({
        host: '127.0.0.1',
        port: 3306
    })
};

one schema

cube(`Demoapp`, {
  sql: `SELECT * FROM public.demoapp`,
  
  joins: {
    
  },
  preAggregations: {
    mydemo: {
      type: `rollup`,
      measureReferences: [Demoapp.count],
      dimensionReferences: [name],
      external: true
    }
  },
  measures: {
    count: {
      type: `count`,
      drillMembers: [name, id]
    }
  },
  
  dimensions: {
    name: {
      sql: `name`,
      type: `string`
    },
    
    id: {
      sql: `id`,
      type: `number`,
      primaryKey: true
    }
  }
});

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants