4

I have a spring-boot batch application. Where I'm pulling data from redshift to dump in elastic search. And I also have a dynamoDB available for the application.

Now, my question is:

is it possible to store the spring-batch meta-data tables in DynamoDB or to avoid the meta-data tables at-all?

Some of the things, I have tried so far,

tried to avoid the meta-data tables creation, by using ResourcelessTransactionManager

    public ResourcelessTransactionManager resourcelessTransactionManager() {
    return new ResourcelessTransactionManager();
    }

OR

By overriding setDataSource to do nothing

    public void setDataSource(DataSource dataSource) {
        // do nothing
    }

But both the case, it's not reading data from Redshift.

Secondly, I didn't find any reference to use dynamoDB to store spring-batch meta-data tables.

Therefore, is there any approach to store meta schema in dynamoDb or the avoid these tables without affecting Redshift data reading from ItemReader?

My ItemReader Code:

    public ItemReader<MyPojo> redshiftReader(@Qualifier("redShiftDataSource") DataSource dataSource) {
        JdbcCursorItemReader<MyPojo> databaseReader = new JdbcCursorItemReader<>();
        databaseReader.setDataSource(dataSource);
        databaseReader.setSql(QUERY_TO_READ_DATA);
        databaseReader.setRowMapper(new BeanPropertyRowMapper<MyPojo>(MyPojo.class));
        databaseReader.setFetchSize(10000);

        return databaseReader;
    }
SPRING BOOT VERSION: 2.2.2.RELEASE
anij
  • 1,322
  • 5
  • 23
  • 39

0 Answers0