use of org.pentaho.di.trans.steps.textfileinput.TextFileInputField in project pentaho-kettle by pentaho.
the class CsvInputUnitTestBase method createField.
TextFileInputField createField(String name) {
TextFileInputField field = new TextFileInputField();
field.setName(name);
field.setType(ValueMetaInterface.TYPE_STRING);
return field;
}
use of org.pentaho.di.trans.steps.textfileinput.TextFileInputField in project pentaho-kettle by pentaho.
the class CsvInputBase method createCsvInputStep.
public StepMeta createCsvInputStep(TransMeta transMeta, PluginRegistry registry, String enclosure, boolean headerPresent) {
//
// Create a Csv Input step
//
String csvInputName = "csv input step";
CsvInputMeta cim = new CsvInputMeta();
String csvInputPid = registry.getPluginId(StepPluginType.class, cim);
StepMeta csvInputStep = new StepMeta(csvInputPid, csvInputName, cim);
transMeta.addStep(csvInputStep);
TextFileInputField[] fields = createTextFileInputFields();
cim.setIncludingFilename(true);
cim.setFilename("");
cim.setFilenameField("filename");
cim.setDelimiter(";");
cim.setEnclosure(enclosure);
cim.setBufferSize("50000");
cim.setLazyConversionActive(false);
cim.setHeaderPresent(headerPresent);
cim.setAddResultFile(false);
cim.setIncludingFilename(true);
cim.setRowNumField("");
cim.setRunningInParallel(false);
cim.setInputFields(fields);
return csvInputStep;
}
Aggregations