Created
July 15, 2019 07:12
-
-
Save yjshen/5e2658ad2be146d2c13f5a7d465fdd15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val ds = df | |
.selectExpr("__topic", "CAST(__key AS STRING)", "CAST(value AS STRING)") // the __topic field is used to choose the right topic for each record | |
.writeStream | |
.format("pulsar") | |
.option("service.url", "pulsar://localhost:6650") | |
.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment