Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1937#discussion_r124735002
  
    --- Diff: 
nifi-nar-bundles/nifi-cassandra-bundle/nifi-cassandra-processors/src/main/java/org/apache/nifi/processors/cassandra/QueryCassandra.java
 ---
    @@ -485,6 +668,68 @@ public static long convertToJsonStream(final ResultSet 
rs, final OutputStream ou
             }
         }
     
    +    /**
    +     * Converts a result set into an CSV record and writes it to the given 
stream using the specified character set.
    +     *
    +     * @param rs        The result set to convert
    +     * @param outStream The stream to which the CSV record will be written
    +     * @param timeout   The max number of timeUnits to wait for a result 
set fetch to complete
    +     * @param timeUnit  The unit of time (SECONDS, e.g.) associated with 
the timeout amount
    +     * @return The number of rows from the result set written to the stream
    +     * @throws IOException          If the CSV record cannot be written
    +     * @throws InterruptedException If a result set fetch is interrupted
    +     * @throws TimeoutException     If a result set fetch has taken longer 
than the specified timeout
    +     * @throws ExecutionException   If any error occurs during the result 
set fetch
    +     */
    +    public static long convertToCsvStream(final ResultSet rs, final 
OutputStream outStream, Charset charset,
    --- End diff --
    
    Should we write a header line with the name of the columns? Or add a 
boolean in the processor properties to define if the header should be included 
or not in the generated flow file?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to