浏览代码

HUE-8888 [gethue] Fix the SQL highlighting of several posts

Romain 5 年之前
父节点
当前提交
4306c260dd

+ 12 - 31
docs/gethue/content/en/posts/2019-03-22-quick-task-how-to-query-apache-druid-analytic-database.md

@@ -54,31 +54,20 @@ If not already running, it is easy to get Druid [downloaded][6] and [started][7
 
 First, let's make sure that Hue can talk to Druid via the [pydruid SqlAlchemy][8] connector. Either make sure it is in the global Python environment via a usual 'pip install' or install it in the Hue virtual environment.
 
-<pre><code class="bash">
-
-./build/env/bin/pip install pydruid
-
-</code></pre>
+    ./build/env/bin/pip install pydruid
 
 **Note:** Make sure the version is equal or more to 0.4.1 if not you will get a "Can't load plugin: sqlalchemy.dialects:druid".
 
 In the hue.ini configuration file, now let's add the interpreter. Here 'druid-host.com' would be the machine where Druid is running.
 
-<pre><code class="bash">
-
-[notebook]
-
-[[interpreters]]
-
-[[[druid]]]
-
-name = Druid
-
-interface=sqlalchemy
+    [notebook]
+    [[interpreters]]
+    [[[druid]]]
+    name = Druid
+    interface=sqlalchemy
+    options='{"url": "druid://druid-host.com:8082/druid/v2/sql/"}'
 
-options='{"url": "druid://druid-host.com:8082/druid/v2/sql/"}'
 
-</code></pre>
 
 And now restart Hue.
 
@@ -86,19 +75,11 @@ And now restart Hue.
 
 And that's it, now open-up <http://127.0.0.1:8000/hue/editor/?type=pydruid> (replace host or port of your actual Hue) and you can start querying!
 
-<pre><code class="sql">
-
-SELECT countryName, count(*) t
-
-FROM druid.wikipedia
-
-GROUP BY countryName
-
-ORDER BY t DESC
-
-LIMIT 100
-
-</code></pre>
+    SELECT countryName, count(*) t
+    FROM druid.wikipedia
+    GROUP BY countryName
+    ORDER BY t DESC
+    LIMIT 100
 
 As usual feel free to comment here or to send feedback to the [hue-user][9] list or [@gethue][10]!
 

+ 14 - 17
docs/gethue/content/en/posts/2019-08-07-sql-querying-apache-hbase-with-apache-phoenix.md

@@ -51,33 +51,30 @@ Hue supports JDBC or SqlAlchemy interfaces as described in the [SQL Connector do
 
 On the Hue host:
 
-<pre><code class="bash">./build/env/bin/pip install pyPhoenix
-</code></pre>
+    ./build/env/bin/pip install pyPhoenix
 
 Then in the desktop/conf/hue.ini config file section:
 
-<pre><code class="bash">[notebook]
-  [[interpreters]]
+    [notebook]
+    [[interpreters]]
     [[[phoenix]]]
-      name = phoenix
-      interface=sqlalchemy
-      options='{"url": "phoenix://sql-phoenix.gethue.com:8765/"}'
-</code></pre>
+    name = phoenix
+    interface=sqlalchemy
+    options='{"url": "phoenix://sql-phoenix.gethue.com:8765/"}'
 
 Then start the Phoenix queryserver:
 
-<pre><code class="bash">phoenix-queryserver
-...
-19/07/24 20:55:13 INFO util.log: Logging initialized @1563ms
-19/07/24 20:55:13 INFO server.Server: jetty-9.2.z-SNAPSHOT
-19/07/24 20:55:14 INFO server.ServerConnector: Started ServerConnector@662b4c69{HTTP/1.1}{0.0.0.0:8765}
-19/07/24 20:55:14 INFO server.Server: Started @1793ms
-19/07/24 20:55:14 INFO server.HttpServer: Service listening on port 8765.
-</code></pre>
+    phoenix-queryserver
+    ...
+    19/07/24 20:55:13 INFO util.log: Logging initialized @1563ms
+    19/07/24 20:55:13 INFO server.Server: jetty-9.2.z-SNAPSHOT
+    19/07/24 20:55:14 INFO server.ServerConnector: Started ServerConnector@662b4c69{HTTP/1.1}{0.0.0.0:8765}
+    19/07/24 20:55:14 INFO server.Server: Started @1793ms
+    19/07/24 20:55:14 INFO server.HttpServer: Service listening on port 8765.
 
 And we are ready to query HBase!
 
-<pre><code class="sql">select * from us_population limit 10</code></pre>
+    select * from us_population limit 10
 
 <a href="https://cdn.gethue.com/uploads/2019/07/editor_phoenix_select.png"><img src="https://cdn.gethue.com/uploads/2019/07/editor_phoenix_select.png" /></a>
 

+ 4 - 4
docs/gethue/content/en/posts/2020-03-04-collaboration-with-link-and-gist.md

@@ -44,9 +44,9 @@ categories:
 
 
 ---
-Hi Data crunchers,
+Hi Data Crunchers,
 
-For the [past 10 years](https://gethue.com/blog/2020-01-28-ten-years-data-querying-ux-evolution/), Hue's SQL Editor has been targeting the [SQL Data Warehouse Experience](https://gethue.com/blog/2020-02-10-sql-query-experience-of-your-cloud-data-warehouse/). It recently got better support for typying SQL queries by showing [column keys](/2019-11-13-sql-column-assist-icons/). The latest improvement is about better collaboration.
+For the [past 10 years](https://gethue.com/blog/2020-01-28-ten-years-data-querying-ux-evolution/), Hue's SQL Editor has been targeting the [SQL Data Warehouse Experience](https://gethue.com/blog/2020-02-10-sql-query-experience-of-your-cloud-data-warehouse/). It recently got better support for typing SQL queries by showing [column keys](/2019-11-13-sql-column-assist-icons/). The latest improvement is about better collaboration.
 
 Via the [document sharing](https://docs.gethue.com/user/concept/#sharing) capabilities and [query parameterization](https://docs.gethue.com/user/querying/#variables), Hue allows teams to build their own query bank of knowledge. To complement this, something quicker and easier is now also available: Public link & Gist sharing.
 
@@ -57,7 +57,7 @@ Goal: quickly sharing parameterized saved reports, customer analyses links.
 
 Public links are the same as in Google documents. They only require the recipient to have a Hue login. People can then reuse the queries on their own by executing them to see the results, fork and adapt them.
 
-* No need to select groups or list of invidual users
+* No need to select groups or list of individual users
 * Read, write permissions
 * Linked documents won't show up in your home
 * Can be turned off globally
@@ -88,7 +88,7 @@ Answering a question via a query result? Showing some weird data to a slack chan
 
 * Works with an SQL snippet: one or more statements
 * The link automatically point to the editor and the SQL content
-* The query is displayed in the friendlier [presentation mode]
+* The query is displayed in the friendlier [presentation mode](https://docs.gethue.com/user/querying/#presentation)
 * Slack unfurling will show a mini preview (can be turned off globally)
 * Gists are stored in a Gist directory in your home
 

+ 15 - 18
docs/gethue/content/jp/posts/2019-08-14-sql-querying-apache-hbase-with-apache-phoenix.md

@@ -50,33 +50,30 @@ HueはJDBC、または [SQL Connector documentation][6] に記載されてい
 
 Hueのホストにて:
 
-<pre><code class="bash">./build/env/bin/pip install pyPhoenix
-</code></pre>
+    ./build/env/bin/pip install pyPhoenix
 
 続いて desktop/conf/hue.ini 設定ファイルセクションにて:
 
-<pre><code class="bash">[notebook]
-  [[interpreters]]
+    [notebook]
+    [[interpreters]]
     [[[phoenix]]]
-      name = phoenix
-      interface=sqlalchemy
-      options='{"url": "phoenix://sql-phoenix.gethue.com:8765/"}'
-</code></pre>
+    name = phoenix
+    interface=sqlalchemy
+    options='{"url": "phoenix://sql-phoenix.gethue.com:8765/"}'
 
 その後 queryserver を開始します:
 
-<pre><code class="bash">phoenix-queryserver
-...
-19/07/24 20:55:13 INFO util.log: Logging initialized @1563ms
-19/07/24 20:55:13 INFO server.Server: jetty-9.2.z-SNAPSHOT
-19/07/24 20:55:14 INFO server.ServerConnector: Started ServerConnector@662b4c69{HTTP/1.1}{0.0.0.0:8765}
-19/07/24 20:55:14 INFO server.Server: Started @1793ms
-19/07/24 20:55:14 INFO server.HttpServer: Service listening on port 8765.
-</code></pre>
+    >phoenix-queryserver
+    ...
+    19/07/24 20:55:13 INFO util.log: Logging initialized @1563ms
+    19/07/24 20:55:13 INFO server.Server: jetty-9.2.z-SNAPSHOT
+    19/07/24 20:55:14 INFO server.ServerConnector: Started ServerConnector@662b4c69{HTTP/1.1}{0.0.0.0:8765}
+    19/07/24 20:55:14 INFO server.Server: Started @1793ms
+    19/07/24 20:55:14 INFO server.HttpServer: Service listening on port 8765.
 
 これで HBase をクエリする準備ができました!
 
-<pre><code class="sql">select * from us_population limit 10</code></pre>
+    select * from us_population limit 10
 
 [<img class="aligncenter wp-image-6025" src="https://cdn.gethue.com/uploads/2019/07/editor_phoenix_select.png" alt="" width="1076" height="580" />][7]
 
@@ -126,4 +123,4 @@ Error: ERROR 505 (42000): Table is read only. (state=42000,code=505)
  [8]: https://cdn.gethue.com/uploads/2019/07/phonix_select_shell.png
  [9]: https://docs.gethue.com/latest/developer/parsers/
  [10]: https://github.com/Pirionfr/pyPhoenix
- [11]: https://blog.cloudera.com/blog/2019/07/apache-phoenix-for-cdh/
+ [11]: https://blog.cloudera.com/blog/2019/07/apache-phoenix-for-cdh/