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

Problem is within mssql drive for long query getting the error like Error: Connection lost - read ECONNRESET #393

Closed
iamgkstack opened this issue Feb 16, 2020 · 2 comments
Labels
bug Something isn't working help wanted Community contributions are welcome.

Comments

@iamgkstack
Copy link

Problem is within mssql drive for long query

In CubeJs Schema I have below dimension:-

hour: {
      sql: `DATEPART(HOUR, ${createdTime})`,
      type: `number`
},
timeSlot: {
      type: `string`,
      case: {
        when: [
          { sql: `${hour} = 0`, label: `12 am - 1 am` },
          { sql: `${hour} = 1`, label: `1 am - 2 am` },
          { sql: `${hour} = 2`, label: `2 am - 3 am` },
          { sql: `${hour} = 3`, label: `3 am - 4 am` },
          { sql: `${hour} = 4`, label: `4 am - 5 am` },
          { sql: `${hour} = 5`, label: `5 am - 6 am` },
          { sql: `${hour} = 6`, label: `6 am - 7 am` },
          { sql: `${hour} = 7`, label: `7 am - 8 am` },
          { sql: `${hour} = 8`, label: `8 am - 9 am` },
          { sql: `${hour} = 9`, label: `9 am - 10 am` },
          { sql: `${hour} = 10`, label: `10 am - 11 am` },
          { sql: `${hour} = 11`, label: `11 am - 12 pm` },
          { sql: `${hour} = 12`, label: `12 pm - 1 pm` },
          { sql: `${hour} = 13`, label: `1 pm - 2 pm` },
          { sql: `${hour} = 14`, label: `2 pm - 3 pm` },
          { sql: `${hour} = 15`, label: `3 pm - 4 pm` },
          { sql: `${hour} = 16`, label: `4 pm - 5 pm` },
          { sql: `${hour} = 17`, label: `5 pm - 6 pm` },
          { sql: `${hour} = 18`, label: `6 pm - 7 pm` },
          { sql: `${hour} = 19`, label: `7 pm - 8 pm` },
          { sql: `${hour} = 20`, label: `8 pm - 9 pm` },
          { sql: `${hour} = 21`, label: `9 pm - 10 pm` },
          { sql: `${hour} = 22`, label: `10 pm - 11 pm` },
          { sql: `${hour} = 23`, label: `11 pm - 12 am` },
        ]
      }
}

When I query for timeSlot dimension I am getting the below error:-

Error: Connection lost - read ECONNRESET

But when I remove the below part form timeSlot dimension it's working perfectly

{ sql: `${hour} = 17`, label: `5 pm - 6 pm` },
{ sql: `${hour} = 18`, label: `6 pm - 7 pm` },
{ sql: `${hour} = 19`, label: `7 pm - 8 pm` },
 { sql: `${hour} = 20`, label: `8 pm - 9 pm` },
 { sql: `${hour} = 21`, label: `9 pm - 10 pm` },
 { sql: `${hour} = 22`, label: `10 pm - 11 pm` },
 { sql: `${hour} = 23`, label: `11 pm - 12 am` },

The query for the timeSlot below:-

{
  "dimensions": [
    "TicketPropertyMaster.timeSlot1"
  ]
}
@paveltiunov
Copy link
Member

@iamgkstack Hey Gaurav! I believe it's associated with this one: tediousjs/tedious#923. Need to update node-mssql inside Cube.js mssql driver.

@paveltiunov paveltiunov added help wanted Community contributions are welcome. bug Something isn't working labels Feb 17, 2020
@iamgkstack
Copy link
Author

@iamgkstack Hey Gaurav! I believe it's associated with this one: tediousjs/tedious#923. Need to update node-mssql inside Cube.js mssql driver.

Hey, @paveltiunov we have discussed regarding this issues on the cubeJs slack channel, where you have mentioned that raise the issue on GitHub.

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

No branches or pull requests

2 participants