{"record":{"id":"0272b26bc9dbdb45","repo":"prestodb/presto","slug":"generic-user-error-0272b2","errorCode":"GENERIC_USER_ERROR","errorMessage":"unknown data format '%s' used for column '%s'","messagePattern":"unknown data format '(.+?)' used for column '(.+?)'","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/JsonRowDecoderFactory.java","lineNumber":79,"sourceCode":"            requireNonNull(column);\n            checkArgument(!column.isInternal(), \"unexpected internal column '%s'\", column.getName());\n\n            String dataFormat = Optional.ofNullable(column.getDataFormat()).orElse(\"\");\n            switch (dataFormat) {\n                case \"custom-date-time\":\n                    return new CustomDateTimeJsonFieldDecoder(column);\n                case \"iso8601\":\n                    return new ISO8601JsonFieldDecoder(column);\n                case \"seconds-since-epoch\":\n                    return new SecondsSinceEpochJsonFieldDecoder(column);\n                case \"milliseconds-since-epoch\":\n                    return new MillisecondsSinceEpochJsonFieldDecoder(column);\n                case \"rfc2822\":\n                    return new RFC2822JsonFieldDecoder(column);\n                case \"\":\n                    return new DefaultJsonFieldDecoder(column);\n                default:\n                    throw new IllegalArgumentException(format(\"unknown data format '%s' used for column '%s'\", column.getDataFormat(), column.getName()));\n            }\n        }\n        catch (IllegalArgumentException e) {\n            throw new PrestoException(GENERIC_USER_ERROR, e);\n        }\n    }\n\n    public static JsonFieldDecoder throwUnsupportedColumnType(DecoderColumnHandle column)\n    {\n        if (column.getDataFormat() == null) {\n            throw new IllegalArgumentException(format(\"unsupported column type '%s' for column '%s'\", column.getType().getDisplayName(), column.getName()));\n        }\n        throw new IllegalArgumentException(format(\"unsupported column type '%s' for column '%s' with data format '%s'\", column.getType(), column.getName(), column.getDataFormat()));\n    }\n}\n","sourceCodeStart":61,"sourceCodeEnd":95,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/JsonRowDecoderFactory.java#L61-L95","documentation":"JsonRowDecoderFactory.chooseFieldDecoder switches on the column's declared dataFormat string (known values include e.g. 'rfc2822', 'milliseconds-since-epoch', and '' for default). An unrecognized dataFormat hits the default branch and throws IllegalArgumentException, which the factory converts to PrestoException GENERIC_USER_ERROR. It is a configuration error in the column mapping.","triggerScenarios":"A DecoderColumnHandle declares dataFormat set to a string not in the supported set (typo like 'iso-8601' instead of 'iso8601', or a format only supported by other connectors), while the column type itself is otherwise valid.","commonSituations":"Misspelled dataFormat in Kafka topic definition JSON; copying mappings between connectors with different format vocabularies; case sensitivity mistakes ('ISO8601' vs 'iso8601').","solutions":["Check the exact dataFormat string against the supported list for JsonRowDecoderFactory (e.g. iso8601, rfc2822, milliseconds-since-epoch, custom-date-time, '' for default)","Correct the typo/casing in the column mapping","Remove dataFormat (use default) if no special format is needed","Validate table definitions with the connector's supported format docs before deploying"],"exampleFix":"// before\n{\"name\":\"ts\",\"type\":\"timestamp\",\"dataFormat\":\"iso-8601\"}\n// after\n{\"name\":\"ts\",\"type\":\"timestamp\",\"dataFormat\":\"iso8601\"}","handlingStrategy":"validation","validationCode":"java.util.Set<String> allowed = java.util.Set.of(\"iso8601\",\"rfc2822\",\"custom-date-time\",\"milliseconds-since-epoch\",\"seconds-since-epoch\",\"iso8601-date-time\",\"custom\",\"milliseconds-since-epoch\",\"unix-time-seconds\",\"\"\"); boolean ok = allowed.contains(column.getDataFormat() == null ? \"\" : column.getDataFormat().toLowerCase());","typeGuard":null,"tryCatchPattern":"try { RowDecoder d = factory.create(columns); } catch (PrestoException e) { if (e.getErrorCode().getCode() == StandardErrorCode.GENERIC_USER_ERROR.getCode()) { failFastWithConfigDump(e.getMessage()); } else throw e; }","preventionTips":["Copy dataFormat strings verbatim from connector documentation","Use lowercase format names exactly as documented","Validate topic-definition JSON against the connector's schema before deployment","Fail fast in CI by constructing the decoder from definitions in tests"],"tags":["presto","decoder","configuration","dataformat"],"backgroundTag":"invalid-config-value","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}