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

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

GitHub user dstreev opened a pull request:

    https://github.com/apache/nifi/pull/1217

    NIFI-3031 - Multi-Statement Script support for PutHiveQL Processor

    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dstreev/nifi-1 NIFI-3031

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/1217.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1217
    
----
commit 22528f8f58e9afe8a0dfba6c8c43fdf09fe3b324
Author: David W. Streever <da...@streever.com>
Date:   2016-11-04T15:03:17Z

    PutHiveQL and SelectHiveQL Processor enhancements. Added support for 
multiple statements in a script.  Options for delimiters, quotes, escaping, 
include header and alternate header.
    
    Add support in SelectHiveQL to get script content from the Flow File to 
bring consistency with patterns used for PutHiveQL and support extra query 
management.

commit 482401349d8113f16ccb3bd21cd66a43be9f6e4d
Author: David W. Streever <da...@streever.com>
Date:   2016-11-05T01:07:44Z

    Changed behavior of using Flowfile to match ExecuteSQL.  Handle query 
delimiter when embedded.  Added test case for embedded delimiter

commit 6b3df26b0c83a9a5611728bd4e2b0dd0061d58ff
Author: David W. Streever <da...@streever.com>
Date:   2016-11-05T01:33:20Z

    Formatting and License Header

commit 0c7bb50d3156c1b709bf2359d9865a8f922b99ce
Author: David W. Streever <da...@streever.com>
Date:   2016-11-04T15:03:17Z

    PutHiveQL and SelectHiveQL Processor enhancements. Added support for 
multiple statements in a script.  Options for delimiters, quotes, escaping, 
include header and alternate header.
    
    Add support in SelectHiveQL to get script content from the Flow File to 
bring consistency with patterns used for PutHiveQL and support extra query 
management.

commit 695cadfdb3eec67cc302306fe919572cb7f71afb
Author: David W. Streever <da...@streever.com>
Date:   2016-11-05T01:07:44Z

    Changed behavior of using Flowfile to match ExecuteSQL.  Handle query 
delimiter when embedded.  Added test case for embedded delimiter

commit 6ad1e4536467769055678629f305fd95d1eaf7ff
Author: David W. Streever <da...@streever.com>
Date:   2016-11-05T01:33:20Z

    Formatting and License Header

commit 2e6e0b38d7ac0789f8f61671db205456a13c2189
Author: David W. Streever <da...@streever.com>
Date:   2016-11-14T14:38:00Z

    NIFI-3031
    
    Merge branch 'master' of github.com:apache/nifi into dws_hive_opt
    
    * 'master' of github.com:apache/nifi: (36 commits)
      NIFI-2851: Fixed CheckStyle error.
      NIFI-2851: Added additional unit test to ensure correctness of 
demarcation when demarcator falls between buffered data
      NIFI-2851 initial commit of perf improvements on SplitText
      NIFI-2999: When Cluster Coordinator changes, purge any old heartbeats so 
that we don't disconnect a node due to very old heartbeats
      NIFI-2818 This closes #1059. aligned read method with read/write method
      NIFI-2818 - Minimise fs permission required by  NiFi
      [NIFI-2898] restore ellipsis for processor type, controller servies type, 
and reporting task type descriptions. This closes #1191
      This closes #1209.
      NIFI-3027: ExecuteProcess supports the expression language
      NIFI-2957 ZooKeeper Migration Toolkit
      NIFI-2912 Allow custom text in GenerateFlowFile
      NIFI-3002: - Removing legacy code when retrieving site to site details 
when the target instance is this local NiFi. - Ensures the UI accurately 
reflects available remote ports. NIFI-2603: - Fixing color of remote output 
port status in connection label.
      [NIFI-3021] remove white-space:no-wrap on view configuration properties 
tables textareas
      NIFI-3009: - Fixing NaN error when backpressure is not configured. This 
closes #1200
      [NIFI-3012] update regex for the summary tables input, output, 
transferred, received, and sent column parse function. This closes #1197
      NIFI-2991 This closes #1194. Exclude org.json dependency from Hive bundle
      NIFI-3013 GetSNMP fix stop and start null pointer exception
      NIFI-2823 - Adding nifiDnPrefix, nifiDnSuffix options to standalone 
tls-toolkit
      NIFI-2850 This closes #1115. Added a migrate() method to ProcessSession 
and refactored BinFiles and MergeContent to use it
      NIFI-3008 Enabled expression language on BASE_DIRECTORY and FILENAME 
properties in TailFile
      ...

----


> 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