Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-2945

Externalized RowMapper<Tuple> from the NamedColumnJdbcItemReader

    XMLWordPrintable

    Details

    • Type: Story
    • Status: To Do
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Ingest
    • Labels:
    • Story Points:
      1
    • Rank (Obsolete):
      9223372036854775807

      Description

      As a user I want to be able to provide my own RowMapper<Tuple> implementation to enrich the jdbc data.

      My use case requires me to add timestamp field and a delete flag field to records before they get written to HDFS. To do it, I have to implement a ItemReaderFactory and perhaps extend NameColumnJdbcItemReader. This is to override the afterPropertySet method to change the default implementation.

      Otherwise I have to write my own Processor that can add these fields to Tuples, and since tuples are immutable I would have to recreate the tuples with additional fields in the processor. For large load this could be big overhead.

      I would love to know any other technique to implement such a use case.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ali.iqbal@gmail.com Muhammad Ali
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: