{"record":{"id":"e25e7901bfeae64f","repo":"pentaho/pentaho-kettle","slug":"all-fields-must-have-an-output-type-to-do-the-preview","errorCode":null,"errorMessage":"All fields must have an output type to do the preview","messagePattern":"All fields must have an output type to do the preview","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/palo/core/src/main/java/org/pentaho/di/ui/trans/steps/palo/cellinput/PaloCellInputDialog.java","lineNumber":513,"sourceCode":"      fields.add( field );\n    }\n    myMeta.setDatabaseMeta( transMeta.findDatabase( addConnectionLine.getText() ) );\n    myMeta.setCubeMeasureName( new DimensionField( \"Measure\", textMeasureName.getText(), comboMeasureType.getText() ) );\n    myMeta.setLevels( fields );\n    myMeta.setCube( comboCube.getText() );\n    myMeta.setChanged( true );\n  }\n\n  private void preview() {\n    PaloCellInputMeta oneMeta = new PaloCellInputMeta();\n    try {\n      getInfo( oneMeta );\n      if ( oneMeta.getFields() == null || oneMeta.getFields().size() == 0 ) {\n        throw new KettleException( \"Fields must be defined to do a preview\" );\n      } else {\n        for ( DimensionField field : oneMeta.getFields() ) {\n          if ( Utils.isEmpty( field.getFieldType() ) ) {\n            throw new KettleException( \"All fields must have an output type to do the preview\" );\n          }\n        }\n      }\n    } catch ( KettleException e ) {\n      new ErrorDialog( shell, BaseMessages.getString( PKG, \"RowGeneratorDialog.Illegal.Dialog.Settings.Title\" ),\n        BaseMessages.getString( PKG, \"RowGeneratorDialog.Illegal.Dialog.Settings.Message\" ), e );\n      return;\n    }\n\n    TransMeta previewMeta =\n      TransPreviewFactory.generatePreviewTransformation( transMeta, oneMeta, textStepName.getText() );\n\n    EnterNumberDialog numberDialog =\n      new EnterNumberDialog( shell, 500, BaseMessages.getString( PKG, \"System.Dialog.EnterPreviewSize.Title\" ),\n        BaseMessages.getString( PKG, \"System.Dialog.EnterPreviewSize.Message\" ) );\n    int previewSize = numberDialog.open();\n    if ( previewSize > 0 ) {\n      TransPreviewProgressDialog progressDialog =","sourceCodeStart":495,"sourceCodeEnd":531,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/palo/core/src/main/java/org/pentaho/di/ui/trans/steps/palo/cellinput/PaloCellInputDialog.java#L495-L531","documentation":"PaloCellInputDialog validates metadata before previewing Palo cell input data. In preview mode it calls getInfo(oneMeta) and then requires that the step has fields defined and, additionally, that every DimensionField has a non-empty fieldType (the output type, e.g. String/Number). If any field's output type is empty, the dialog refuses to build the preview data and throws this KettleException, which is shown in an ErrorDialog.","triggerScenarios":"Clicking the Preview button in the Palo Cell Input dialog (widgetSelected -> preview) when the field table contains rows whose 'Type'/'output type' column was never set, or was cleared.","commonSituations":"User typed dimension/field names into the table but left the output type cell blank; a saved transformation from an older plugin version has fields without type information; copy-pasted metadata where only names were populated.","solutions":["Open the Palo Cell Input dialog and set the output type for every field in the table.","Delete rows for fields you do not actually need — every row must have a type.","Re-open and re-save old transformations so metadata is upgraded to include field types before previewing.","If the type dropdown appears empty, check that the Palo plugin jar is the correct version on the classpath."],"exampleFix":"// before\nDimensionField field = new DimensionField(\"Profit\"); // fieldType left empty\nfields.add(field);\n// after\nDimensionField field = new DimensionField(\"Profit\", \"String\"); // explicit output type\nfields.add(field);","handlingStrategy":"validation","validationCode":"boolean ready = meta.getFields() != null && !meta.getFields().isEmpty()\n    && meta.getFields().stream().allMatch(f -> f.getFieldType() != null && !f.getFieldType().trim().isEmpty());\nif (!ready) { /* fill in field types before previewing */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set the output type column immediately after adding a field row.","Validate metadata before invoking preview programmatically.","Re-save old transformations to upgrade field metadata."],"tags":["palo","kettle","preview","field-type","dialog-validation"],"backgroundTag":"empty-required-field","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"}