[ https://issues.apache.org/jira/browse/NIFI-4517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613895#comment-16613895 ]
ASF GitHub Bot commented on NIFI-4517: -------------------------------------- Github user MikeThomsen commented on a diff in the pull request: https://github.com/apache/nifi/pull/2945#discussion_r216874550 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/sql/SqlWriter.java --- @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.processors.standard.sql; + +import org.apache.nifi.logging.ComponentLog; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processors.standard.AbstractQueryDatabaseTable; + +import java.io.IOException; +import java.io.OutputStream; +import java.sql.ResultSet; +import java.util.Collections; +import java.util.Map; + +public interface SqlWriter { --- End diff -- Should have JavaDocs. > Allow SQL results to be output as records in any supported format > ----------------------------------------------------------------- > > Key: NIFI-4517 > URL: https://issues.apache.org/jira/browse/NIFI-4517 > Project: Apache NiFi > Issue Type: New Feature > Components: Extensions > Reporter: Matt Burgess > Assignee: Matt Burgess > Priority: Major > > ExecuteSQL and QueryDatabaseTable currently only outputs Avro, and the schema > is only available as embedded within the flow file, not as an attribute such > as record-aware processors can handle. > ExecuteSQLÂ and QueryDatabaseTable processors should be updated with a > RecordSetWriter implementation. This will allow output using any writer > format (Avro, JSON, CSV, Free-form text, etc.), as well as all the other > features therein (such as writing the schema to an attribute, and will avoid > the need for a ConvertAvroToXYZ or ConvertRecord processor downstream. -- This message was sent by Atlassian JIRA (v7.6.3#76005)