Nimfadora opened a new pull request #23791: [SPARK-20597][SQL][SS][WIP] KafkaSourceProvider falls back on path as synonym for topic URL: https://github.com/apache/spark/pull/23791 ## What changes were proposed in this pull request? **KafkaSourceProvider** supports 'topic' option that sets target Kafka topic. **KafkaSourceProvider** can use 'topic' column to assign rows to Kafka topics for writing. It is proposed to treat 'path' option in start(path: String) and save(path: String) as alternative to setting 'topic' option. Path would designate the target topic when 'topic' option is not specified and will override 'topic' column value for topic. for streaming it will look as follows: ``` df.writeStream .format("kafka") .option("kafka.bootstrap.servers", "host1:port1,host2:port2") .start("topic") ``` for batch it will look as follows: ``` df.write .format("kafka") .option("kafka.bootstrap.servers", "host1:port1,host2:port2") .save("topic") ``` ## How was this patch tested? Added and extended unit tests, local build&test ## TODO: Currently if topic in 'path' option is specified it overrides topic column and is overridden by 'topic' option (if present). IMHO this relation seems more straightforward than that specified in the ticket ('path' is the least precedence option), but this is arguable, what is your opinion? When this question will be resolved, docs should be changed in accordance with the final decision.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
