cube icon indicating copy to clipboard operation
cube copied to clipboard

Athena connection error if there're too many tables

Open Tonkonozhenko opened this issue 3 years ago • 5 comments

Describe the bug I tried to run poc with CubeJS and Athena:

Stacktrace on Playground (after 15 minutes):

TypeError: table.join is not a function
2022-08-23T14:23:28.368015200Z     at AthenaDriver.getColumns (/cube/node_modules/@cubejs-backend/athena-driver/src/AthenaDriver.ts:285:84)
2022-08-23T14:23:28.368034000Z     at /cube/node_modules/@cubejs-backend/athena-driver/src/AthenaDriver.ts:265:28
2022-08-23T14:23:28.368048700Z     at Array.map (<anonymous>)
2022-08-23T14:23:28.368064600Z     at AthenaDriver.viewsSchema (/cube/node_modules/@cubejs-backend/athena-driver/src/AthenaDriver.ts:265:10)
2022-08-23T14:23:28.368078200Z     at runMicrotasks (<anonymous>)
2022-08-23T14:23:28.368093900Z     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2022-08-23T14:23:28.368107000Z     at AthenaDriver.tablesSchema (/cube/node_modules/@cubejs-backend/athena-driver/src/AthenaDriver.ts:172:25)
2022-08-23T14:23:28.368120000Z     at /cube/node_modules/@cubejs-backend/server-core/src/core/DevServer.ts:115:28
2022-08-23T14:23:28.368131600Z     at /cube/node_modules/@cubejs-backend/server-core/src/core/DevServer.ts:78:9

To Reproduce Basic installation with next docker-compose

version: '2.2'

services:
  cube:
    image: cubejs/cube:latest
    ports:
      - 4000:4000
    environment:
      - CUBEJS_DEV_MODE=true
      - CUBEJS_DB_QUERY_TIMEOUT=30m
      - AWS_PROFILE=... # sso profile
      - CUBEJS_LOG_LEVEL=trace
    volumes:
      - .:/cube/conf
      - ~/.aws/:/root/.aws

Tonkonozhenko avatar Aug 23 '22 14:08 Tonkonozhenko

@Tonkonozhenko Do you think your token has expired? We definitely should handle this error better.

paveltiunov avatar Aug 28 '22 17:08 paveltiunov

@paveltiunov definitely no.

Tonkonozhenko avatar Aug 28 '22 17:08 Tonkonozhenko

I believe it's because we have too many tables

Tonkonozhenko avatar Aug 28 '22 17:08 Tonkonozhenko

@Tonkonozhenko Do you mean it was trying to fetch schema for 15 minutes and then failed with this error message?

paveltiunov avatar Aug 28 '22 17:08 paveltiunov

@paveltiunov exactly

Tonkonozhenko avatar Aug 28 '22 17:08 Tonkonozhenko

Experiencing the same issue. Queries seem to trigger through Cube & run successfully in Athena but Cube is somehow unable to fetch those results?

firewall413 avatar Nov 16 '22 11:11 firewall413

@Tonkonozhenko @firewall413 @paveltiunov - Were we able to resolve this? I am still getting this issue in 0.31.36

vbvasa avatar Jan 09 '23 11:01 vbvasa