Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/12320#discussion_r59671982
--- Diff: python/pyspark/sql/readwriter.py ---
@@ -395,6 +425,38 @@ def partitionBy(self, *cols):
self._jwrite =
self._jwrite.partitionBy(_to_seq(self._sqlContext._sc, cols))
return self
+ @since(2.0)
+ def queryName(self, queryName):
+ """Specifies the name of the :class:`ContinuousQuery` that can be
started with
+ :func:`startStream`. This name must be unique among all the
currently active queries
+ in the associated SQLContext.
+
+ :param queryName: unique name for the query
+
+ >>> writer = sdf.write.queryName('streaming_query')
+ """
+ if not queryName or type(queryName) != str or
len(queryName.strip()) == 0:
+ raise ValueError('The queryName must be a non-empty string.
Got: %s' % queryName)
+ self._jwrite = self._jwrite.queryName(queryName)
+ return self
+
+ @since(2.0)
+ def trigger(self, trigger):
--- End diff --
Put a default value here?
---
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]