apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shubham Pathak <shub...@datatorrent.com>
Subject Re: Enhancements in JdbcPOJOInputOperator
Date Mon, 09 May 2016 13:21:27 GMT
Yes, we can surely do the conversion. But we should also consider usability
and consistency across operators.
Operators such as JSON Parser, CSV Parser emit POJOs and have the ability
to define Date fields in POJO. Having similar ability in
JdbcPOJOInputOperator will make it consistent.
It would also be flexible as a user can easily plug in/ replace operator (
that emits POJO ) without having to handle conversions in the downstream
operator.

Thanks,
Shubham

On Wed, May 4, 2016 at 11:22 PM, Priyanka Gugale <priyanka@datatorrent.com>
wrote:

> Java many times preserve date as long and then we can convert it the way we
> want when we need to interface with other systems (like UI, DB or etc). We
> can still do conversion from one date format to other, but I would prefer
> to keep it raw and convert in required format when need arise.
>
> -Priyanka
>
> On Tue, May 3, 2016 at 11:13 PM, Pradeep Kumbhar <pradeep@datatorrent.com>
> wrote:
>
> > +1 for the change.
> > At some point in time, user'll need this to specify fields related to
> time
> > more meaningfully.
> >
> > On Wed, May 4, 2016 at 10:17 AM, Sandeep Deshmukh <
> sandeep@datatorrent.com
> > >
> > wrote:
> >
> > > +1.
> > > Good to have intuitive way of using fields.
> > >
> > > Regards,
> > > Sandeep
> > >
> > > On Wed, May 4, 2016 at 9:39 AM, Shubham Pathak <
> shubham@datatorrent.com>
> > > wrote:
> > >
> > > > Hello Community,
> > > >
> > > > JdbcPOJOInputOperator reads from a database using JDBC API and emits
> a
> > > POJO
> > > > for each record.
> > > >
> > > > In the  current implementation, Date/Time/Timestamp fields of the
> table
> > > are
> > > > mapped to "long" field in POJO. While this works fine, it is not
> > > intuitive.
> > > >
> > > > I would like to enhance the operator so that user can specify fields
> > with
> > > > the type Date/Time/Timestamp in POJO.
> > > >
> > > > Please let me know your thoughts on this.
> > > >
> > > > Here's the JIRA ticket
> > > > https://issues.apache.org/jira/browse/APEXMALHAR-2075
> > > >
> > > > Thanks,
> > > > Shubham
> > > >
> > >
> >
> >
> >
> > --
> > *regards,*
> > *~pradeep*
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message