[
https://issues.apache.org/jira/browse/STORM-616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14325873#comment-14325873
]
ASF GitHub Bot commented on STORM-616:
--------------------------------------
Github user Crystark commented on the pull request:
https://github.com/apache/storm/pull/374#issuecomment-74867621
This would indeed be nice but after trying it out it seems that if a batch
has more than one tuple to insert, then only the last tuple is inserted.
In
[JdbcClient#insert](https://github.com/Parth-Brahmbhatt/incubator-storm/blob/STORM-616/external/storm-jdbc/src/main/java/org/apache/storm/jdbc/common/JdbcClient.java#L48)
we can see that there's only one set of `VALUES` (line 61-64) but then it
loops on all the columns and each one overrides the previous values that were
set as SQL parameters leading to only the last one beeing used.
> add storm-jdbc to list of external connectors.
> ----------------------------------------------
>
> Key: STORM-616
> URL: https://issues.apache.org/jira/browse/STORM-616
> Project: Apache Storm
> Issue Type: New JIRA Project
> Reporter: Parth Brahmbhatt
> Assignee: Parth Brahmbhatt
> Priority: Minor
>
> There have been several questions in the apache mailing list around how to
> use storm to write tuples to a relational database. Storm should add a jdbc
> connector to its list of external connectors that has a general
> implementation to insert data into relational dbs as part of a topology.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)