Code example for BeanPropertyRowMapper

0
		stream().create(streamName, "%s | %s", httpSource, jdbcSink);
		String json = "{\"foo\":5, \"bar\": \"hello\"}";
		httpSource.ensureReady().postData(json);
 
		String query = String.format("SELECT foo, bar FROM %s", streamName);
		Result result = jdbcSink.getJdbcTemplate().queryForObject(query, new BeanPropertyRowMapper<>(Result.class));
		assertEquals("hello", result.getBar());
		assertEquals(5, result.getFoo());
	} 
 
	@Test
	public void testJdbcSinkWithCustomColumnNamesWithUnderscores() throws Exception {
		JdbcSink jdbcSink = newJdbcSink().columns("foo_bar,bar_foo,bar_baz");
 
		HttpSource httpSource = newHttpSource();
 
		String streamName = generateStreamName().replaceAll("-", "_");
		stream().create(streamName, "%s | %s", httpSource, jdbcSink);
		String json = "{\"fooBar\":5, \"barFoo\": \"hello\", \"bar_baz\": \"good_bye\"}";
		httpSource.ensureReady().postData(json);
Connect your IDE to all the code out there  Get Codota for Java