{"record":{"id":"b7745632f418280c","repo":"pentaho/pentaho-kettle","slug":"unhandled-data-type-valuemetaname","errorCode":null,"errorMessage":"Unhandled data type '{valueMetaName}'","messagePattern":"Unhandled data type '(.+?)'","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/sasinput/SasInput.java","lineNumber":200,"sourceCode":"          // Only pick those fields that we're interested in.\n          //\n          int outputIndex = getInputRowMeta().size();\n          for ( int i = 0; i < data.fieldIndexes.size(); i++ ) {\n            int fieldIndex = data.fieldIndexes.get( i );\n            int type = data.fileLayout.getValueMeta( fieldIndex ).getType();\n            switch ( type ) {\n              case ValueMetaInterface.TYPE_STRING:\n                row[outputIndex++] = rowData[fieldIndex];\n                break;\n              case ValueMetaInterface.TYPE_NUMBER:\n                Double value = (Double) rowData[fieldIndex];\n                if ( value.equals( Double.NaN ) ) {\n                  value = null;\n                }\n                row[outputIndex++] = value;\n                break;\n              default:\n                throw new RuntimeException( \"Unhandled data type '\" + ValueMetaFactory.getValueMetaName( type ) );\n            }\n          }\n\n          // Convert the data type of the new data to the requested data types\n          //\n          convertData( data.fileLayout, row, data.outputRowMeta );\n\n          // Pass along the row to further steps...\n          //\n          putRow( data.outputRowMeta, row );\n\n          // System.out.println(rowNumber+\" ---- passed row : \"+Arrays.toString(rowData));\n\n          return !isStopped();\n        } catch ( Exception e ) {\n          throw new RuntimeException( \"There was an error reading from SAS7BAT file '\" + filename + \"'\", e );\n        }\n      }","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/sasinput/SasInput.java#L182-L218","documentation":"Inside the row-reading callback, the switch over the SAS column type falls through to default for any type the step does not explicitly handle, throwing a RuntimeException naming the unhandled value meta type. Only the types coded in the switch (character, numeric, etc.) are supported.","triggerScenarios":"A SAS file contains a column whose mapped type (from SasInputHelper) is not covered by the switch statement in row() — e.g. an unexpected or extended SAS data type mapped to an unsupported Kettle type.","commonSituations":"Reading SAS files produced by tools or SAS versions emitting column types the step does not map; unusual column kinds (dates stored as exotic types, binary columns) in the file.","solutions":["Inspect the file's column types and re-export the offending column as a supported type (character or numeric).","Exclude the unsupported column from the file or from the selected output fields.","Patch the step's switch to map the type to an appropriate Kettle ValueMeta type."],"exampleFix":"// before: default: throw new RuntimeException(\"Unhandled data type '\" + ValueMetaFactory.getValueMetaName(type));\n// after: case TYPE_DATE: row[outputIndex++] = value; break;\n//        default: throw new RuntimeException(...);","handlingStrategy":"try-catch","validationCode":"// Only feed files whose columns map to supported types (CHARACTER/NUMERIC)\nfor (SasField col : sasColumns(file)) {\n  if (col.getType() != SasType.CHARACTER && col.getType() != SasType.NUMERIC)\n    throw new IllegalArgumentException(\"Unsupported SAS column type \" + col.getType() + \" on \" + col.getName());\n}","typeGuard":null,"tryCatchPattern":"try {\n  // execute transformation\n} catch (RuntimeException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"Unhandled data type\")) {\n    // exclude/re-type the offending column and re-export the SAS file\n  }\n  throw e;\n}","preventionTips":["Pre-audit SAS file column types before ingestion.","Convert exotic column types (dates, binary) to character/numeric at export.","Keep the Kettle/SAS input plugin updated so newly supported types are covered."],"tags":["sas","unsupported-type","switch","etl"],"backgroundTag":"unsupported-enum-value","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}