Skip to content

Commit d71c190

Browse files
committed
Added R code snippets
1 parent df61136 commit d71c190

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

docs/structured-streaming-programming-guide.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -787,12 +787,13 @@ spark.sql("select count(*) from updates"); // returns another streaming DF
787787

788788
{% highlight python %}
789789
df.createOrReplaceTempView("updates")
790-
spark.sql("select count(*) from updates") // returns another streaming DF
790+
spark.sql("select count(*) from updates") # returns another streaming DF
791791
{% endhighlight %}
792792

793793
</div>
794794
<div data-lang="r" markdown="1">
795-
795+
createOrReplaceTempView(df, "updates")
796+
sql("select count(*) from updates")
796797
</div>
797798
</div>
798799
{% highlight scala %}
@@ -1985,28 +1986,30 @@ Spark supports reporting metrics using the [Dropwizard Library](monitoring.html#
19851986

19861987
<div class="codetabs">
19871988
<div data-lang="scala" markdown="1">
1988-
19891989
{% highlight scala %}
19901990
spark.conf.set("spark.sql.streaming.metricsEnabled", "true")
1991+
// or
1992+
spark.sql("SET spark.sql.streaming.metricsEnabled=true")
19911993
{% endhighlight %}
1992-
19931994
</div>
19941995
<div data-lang="java" markdown="1">
1995-
19961996
{% highlight java %}
19971997
spark.conf().set("spark.sql.streaming.metricsEnabled", "true");
1998+
// or
1999+
spark.sql("SET spark.sql.streaming.metricsEnabled=true");
19982000
{% endhighlight %}
1999-
20002001
</div>
20012002
<div data-lang="python" markdown="1">
2002-
20032003
{% highlight python %}
20042004
spark.conf.set("spark.sql.streaming.metricsEnabled", "true")
2005+
# or
2006+
spark.sql("SET spark.sql.streaming.metricsEnabled=true")
20052007
{% endhighlight %}
2006-
20072008
</div>
20082009
<div data-lang="r" markdown="1">
2009-
2010+
{% highlight r %}
2011+
sql("SET spark.sql.streaming.metricsEnabled=true")
2012+
{% endhighlight %}
20102013
</div>
20112014
</div>
20122015

0 commit comments

Comments
 (0)