You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by mx...@apache.org on 2015/06/24 14:47:46 UTC

flink-web git commit: fix code formatting of table API example

Repository: flink-web
Updated Branches:
  refs/heads/asf-site 487049aa0 -> 61864351f


fix code formatting of table API example


Project: http://git-wip-us.apache.org/repos/asf/flink-web/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink-web/commit/61864351
Tree: http://git-wip-us.apache.org/repos/asf/flink-web/tree/61864351
Diff: http://git-wip-us.apache.org/repos/asf/flink-web/diff/61864351

Branch: refs/heads/asf-site
Commit: 61864351f7427ad8128883a38831223a5a29d7c2
Parents: 487049a
Author: Maximilian Michels <mx...@apache.org>
Authored: Wed Jun 24 14:47:15 2015 +0200
Committer: Maximilian Michels <mx...@apache.org>
Committed: Wed Jun 24 14:47:15 2015 +0200

----------------------------------------------------------------------
 _posts/2015-06-24-announcing-apache-flink-0.9.0-release.md   | 2 ++
 content/blog/feed.xml                                        | 8 ++++----
 .../2015/06/24/announcing-apache-flink-0.9.0-release.html    | 8 ++++----
 3 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink-web/blob/61864351/_posts/2015-06-24-announcing-apache-flink-0.9.0-release.md
----------------------------------------------------------------------
diff --git a/_posts/2015-06-24-announcing-apache-flink-0.9.0-release.md b/_posts/2015-06-24-announcing-apache-flink-0.9.0-release.md
index b6b9b88..5bf2b26 100644
--- a/_posts/2015-06-24-announcing-apache-flink-0.9.0-release.md
+++ b/_posts/2015-06-24-announcing-apache-flink-0.9.0-release.md
@@ -25,11 +25,13 @@ The fault tolerance mechanism requires data sources that can replay recent parts
 
 Flink’s new Table API offers a higher-level abstraction for interacting with structured data sources. The Table API allows users to execute logical, SQL-like queries on distributed data sets while allowing them to freely mix declarative queries with regular Flink operators. Here is an example that groups and joins two tables:
 
+```scala
 val clickCounts = clicks
   .groupBy('user).select('userId, 'url.count as 'count)
 
 val activeUsers = users.join(clickCounts)
   .where('id === 'userId && 'count > 10).select('username, 'count, ...)
+```
 
 Tables consist of logical attributes that can be selected by name rather than physical Java and Scala data types. This alleviates a lot of boilerplate code for common ETL tasks and raises the abstraction for Flink programs. Tables are available for both static and streaming data sources (DataSet and DataStream APIs).
 

http://git-wip-us.apache.org/repos/asf/flink-web/blob/61864351/content/blog/feed.xml
----------------------------------------------------------------------
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 53a7665..46caacd 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -28,11 +28,11 @@
 
 &lt;p&gt;Flink’s new Table API offers a higher-level abstraction for interacting with structured data sources. The Table API allows users to execute logical, SQL-like queries on distributed data sets while allowing them to freely mix declarative queries with regular Flink operators. Here is an example that groups and joins two tables:&lt;/p&gt;
 
-&lt;p&gt;val clickCounts = clicks
-  .groupBy(‘user).select(‘userId, ‘url.count as ‘count)&lt;/p&gt;
+&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-scala&quot;&gt;&lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clickCounts&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clicks&lt;/span&gt;
+  &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;groupBy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;-Symbol&quot;&gt;&amp;#39;user&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;-Symbol&quot;&gt;&amp;#39;userId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;-Symbol&quot;&gt;&amp;#39;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;count&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;-Symbol&quot;&gt;&amp;#39;count&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
 
-&lt;p&gt;val activeUsers = users.join(clickCounts)
-  .where(‘id === ‘userId &amp;amp;&amp;amp; ‘count &amp;gt; 10).select(‘username, ‘count, …)&lt;/p&gt;
+&lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;activeUsers&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;users&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;clickCounts&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
+  &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;where&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;-Symbol&quot;&gt;&amp;#39;id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;-Symbol&quot;&gt;&amp;#39;userId&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;-Symbol&quot;&gt;&amp;#39;count&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;-Symbol&quot;&gt;&amp;#39;username&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;-Symbol&quot;&gt;&amp;#39;count&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;...)&lt;/span&gt;&lt;/code&gt;&lt;/pre&
 gt;&lt;/div&gt;
 
 &lt;p&gt;Tables consist of logical attributes that can be selected by name rather than physical Java and Scala data types. This alleviates a lot of boilerplate code for common ETL tasks and raises the abstraction for Flink programs. Tables are available for both static and streaming data sources (DataSet and DataStream APIs).&lt;/p&gt;
 

http://git-wip-us.apache.org/repos/asf/flink-web/blob/61864351/content/news/2015/06/24/announcing-apache-flink-0.9.0-release.html
----------------------------------------------------------------------
diff --git a/content/news/2015/06/24/announcing-apache-flink-0.9.0-release.html b/content/news/2015/06/24/announcing-apache-flink-0.9.0-release.html
index 0d1dcc2..60268d7 100644
--- a/content/news/2015/06/24/announcing-apache-flink-0.9.0-release.html
+++ b/content/news/2015/06/24/announcing-apache-flink-0.9.0-release.html
@@ -165,11 +165,11 @@
 
 <p>Flink’s new Table API offers a higher-level abstraction for interacting with structured data sources. The Table API allows users to execute logical, SQL-like queries on distributed data sets while allowing them to freely mix declarative queries with regular Flink operators. Here is an example that groups and joins two tables:</p>
 
-<p>val clickCounts = clicks
-  .groupBy(‘user).select(‘userId, ‘url.count as ‘count)</p>
+<div class="highlight"><pre><code class="language-scala"><span class="k">val</span> <span class="n">clickCounts</span> <span class="k">=</span> <span class="n">clicks</span>
+  <span class="o">.</span><span class="n">groupBy</span><span class="o">(</span><span class="-Symbol">&#39;user</span><span class="o">).</span><span class="n">select</span><span class="o">(</span><span class="-Symbol">&#39;userId</span><span class="o">,</span> <span class="-Symbol">&#39;url</span><span class="o">.</span><span class="n">count</span> <span class="n">as</span> <span class="-Symbol">&#39;count</span><span class="o">)</span>
 
-<p>val activeUsers = users.join(clickCounts)
-  .where(‘id === ‘userId &amp;&amp; ‘count &gt; 10).select(‘username, ‘count, …)</p>
+<span class="k">val</span> <span class="n">activeUsers</span> <span class="k">=</span> <span class="n">users</span><span class="o">.</span><span class="n">join</span><span class="o">(</span><span class="n">clickCounts</span><span class="o">)</span>
+  <span class="o">.</span><span class="n">where</span><span class="o">(</span><span class="-Symbol">&#39;id</span> <span class="o">===</span> <span class="-Symbol">&#39;userId</span> <span class="o">&amp;&amp;</span> <span class="-Symbol">&#39;count</span> <span class="o">&gt;</span> <span class="mi">10</span><span class="o">).</span><span class="n">select</span><span class="o">(</span><span class="-Symbol">&#39;username</span><span class="o">,</span> <span class="-Symbol">&#39;count</span><span class="o">,</span> <span class="o">...)</span></code></pre></div>
 
 <p>Tables consist of logical attributes that can be selected by name rather than physical Java and Scala data types. This alleviates a lot of boilerplate code for common ETL tasks and raises the abstraction for Flink programs. Tables are available for both static and streaming data sources (DataSet and DataStream APIs).</p>