Java Code Examples for org.pentaho.di.trans.Trans#getErrors()
The following examples show how to use
org.pentaho.di.trans.Trans#getErrors() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TransPreviewDelegate.java From pentaho-kettle with Apache License 2.0 | 6 votes |
@Override public void transFinished( Trans trans ) throws KettleException { // Copy over the data from the previewDelegate... // if ( trans.getErrors() != 0 ) { // capture logging and store it... // for ( StepMetaDataCombi combi : trans.getSteps() ) { if ( combi.copy == 0 ) { StringBuffer logBuffer = KettleLogStore.getAppender().getBuffer( combi.step.getLogChannel().getLogChannelId(), false ); previewLogMap.put( combi.stepMeta, logBuffer ); } } } }
Example 2
Source File: JPanelTransformation.java From nordpos with GNU General Public License v3.0 | 5 votes |
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed this.app.waitCursorBegin(); jPanelRows.setVisible(true); Trans t = runTransformationFromResource(getTransformation(), getTransVaribles()); // retrieve logging appender LoggingBuffer appender = KettleLogStore.getAppender(); // retrieve logging lines for job String logText = appender.getBuffer(t.getLogChannelId(), true).toString(); if (t.nrActiveSteps() == 0) { t.cleanup(); } if (t.isFinished()) { jMessage.setEnabled(true); int errors = t.getErrors(); if (errors > 0) { jMessage.setText(AppLocal.getIntString("label.TransformationError")); jMessage.setBackground(Color.RED); } else { jMessage.setText(AppLocal.getIntString("label.TransformationComplete")); jMessage.setBackground(Color.GREEN); } jLogArea.setText(logText); appender.clear(); appender.close(); } this.app.waitCursorEnd(); }
Example 3
Source File: AbstractKettleTransformationProducer.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 5 votes |
protected TableModel performQueryOnTransformation( final DataRow parameters, final int queryLimit, final DataFactoryContext context, final TransMeta transMeta ) throws EvaluationException, ParseException, KettleException, ReportDataFactoryException { TableProducer tableProducer = null; Trans trans = null; try { trans = prepareTransformation( parameters, context, transMeta ); final RowMetaInterface row = transMeta.getStepFields( getStepName() ); tableProducer = new TableProducer( row, queryLimit, isStopOnError() ); StepInterface targetStep = findTargetStep( trans ); targetStep.addRowListener( tableProducer ); currentlyRunningTransformation = trans; trans.startThreads(); trans.waitUntilFinished(); } finally { if ( null != trans ) { trans.cleanup(); } currentlyRunningTransformation = null; } if ( trans.getErrors() != 0 && isStopOnError() ) { throw new ReportDataFactoryException( String .format( "Transformation reported %d records with errors and stop-on-error is true. Aborting.", trans.getErrors() ) ); } return tableProducer.getTableModel(); }