| Modifier and Type | Field and Description |
|---|---|
private Map<String,String> |
attributesToAdd |
private JdbcCommon.AvroConversionOptions |
options |
| Constructor and Description |
|---|
DefaultAvroSqlWriter(JdbcCommon.AvroConversionOptions options) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getAttributesToAdd()
Returns a map of attribute key/value pairs to be added to any outgoing flow file(s).
|
String |
getMimeType()
Returns the MIME type of the output format.
|
void |
writeEmptyResultSet(OutputStream outputStream,
ComponentLog logger)
Writes an empty result set to the output stream.
|
long |
writeResultSet(ResultSet resultSet,
OutputStream outputStream,
ComponentLog logger,
JdbcCommon.ResultSetRowCallback callback)
Writes the given result set out to the given output stream, possibly applying a callback as each row is processed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdateCountersprivate final JdbcCommon.AvroConversionOptions options
public DefaultAvroSqlWriter(JdbcCommon.AvroConversionOptions options)
public long writeResultSet(ResultSet resultSet, OutputStream outputStream, ComponentLog logger, JdbcCommon.ResultSetRowCallback callback) throws Exception
SqlWriterwriteResultSet in interface SqlWriterresultSet - the ResultSet to be writtenoutputStream - the OutputStream to write the result set tologger - a common logger that can be used to log messages during writecallback - a MaxValueResultSetRowCollector that may be called as each row in the ResultSet is processedException - if any errors occur during the writing of the result set to the output streampublic Map<String,String> getAttributesToAdd()
SqlWritergetAttributesToAdd in interface SqlWriterpublic void writeEmptyResultSet(OutputStream outputStream, ComponentLog logger) throws IOException
SqlWriterwriteEmptyResultSet in interface SqlWriteroutputStream - the OutputStream to write the empty result set tologger - a common logger that can be used to log messages during writeIOException - if any errors occur during the writing of an empty result set to the output streampublic String getMimeType()
SqlWritergetMimeType in interface SqlWriterCopyright © 2023 Apache NiFi Project. All rights reserved.