You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Soheil Pourbafrani <so...@gmail.com> on 2018/03/31 18:22:45 UTC

Reading data from Cassandra

Does Flink Cassandra Connector support reading data from Cassandra? If yes,
so please give an example?

Re: Reading data from Cassandra

Posted by Timo Walther <tw...@apache.org>.
Sorry, the examples contain only sinks. You could do an approach similar 
to the one mentioned here:

https://stackoverflow.com/questions/42617575/read-write-data-into-cassandra-using-apache-flink-java-api

Either put this into your custom SourceFunction or use Async IO [1] with 
a Cassandra Client.

Regards,
Timo

[1] 
https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/stream/operators/asyncio.html

Am 03.04.18 um 16:37 schrieb Timo Walther:
> Hi Soheil,
>
> yes Flink supports reading from Cassandra. You can find some examples 
> here:
>
> https://github.com/apache/flink/tree/master/flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/example 
>
>
> Regards,
> Timo
>
>
> Am 31.03.18 um 20:22 schrieb Soheil Pourbafrani:
>> Does Flink Cassandra Connector support reading data from Cassandra? 
>> If yes, so please give an example?
>


Re: Reading data from Cassandra

Posted by Timo Walther <tw...@apache.org>.
Hi Soheil,

yes Flink supports reading from Cassandra. You can find some examples here:

https://github.com/apache/flink/tree/master/flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/example

Regards,
Timo


Am 31.03.18 um 20:22 schrieb Soheil Pourbafrani:
> Does Flink Cassandra Connector support reading data from Cassandra? If 
> yes, so please give an example?