{"record":{"id":"2b85f06b5cbc42d5","repo":"cube-js/cube","slug":"oracle-can-not-work-with-table-names-longer-than-1","errorCode":null,"errorMessage":"Oracle can not work with table names longer than 128 symbols. Consider using the 'sqlAlias' attribute in your cube definition for ${quotedTableName}.","messagePattern":"Oracle can not work with table names longer than 128 symbols\\. Consider using the 'sqlAlias' attribute in your cube definition for (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cubejs-oracle-driver/driver/OracleDriver.js","lineNumber":187,"sourceCode":"   * @protected\n   */\n  async withConnection(fn) {\n    const connection = await this.pool.acquire();\n\n    try {\n      return await fn(connection);\n    } finally {\n      await this.pool.release(connection);\n    }\n  }\n\n  async testConnection() {\n    await this.query('SELECT 1 FROM DUAL', {});\n  }\n\n  async createTable(quotedTableName, columns) {\n    if (quotedTableName.length > 128) {\n      throw new Error('Oracle can not work with table names longer than 128 symbols. ' +\n        `Consider using the 'sqlAlias' attribute in your cube definition for ${quotedTableName}.`);\n    }\n\n    return super.createTable(quotedTableName, columns);\n  }\n\n  static normalizeParams(query, values) {\n    if (!values || values.length === 0) {\n      return { sql: query, binds: {} };\n    }\n\n    const binds = {};\n    const valueToName = new Map();\n    let idx = 0;\n    let nextName = 0;\n\n    // `:\"?\"` must be matched as a whole before a lone `?`, so it appears first\n    // in the alternation; since it starts with `:`, its inner `?` is consumed","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-oracle-driver/driver/OracleDriver.js#L169-L205","documentation":"Oracle restricts most identifiers to 128 bytes. OracleDriver.createTable validates the quoted table name length before delegating, and throws with guidance to use the cube's `sqlAlias` attribute when the generated rollup table name is too long.","triggerScenarios":"Uploading a pre-aggregation table through `createTable` where the generated quoted table name exceeds 128 characters.","commonSituations":"Very long cube or pre-aggregation names, multi-tenant prefixes, or long schema-qualified names pushing the identifier over Oracle's limit.","solutions":["Add `sqlAlias: 'short_name'` to the cube definition to control the generated table name.","Shorten the cube or pre-aggregation name in the data model.","Shorten the target schema or prefix used for rollup tables."],"exampleFix":"// before\ncube('EnterpriseFinancialReportingConsolidatedQuarterlyActualsCube', { /* ... */ });\n// after\ncube('EnterpriseFinancialReportingConsolidatedQuarterlyActualsCube', {\n  sqlAlias: 'fin_qtr',\n  /* ... */\n});","handlingStrategy":"validation","validationCode":"if (quotedTableName.length > 128) {\n  throw new Error(`Table name exceeds Oracle's 128-char limit: ${quotedTableName}. Add sqlAlias to the cube.`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await driver.createTable(name, columns);\n} catch (e) {\n  if (e.message.includes('longer than 128')) {\n    console.error('Add sqlAlias to the cube definition');\n  }\n  throw e;\n}","preventionTips":["Set sqlAlias for long cube names on Oracle deployments.","Keep generated rollup table names under 128 chars.","Account for schema-qualified name length in validation.","Test pre-aggregation uploads in staging with real naming."],"tags":["oracle","identifier-length","pre-aggregation","schema"],"backgroundTag":"identifier-too-long","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}