use of org.pentaho.di.ui.spoon.dialog.GetSQLProgressDialog in project pentaho-kettle by pentaho.
the class SpoonDBDelegate method getTransSQL.
/**
* Get & show the SQL required to run the loaded transformation...
*/
public void getTransSQL(TransMeta transMeta) {
GetSQLProgressDialog pspd = new GetSQLProgressDialog(spoon.getShell(), transMeta);
List<SQLStatement> stats = pspd.open();
if (stats != null) {
if (stats.size() > 0) {
SQLStatementsDialog ssd = new SQLStatementsDialog(spoon.getShell(), Variables.getADefaultVariableSpace(), SWT.NONE, stats);
String sn = ssd.open();
if (sn != null) {
StepMeta esi = transMeta.findStep(sn);
if (esi != null) {
spoon.delegates.steps.editStep(transMeta, esi);
}
}
} else {
MessageBox mb = new MessageBox(spoon.getShell(), SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(BaseMessages.getString(PKG, "Spoon.Dialog.NoSQLNeedEexecuted.Message"));
// "SQL"
mb.setText(BaseMessages.getString(PKG, "Spoon.Dialog.NoSQLNeedEexecuted.Title"));
mb.open();
}
}
}
Aggregations