简体   繁体   中英

Spark Structured Streaming Kinesis Data source

Is it possible to use Kinesis streams as a data source for Spark structured streaming? I can't find any connector available.

Qubole have a kinesis-sql library for exactly this.

https://github.com/qubole/kinesis-sql

Then you can use the source similar to any other Spark Structured Streaming source:

val source = spark
   .readStream
   .format("kinesis")
   .option("streamName", "spark-source-stream")
   .option("endpointUrl", "https://kinesis.us-east-1.amazonaws.com")
   .option("awsAccessKeyId", [YOUR_AWS_ACCESS_KEY_ID])
   .option("awsSecretKey", [YOUR_AWS_SECRET_KEY])
   .option("startingPosition", "TRIM_HORIZON")
   .load

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM