use of org.pentaho.di.trans.steps.sasinput.SasInputHelper in project pentaho-kettle by pentaho.
the class SasInputDialog method get.
public void get() {
try {
// As the user for a file to use as a reference
//
FileDialog dialog = new FileDialog(shell, SWT.OPEN);
dialog.setFilterExtensions(new String[] { "*.sas7bdat;*.SAS7BDAT", "*.*" });
dialog.setFilterNames(new String[] { BaseMessages.getString(PKG, "SASInputDialog.FileType.SAS7BAT") + ", " + BaseMessages.getString(PKG, "System.FileType.TextFiles"), BaseMessages.getString(PKG, "System.FileType.CSVFiles"), BaseMessages.getString(PKG, "System.FileType.TextFiles"), BaseMessages.getString(PKG, "System.FileType.AllFiles") });
if (dialog.open() != null) {
String filename = dialog.getFilterPath() + System.getProperty("file.separator") + dialog.getFileName();
SasInputHelper helper = new SasInputHelper(filename);
BaseStepDialog.getFieldsFromPrevious(helper.getRowMeta(), wFields, 1, new int[] { 1 }, new int[] { 3 }, 4, 5, null);
}
} catch (Exception e) {
new ErrorDialog(shell, "Error", "Error reading information from file", e);
}
}
Aggregations