{"record":{"id":"149a32ea990294c7","repo":"cube-js/cube","slug":"unsupported-mapping-for-data-type-typeid","errorCode":null,"errorMessage":"Unsupported mapping for data type: ${typeId}","messagePattern":"Unsupported mapping for data type: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cubejs-mongobi-driver/src/MySQLType.ts","lineNumber":62,"sourceCode":"  [MySQLType.TIMESTAMP]: 'timestamp',\n  [MySQLType.DATETIME]: 'datetime',\n  [MySQLType.TIME]: 'time',\n  [MySQLType.TINY_BLOB]: 'tinytext',\n  [MySQLType.MEDIUM_BLOB]: 'mediumtext',\n  [MySQLType.LONG_BLOB]: 'longtext',\n  [MySQLType.BLOB]: 'text',\n  [MySQLType.VAR_STRING]: 'varchar',\n  [MySQLType.STRING]: 'binary',\n  [MySQLType.FLOAT]: 'float',\n  [MySQLType.DOUBLE]: 'double',\n};\n\nexport function getNativeTypeName(typeId: MySQLType) {\n  if (typeId in MySqlNativeToMySqlType) {\n    return MySqlNativeToMySqlType[typeId];\n  }\n\n  throw new Error(\n    `Unsupported mapping for data type: ${typeId}`\n  );\n}\n","sourceCodeStart":44,"sourceCodeEnd":66,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-mongobi-driver/src/MySQLType.ts#L44-L66","documentation":"getNativeTypeName maps MySQL wire-protocol type IDs to Cube's native type strings via the MySqlNativeToMySqlType table; it throws when a column's typeId has no entry — i.e. streaming results (downloadQueryResults/stream) encountered a MySQL data type the driver does not know how to translate, commonly an unlisted geometry/JSON/binary variant or a new type from a server version. The input at fault is an unmapped numeric typeId.","triggerScenarios":"Thrown at packages/cubejs-mongobi-driver/src/MySQLType.ts:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Extend MySqlNativeToMySqlType in MySQLType.ts with a mapping entry for the reported MySQL wire-protocol type id","If the type is genuinely unsupported by the BI connector, cast/convert the column in the schema (e.g. to string) so the raw type never reaches getNativeTypeName","Upgrade the mongobi driver package — newer releases may include additional type mappings"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}