Gschiavon commented on a change in pull request #26733: [SPARK-30097][SS][SQL]
- Add suport for core sinks in writeStream
URL: https://github.com/apache/spark/pull/26733#discussion_r354717494
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/streaming/DataStreamWriter.scala
##########
@@ -132,6 +132,30 @@ final class DataStreamWriter[T] private[sql](ds:
Dataset[T]) {
this
}
+ def parquet(path: String): StreamingQuery = {
+ format("parquet")
+ .option("path", path)
+ .start()
+ }
+
+ def json(path: String): StreamingQuery = {
+ format("json")
+ .option("path", path)
+ .start()
+ }
+
+ def csv(path: String): StreamingQuery = {
+ format("csv")
+ .option("path", path)
+ .start()
+ }
+
+ def text(path: String): StreamingQuery = {
+ format("text")
+ .option("path", path)
+ .start()
+ }
Review comment:
I just thought it would be good to have access to the same methods. Also I
was thinking that `.start` could be out of the `.parquet/json/csv/text` to keep
making people use `start` to start streaming queries.
About `orc` and `avro` you are right, they are missing right now, but they
could be added.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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]