HyukjinKwon commented on a change in pull request #23797: [WIP][SPARK-26856][PYSPARK] Python support for from_avro and to_avro APIs URL: https://github.com/apache/spark/pull/23797#discussion_r257448637
########## File path: docs/sql-data-sources-avro.md ########## @@ -137,6 +137,37 @@ StreamingQuery query = output .option("topic", "topic2") .start(); +{% endhighlight %} +</div> +<div data-lang="python" markdown="1"> +{% highlight python %} +from pyspark.sql.functions import from_avro, to_avro + +# `from_avro` requires Avro schema in JSON string format. +jsonFormatSchema = open("examples/src/main/resources/user.avsc", "r").read() + +df = spark + .readStream Review comment: nit: I think it needs `\` for each line. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org