Browse Source

HUE-8888 [docs] Emphasize the parser API

Romain 5 years ago
parent
commit
dea04d4c0a

+ 1 - 1
README.md

@@ -17,7 +17,7 @@ Many companies and organizations use Hue to quickly answer questions via self-se
 
 are executing 100s of 1000s of queries daily. It also [ships](https://docs.gethue.com/administrator/installation/) in Cloudera Data Platform, Amazon AWS, Open Data Hub...
 
-Hue is also ideal for building your own [Cloud SQL Editor](https://docs.gethue.com/developer/parsers/) and any [contributions](CONTRIBUTING.md) are welcome.
+Hue is also ideal for building your own [Cloud SQL Editor](https://docs.gethue.com/developer/api/) and any [contributions](CONTRIBUTING.md) are welcome.
 
 
 ![Hue Editor](https://cdn.gethue.com/uploads/2019/12/hue4.6.png)

+ 1 - 5
desktop/libs/notebook/src/notebook/connectors/sql_alchemy_tests.py

@@ -207,13 +207,9 @@ class TestApi(object):
       with patch('notebook.connectors.sql_alchemy.inspect') as inspect:
         get_sample_data.return_value = (['col1'], [[1], [2]])
 
-        response = SqlAlchemyApi(self.user, self.interpreter).get_sample_data(snippet, table='table1')
+        response = SqlAlchemyApi(self.user, self.interpreter).get_sample_data(snippet, database='database1', table='table1')
 
         assert_equal(response['rows'], [[1], [2]])
-        assert_equal(
-          response['full_headers'],
-          [{'name': 'col1', 'type': 'STRING_TYPE', 'comment': ''}]
-        )
 
 
 class TestDialects(object):

+ 3 - 10
docs/docs-site/content/administrator/configuration/connectors/_index.md

@@ -845,6 +845,8 @@ Alternatively (but not recommended for production or secure environments), you c
 
 The region should be set to the AWS region corresponding to the S3 account. By default, this region will be set to 'us-east-1'.
 
+**Using Ozone**
+Apache Ozone should work out of the box.
 
 **Using Ceph**
 New end points have been added in [HUE-5420](https://issues.cloudera.org/browse/HUE-5420)
@@ -858,15 +860,6 @@ Read more about it in the [ADLS User Documentation](/user/browsing#adls-abfs).
 In order to add an Azure account to Hue, you'll need to configure Hue with valid Azure credentials, including the client ID, client secret and tenant ID.
 These keys can securely stored in a script that outputs the actual access key and secret key to stdout to be read by Hue (this is similar to how Hue reads password scripts). In order to use script files, add the following section to your hue.ini configuration file:
 
-    [azure]
-    [[azure_accounts]]
-    [[[default]]]
-    client_id_script=/path/to/client_id_script.sh
-    client_secret_script=/path/to/client_secret_script.sh
-    tenant_id_script=/path/to/tenant_id_script.sh
-
-Alternatively (but not recommended for production or secure environments), you can set the client_secret value in plain-text:
-
     [azure]
     [[azure_account]]
     [[[default]]]
@@ -883,7 +876,7 @@ The account name used by ADLS / ABFS will need to be configured via the followin
 
     [[abfs_clusters]]
     [[[default]]]
-    fs_defaultfs=abfss://<container_name>@<account_name>.dfs.core.windows.net
+    fs_defaultfs=abfs://<container_name>@<account_name>.dfs.core.windows.net
     webhdfs_url=https://<container_name>@<account_name>.dfs.core.windows.net
 
 ### GCS

+ 2 - 2
docs/docs-site/content/developer/api/_index.md

@@ -5,12 +5,12 @@ draft: false
 weight: 5
 ---
 
-Hue can be accessed directly via a Python Shell or by its REST API. Some components of Hue like the SQL parsers can also be imported independently.
+Hue can easily be extended to natively support other databases or be enriched via other data catalogs. Some components of Hue like the SQL parsers or Editor Scratchpad can also be imported independently as dependencies into your own apps.
 
 
 ## SQL autocompletion
 
-The parser is running on the client side and comes with just a few megabytes of JavaScript that are cached by the browser. This provides a very reactive experience to the end user and allows to import it as a module.
+The [parsers](/developer/parsers/) are the flagship part of the Hue and power extremely advanced autocompletes or other [SQL functionalities](/user/querying/#autocomplete). They are running on the client side and comes with just a few megabytes of JavaScript that are cached by the browser. This provides a very reactive experience to the end user and allows to import them as classic JavaScript modules for your own development needs.
 
 While the dynamic content like the list of tables, columns is obviously fetched via [remote endpoints](#sql-querying), all the SQL knowledge of the statements is available.
 

+ 5 - 3
docs/docs-site/content/developer/parsers/_index.md

@@ -115,7 +115,9 @@ For the statement above we’d add an extra rule with an _EDIT postfix like this
 
 So for example if a cursor without any text is encountered, it will tell us to suggest the ‘SELECT’ keyword etc.
 
-## Tutorial: Creating a PostgreSQL parser
+## Tutorial: Creating a parser
+
+The goal is to create from scratch a new parser for the PostgreSQL database.
 
 ### Prerequisites
 
@@ -330,6 +332,6 @@ And cf. above [prerequisites](#prerequisites), any interpreter snippet with `ksq
 
 Note: after [HUE-8758](https://issues.cloudera.org/browse/HUE-8758) we will be able to have multiple interpreters on the same dialect (e.g. pointing to two different databases of the same type).
 
-## API
+## Exporting a parser
 
-Looking at importing the parser in your own apps? This is described in the [API section](/developer/api/#sql-autocompletion).
+Parsers generated by Hue are JavaScript modules. This makes it easy to import a parser into your own apps (e.g. Webapp, Node.Js...). How to do it is described in depth in the [API section](/developer/api/#sql-autocompletion).