Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/13342#discussion_r66541395
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala ---
@@ -401,6 +383,91 @@ final class DataFrameWriter private[sql](df:
DataFrame) {
}
/**
+ * :: Experimental ::
+ * Starts the execution of the streaming query, which will continually
send results to the given
+ * [[ForeachWriter]] as as new data arrives. The [[ForeachWriter]] can
be used to send the data
+ * generated by the [[DataFrame]]/[[Dataset]] to an external system. The
returned The returned
+ * [[ContinuousQuery]] object can be used to interact with the stream.
+ *
+ * Scala example:
+ * {{{
+ * datasetOfString.write.foreach(new ForeachWriter[String] {
+ * def open(partitionId: Long, version: Long): Boolean = {
+ * // open connection
+ * }
+ * def process(record: String) = {
+ * // write string to connection
+ * }
+ * def close(errorOrNull: Throwable): Unit = {
--- End diff --
check indents.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]