[ 
https://issues.apache.org/jira/browse/NIFI-3031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15670599#comment-15670599
 ] 

ASF GitHub Bot commented on NIFI-3031:
--------------------------------------

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

    https://github.com/apache/nifi/pull/1217#discussion_r87859233
  
    --- Diff: 
nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/processors/hive/SelectHiveQL.java
 ---
    @@ -90,11 +98,59 @@
                 .name("hive-query")
                 .displayName("HiveQL Select Query")
                 .description("HiveQL SELECT query to execute")
    +            .required(false)
    +            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
    +            .expressionLanguageSupported(true)
    +            .build();
    +
    +    public static final PropertyDescriptor HIVEQL_CSV_HEADER = new 
PropertyDescriptor.Builder()
    +            .name("csv-header")
    +            .displayName("CSV Header")
    +            .description("Include Header in Output")
    +            .required(true)
    +            .allowableValues("true", "false")
    +            .defaultValue("true")
    +            .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
    +            .build();
    +
    +    public static final PropertyDescriptor HIVEQL_CSV_ALT_HEADER = new 
PropertyDescriptor.Builder()
    +            .name("csv-alt-header")
    +            .displayName("Alternate CSV Header")
    +            .description("Comma separated list of header fields")
    --- End diff --
    
    Can you expand on the description here? Maybe mention that this header will 
be used as the header line of the CSV, and if it is not specified, the header 
line (if included) will consist of the column names as returned by the driver, 
or something like that


> Support Multi-Statement Scripts in the PutHiveQL Processor
> ----------------------------------------------------------
>
>                 Key: NIFI-3031
>                 URL: https://issues.apache.org/jira/browse/NIFI-3031
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Matt Burgess
>
> Trying to use the PutHiveQL processor to execute a HiveQL script that 
> contains multiple statements.
> IE: 
> USE my_database;
> FROM my_database_src.base_table
> INSERT OVERWRITE refined_table
> SELECT *;
> -- or --
> use my_database;
> create temporary table WORKING as
> select a,b,c from RAW;
> FROM RAW
> INSERT OVERWRITE refined_table
> SELECT *;
> The current implementation doesn't even like it when you have a semicolon at 
> the end of the single statement.
> Either use a default delimiter like a semi-colon to mark the boundaries of a 
> statement within the file or allow them to define there own.
> This enables the building of pipelines that are testable by not embedding 
> HiveQL into a product; rather sourcing them from files.  And the scripts can 
> be complex.  Each statement should run in a linear manner and be part of the 
> same JDBC session to ensure things like "temporary" tables will work.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to