use of com.teradata.jaqy.exporter.PipeExporter in project jaqy by Teradata.
the class PipeImporterFactory method getHandler.
@Override
public PipeImporter getHandler(CommandLine cmdLine, JaqyInterpreter interpreter) throws Exception {
JaqyExporter exporter = interpreter.getExporter();
if (exporter == null)
interpreter.error("No current pipe export.");
else if (!(exporter instanceof PipeExporter))
interpreter.error("Current export is not a pipe export.");
JaqyResultSet rs = ((PipeExporter) exporter).getResultSet();
if (rs == null)
interpreter.error("Data has not been exported.");
interpreter.setExporter(null);
return new PipeImporter(rs, interpreter.getGlobals());
}
Aggregations