The interface for converter to ClickHouse format
Closed this issue · 3 comments
mchernyakov commented
@aleksanchezz @ashulenko
Probably, for more obvious using this sink we should add the cpecific interface, something like this:
public interface ClickHouseSinkConverter<T> {
String convert(T record);
}
And we can use it directly in the sink:
ClickHouseSinkConverter<SomeClass> chConverter = ....;
DataStream<YourEvent> dataStream = ...;
dataStream.addSink(new ClickhouseSink(props, chConverter))
.name("your_table clickhouse sink);
spancer commented
That should be really helpful, if a converter is supported.
mchernyakov commented
@spancer hi, it is not a converter, it is just an interface. Basically, this ticket is about refactoring.
It's quite tricky to implement an universal converter from Java Object to Clickhouse-format String. But if you have some will, you could try.
Contributions are welcome.
mchernyakov commented
implemented in #22