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

ASF GitHub Bot commented on STORM-699:
--------------------------------------

Github user Parth-Brahmbhatt commented on a diff in the pull request:

    https://github.com/apache/storm/pull/458#discussion_r26232904
  
    --- Diff: external/storm-jdbc/README.md ---
    @@ -13,14 +13,39 @@ public interface JdbcMapper  extends Serializable {
     }
     ```
     
    -The `getColumns()` method defines how a storm tuple maps to a list of 
columns representing a row in a database.
    +The `getColumns()` method defines how a storm tuple maps to a list of 
columns representing a row in a database. 
    +**The order of the returned list is important. The place holders in the 
supplied queries are resolved in the same order as returned list.**
    +For example if the user supplied insert query is `insert into table 
user(user_id, user_name, create_date) values (?,?, now())` the 1st item 
    --- End diff --
    
    I had an extra "table" in it, fixed.


> storm-jdbc should support customer insert queries.
> --------------------------------------------------
>
>                 Key: STORM-699
>                 URL: https://issues.apache.org/jira/browse/STORM-699
>             Project: Apache Storm
>          Issue Type: Improvement
>    Affects Versions: 0.10.0
>            Reporter: Parth Brahmbhatt
>            Assignee: Parth Brahmbhatt
>            Priority: Minor
>
> Currently storm-jdbc insert bolt/state only supports to specify a table name 
> and constructs a query of the form "insert into tablename values(?,?,?)" 
> based on table's schema. This fails to support use cases like "insert into as 
> select * from" or special cases like Phoenix that has a jdbc driver but only 
> supports "upsert into". 
> We should add a way so the users can specify their own custom query for the 
> insert bolt.  This was already pointed out by [~revans2] during the PR review 
> and we now have concrete cases that will be benefited by this feature.



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

Reply via email to