Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Data set for Table Input Step not working, issue #37
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcasters committed Jan 21, 2019
1 parent 8081341 commit 59616fe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -145,5 +145,5 @@
</dependencyManagement>

<groupId>pentaho-kettle-dataset</groupId>
<version>3.3.0-SNAPSHOT</version>
<version>3.4.0-SNAPSHOT</version>
</project>
10 changes: 9 additions & 1 deletion src/main/java/org/pentaho/di/dataset/spoon/DataSetHelper.java
Expand Up @@ -31,6 +31,7 @@
import org.pentaho.di.core.SourceToTargetMapping;
import org.pentaho.di.core.database.DatabaseMeta;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.exception.KettleStepException;
import org.pentaho.di.core.gui.SpoonFactory;
import org.pentaho.di.core.logging.LogChannel;
import org.pentaho.di.core.row.RowDataUtil;
Expand Down Expand Up @@ -474,7 +475,14 @@ public void setInputDataSet() {
// Now we need to map the fields from the input data set to the step...
//
RowMetaInterface setFields = dataSet.getSetRowMeta( false );
RowMetaInterface stepFields = transMeta.getStepFields( stepMeta );
RowMetaInterface stepFields;
try {
stepFields = transMeta.getStepFields( stepMeta );
} catch( KettleStepException e) {
// Driver or input problems...
//
stepFields = new RowMeta();
}
if ( stepFields.isEmpty() ) {
stepFields = setFields.clone();
}
Expand Down
Expand Up @@ -82,7 +82,12 @@ public void callExtensionPoint( LogChannelInterface log, Object object ) throws
List<DataSet> dataSets = hierarchy.getSetFactory().getElements();
Map<String, RowMetaInterface> stepFieldsMap = new HashMap<>();
for ( StepMeta stepMeta : transMeta.getSteps() ) {
stepFieldsMap.put(stepMeta.getName(), transMeta.getStepFields( stepMeta ));
try {
RowMetaInterface stepFields = transMeta.getStepFields( stepMeta );
stepFieldsMap.put( stepMeta.getName(), stepFields );
} catch(Exception e) {
// Ignore GUI errors...
}
}

// Find the location that was double clicked on...
Expand Down

0 comments on commit 59616fe

Please sign in to comment.