diff options
author | Matei Alexandru Zaharia <matei@apache.org> | 2015-07-26 19:10:57 +0000 |
---|---|---|
committer | Matei Alexandru Zaharia <matei@apache.org> | 2015-07-26 19:10:57 +0000 |
commit | 6b74391a87abf4907479f933e7bd8ffaf5e045b6 (patch) | |
tree | 9947151cd76eb306f0965e53475251982f949936 /site/sql | |
parent | ba2b12b71cdb01c3948949d92fb89909ffb51d26 (diff) | |
download | spark-website-6b74391a87abf4907479f933e7bd8ffaf5e045b6.tar.gz spark-website-6b74391a87abf4907479f933e7bd8ffaf5e045b6.tar.bz2 spark-website-6b74391a87abf4907479f933e7bd8ffaf5e045b6.zip |
Further improvements to site
Diffstat (limited to 'site/sql')
-rw-r--r-- | site/sql/index.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/site/sql/index.html b/site/sql/index.html index 1f1b6ab0c..8d1d4c40b 100644 --- a/site/sql/index.html +++ b/site/sql/index.html @@ -106,8 +106,8 @@ Documentation <b class="caret"></b> </a> <ul class="dropdown-menu"> - <li><a href="/documentation.html">Overview</a></li> <li><a href="/docs/latest/">Latest Release (Spark 1.4.1)</a></li> + <li><a href="/documentation.html">Other Resources</a></li> </ul> </li> <li><a href="/examples.html">Examples</a></li> @@ -188,8 +188,8 @@ <div style="margin-top: 15px; text-align: left; display: inline-block;"> <div class="code"> - sqlCtx = new <span class="sparkop">HiveContext</span>(sc)<br /> - results = sqlCtx.<span class="sparkop">sql</span>(<br /> <span class="closure">"SELECT * FROM people"</span>)<br /> + context = new <span class="sparkop">HiveContext</span>(sc)<br /> + results = context.<span class="sparkop">sql</span>(<br /> <span class="closure">"SELECT * FROM people"</span>)<br /> names = results.<span class="sparkop">map</span>(<span class="closure">lambda p: p.name</span>) </div> <div class="caption">Apply functions to results of SQL queries.</div> @@ -210,11 +210,11 @@ <div class="col-md-5 col-sm-5 col-padded-top col-center"> <div style="margin-top: 15px; text-align: left; display: inline-block;"> <div class="code"> - sqlCtx.<span class="sparkop">jsonFile</span>(<span class="closure">"s3n://..."</span>)<br /> .registerAsTable("json")<br /> - results = sqlCtx.<span class="sparkop">sql</span>(<span class="closure">"""<br /> - SELECT * <br /> - FROM hiveTable<br /> - JOIN json ..."""</span>)<br /> + context.<span class="sparkop">jsonFile</span>(<span class="closure">"s3n://..."</span>)<br /> .registerTempTable("json")<br /> + results = context.<span class="sparkop">sql</span>(<span class="closure"><br /> + """SELECT * <br /> + FROM people<br /> + JOIN json ..."""</span>)<br /> </div> <div class="caption">Query and join different data sources.</div> </div> |