IMO it's okay to create table in java code. We should document it in
operator guide as well as put a log message when we create table.
And in case you don't have privileges, the operator should throw meaningful
On Fri, Jan 13, 2017 at 4:07 PM, Yogi Devendra <yogideven...@apache.org>
> My suggestions:
> 1. Have a separate utility script for creating this table.
> 2. Have README for the utility script
> 3. Mention about the utility script in the operator javadocs.
> 4. Mention about the utility script in the application README.
> 5. If at all, you wish to ease out the process; you can introduce flag
> like autoPopulateMetaTable. But. default value of this flag should to be
> 6. I would prefer to avoid side-effects unless explicitly asked by the
> end user.
> 7. Relevant exceptions should be caught and should have a message which
> can be understood by the end user.
> ~ Yogi
> On 13 January 2017 at 15:57, Hitesh Kapoor <hit...@datatorrent.com> wrote:
> > Hi All,
> > Currently to use JdbcPOJOInsertOutputOperator, user needs to create
> > "dt_meta" table to enforce
> > exactly-once processing semantic. If the user fails to create this table
> > before launching the application an exception is thrown.
> > To handle this scenario we can automate the process of creating this
> > assuming the user has the appropriate privileges. The problem with this
> > approach is that it may not be a very good idea to modify user's database
> > automatically , also if the user doesn't has the appropriate privileges
> > will eventually throw an exception (however a different exception).
> > So I need your opinion if we should automate the creation of this
> > table (if it doesn't exists) or continue with the existing behaviour or
> > anything else.
> > Regards,
> > Hitesh