Переглянути джерело

HUE-8758 [connectors] Adding missing default input fields

Romain 5 роки тому
батько
коміт
fa24f3ebf8

+ 31 - 9
desktop/core/src/desktop/lib/connectors/types.py

@@ -255,7 +255,9 @@ CONNECTOR_TYPES = [
     'nice_name': "Presto",
     'dialect': 'presto',
     'interface': 'sqlalchemy',
-    'settings': [],
+    'settings': [
+      {'name': 'url', 'value': 'presto://host:8080/tpch'}
+    ],
     'category': 'editor',
     'description': '',
     'properties': {
@@ -320,7 +322,9 @@ CONNECTOR_TYPES = [
     'nice_name': "Athena",
     'dialect': 'athena',
     'interface': 'sqlalchemy',
-    'settings': [],
+    'settings': [
+      {'name': 'url', 'value': 'awsathena+rest://XXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@athena.us-west-2.amazonaws.com:443/default?s3_staging_dir=s3://gethue-athena/scratch'}
+    ],
     'category': 'editor',
     'description': '',
     'properties': {
@@ -340,7 +344,9 @@ CONNECTOR_TYPES = [
     'nice_name': "Redshift",
     'dialect': 'redshift',
     'interface': 'sqlalchemy',
-    'settings': [],
+    'settings': [
+      {'name': 'url', 'value': 'edshift+psycopg2://username@host.amazonaws.com:5439/database'}
+    ],
     'category': 'editor',
     'description': '',
     'properties': {
@@ -360,7 +366,9 @@ CONNECTOR_TYPES = [
     'nice_name': "Snowflake",
     'dialect': 'snowflake',
     'interface': 'sqlalchemy',
-    'settings': [],
+    'settings': [
+      {'name': 'url', 'value': 'snowflake://{user}:{password}@{account}/{database}'}
+    ],
     'category': 'editor',
     'description': '',
     'properties': {
@@ -380,7 +388,9 @@ CONNECTOR_TYPES = [
     'nice_name': "Big Query",
     'dialect': 'bigquery',
     'interface': 'sqlalchemy',
-    'settings': [],
+    'settings': [
+      {'name': 'url', 'value': 'bigquery://projectName/datasetName'}
+    ],
     'category': 'editor',
     'description': '',
     'properties': {
@@ -400,7 +410,9 @@ CONNECTOR_TYPES = [
     'nice_name': "Oracle",
     'dialect': 'oracle',
     'interface': 'sqlalchemy',
-    'settings': [],
+    'settings': [
+      {'name': 'url', 'value': 'oracle://scott:tiger@dsn'}
+    ],
     'category': 'editor',
     'description': '',
     'properties': {
@@ -420,7 +432,9 @@ CONNECTOR_TYPES = [
     'nice_name': "Solr SQL",
     'dialect': 'solr',
     'interface': 'solr',
-    'settings': [],
+    'settings': [
+      {'name': 'url', 'value': 'solr://<username>:<password>@<host>:<port>/solr/<collection>[?use_ssl=true|false]'}
+    ],
     'category': 'editor',
     'description': '',
     'properties': {
@@ -441,7 +455,9 @@ CONNECTOR_TYPES = [
     "SQL Database",
     'dialect': 'sql',
     'interface': 'sqlalchemy',
-    'settings': [],
+    'settings': [
+      {'name': 'url', 'value': 'name://projectName/datasetName'}
+    ],
     'category': 'editor',
     'description': '',
     'properties': {
@@ -461,7 +477,13 @@ CONNECTOR_TYPES = [
     'nice_name': "SQL Database (JDBC)",
     'dialect': 'sql',
     'interface': 'sqlalchemy',
-    'settings': [],
+    'settings': [{
+        "url": "jdbc:db2://gethue.com:50000/SQOOP",
+        "driver": "com.ibm.db2.jcc.DB2Driver",
+        "user": "hue",
+        "password": "hue"
+      }
+    ],
     'category': 'editor',
     'description': 'Deprecated: older way to connect to any database.',
     'properties': {

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

@@ -9,9 +9,9 @@ pre = "<b>1. </b>"
 
 <h1>Documentation</h1>
 
-Hue is a mature open source SQL Assistant for [querying](/user/querying/) [Databases & Data Warehouses](https://docs.gethue.com/administrator/configuration/connectors/) and collaborating: [gethue.com](http://gethue.com)
+Hue is a mature open source SQL Assistant for querying [Databases & Data Warehouses](https://docs.gethue.com/administrator/configuration/connectors/) and collaborating: [gethue.com](http://gethue.com)
 
-Many companies and organizations use Hue to quickly answer questions via self-service querying e.g.:
+Many companies and organizations use Hue to quickly answer questions via [self-service querying](/user/querying/) e.g.:
 
 * 1000+ customers
 * Top Fortune 500

+ 52 - 36
docs/docs-site/content/administrator/configuration/connectors/_index.md

@@ -108,7 +108,7 @@ In order to prevent spamming zookeeper, HiveServer2 is cached for the life of th
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install mysqlclient
+    ./build/env/bin/pip install mysqlclient
 
 Then give Hue the information about the database source:
 
@@ -135,7 +135,7 @@ Alternative:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install pyhive
+    ./build/env/bin/pip install pyhive
 
 Then give Hue the information about the database source:
 
@@ -171,7 +171,7 @@ The client driver is maintained by the Presto Team and can be downloaded here: h
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install cx_Oracle
+    ./build/env/bin/pip install cx_Oracle
 
 Then give Hue the information about the database source:
 
@@ -184,9 +184,9 @@ Then give Hue the information about the database source:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install psycopg2
+    ./build/env/bin/pip install psycopg2
       or
-      ./build/env/bin/pip install psycopg2-binary
+    ./build/env/bin/pip install psycopg2-binary
 
 Then give Hue the information about the database source:
 
@@ -222,7 +222,7 @@ Secondly, we need to add a new interpreter to the notebook app. This will allow
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install PyAthena
+    ./build/env/bin/pip install PyAthena
 
 Then give Hue the information about the database source:
 
@@ -241,7 +241,7 @@ Note: Keys and S3 buckets need to be URL quoted but Hue does it automatically fo
 
 First, make sure that Hue can talk to Druid via the [pydruid SqlAlchemy connector](https://github.com/druid-io/pydruid). Either make sure it is in the global Python environment or install it in the Hue virtual environment.
 
-      ./build/env/bin/pip install pydruid
+    ./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".
 
@@ -263,7 +263,7 @@ Adding the `+https` prefix will use HTTPS e.g.:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install sqlalchemy-teradata
+    ./build/env/bin/pip install sqlalchemy-teradata
 
 Then give Hue the information about the database source:
 
@@ -283,7 +283,7 @@ Alternative:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install ibm_db_sa
+    ./build/env/bin/pip install ibm_db_sa
 
 (or via https://github.com/ibmdb/python-ibmdbsa/tree/master/ibm_db_sa)
 
@@ -305,7 +305,7 @@ Alternative:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install pyhive
+    ./build/env/bin/pip install pyhive
 
 Then give Hue the information about the database source:
 
@@ -357,7 +357,7 @@ And provide the address of the KSQL REST Api:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install pyodbc
+    ./build/env/bin/pip install pyodbc
 
 Then configure ODBC according to the [documentation](https://github.com/mkleehammer/pyodbc).
 
@@ -376,7 +376,7 @@ Read more on the [Azure SQL Database](https://docs.microsoft.com/en-us/azure/sql
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install pymssql
+    ./build/env/bin/pip install pymssql
 
 Then give Hue the information about the database source:
 
@@ -398,7 +398,7 @@ Microsoft’s SQL Server JDBC drivers can be downloaded from the official site:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install sqlalchemy-vertica-python
+    ./build/env/bin/pip install sqlalchemy-vertica-python
 
 Then give Hue the information about the database source:
 
@@ -469,7 +469,7 @@ The Phoenix JDBC client driver is bundled with the Phoenix binary and source rel
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install sqlalchemy-redshift
+    ./build/env/bin/pip install sqlalchemy-redshift
 
 Then give Hue the information about the database source:
 
@@ -482,8 +482,8 @@ Then give Hue the information about the database source:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install pybigquery
-      ./build/env/bin/pip install pyasn1==0.4.1
+    ./build/env/bin/pip install pybigquery
+    ./build/env/bin/pip install pyasn1==0.4.1
 
 From https://github.com/mxmzdlv/pybigquery.
 
@@ -534,7 +534,7 @@ The [Drill JDBC driver](http://maprdocs.mapr.com/home/Hue/ConfigureHuewithDrill.
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install python-sybase
+    ./build/env/bin/pip install python-sybase
 
 Then give Hue the information about the database source:
 
@@ -548,7 +548,7 @@ Then give Hue the information about the database source:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install sqlalchemy-hana
+    ./build/env/bin/pip install sqlalchemy-hana
 
 (or via https://github.com/SAP/sqlalchemy-hana)
 
@@ -561,25 +561,26 @@ Then give Hue the information about the database source:
 
 ### Apache Solr
 
-Solr provide great [dashboards](/user/querying/#dashboard). Just point to an existing Solr:
+### SQL
 
-    [search]
+Query collections like we would query a regular database.
 
-      # URL of the Solr Server
-      solr_url=http://localhost:8983/solr/
+The dialect should be added to the Python system or Hue Python virtual environment:
 
-      # Requires FQDN in solr_url if enabled
-      ## security_enabled=false
+    ./build/env/bin/pip install sqlalchemy-solr
 
-      ## Query sent when no term is entered
-      ## empty_query=*:*
+(or via https://github.com/aadel/sqlalchemy-solr)
 
+Then give Hue the information about the database source:
 
-### Apache Solr SQL
+    [[[solr]]]
+       name = Solr SQL
+       interface=sqlalchemy
+       options='{"url": "solr://<username>:<password>@<host>:<port>/solr/<collection>[?use_ssl=true|false]"}'
 
-Query collections like we would query a regular database.
+#### Native
 
-As Solr SQL is pretty recent, there are some caveats, notably Solr lacks support of:
+As Solr SQL is pretty recent, the native implementation has some caveats, notably Solr lacks support of:
 
 * SELECT *
 * WHERE close with a LIKE
@@ -597,6 +598,21 @@ Then add the interpreter:
       ## Name of the collection handler
       # options='{"collection": "default"}'
 
+### Dashboards
+Solr provide great [dashboards](/user/querying/#dashboard). Just point to an existing Solr:
+
+    [search]
+
+      # URL of the Solr Server
+      solr_url=http://localhost:8983/solr/
+
+      # Requires FQDN in solr_url if enabled
+      ## security_enabled=false
+
+      ## Query sent when no term is entered
+      ## empty_query=*:*
+
+
 ### Apache Kylin
 
 Apache Kylin is an open-source online analytical processing (OLAP) engine.
@@ -605,7 +621,7 @@ See how to configure the [Kylin Query Editor](http://gethue.com/using-hue-to-int
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install kylinpy
+    ./build/env/bin/pip install kylinpy
 
 Then give Hue the information about the database source:
 
@@ -625,7 +641,7 @@ Alternative:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install sqlalchemy-clickhouse
+    ./build/env/bin/pip install sqlalchemy-clickhouse
 
 Then give Hue the information about the database source:
 
@@ -647,7 +663,7 @@ Alternative:
 
 The dialect for https://github.com/elastic/elasticsearch should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install elasticsearch-dbapi
+    ./build/env/bin/pip install elasticsearch-dbapi
 
     [[[es]]]
       name = Elastic Search
@@ -659,7 +675,7 @@ The dialect for https://github.com/elastic/elasticsearch should be added to the
 
 The dialect for https://pinot.apache.org should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install pinotdb
+    ./build/env/bin/pip install pinotdb
 
 Then give Hue the information about the database source:
 
@@ -672,7 +688,7 @@ Then give Hue the information about the database source:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install snowflake-sqlalchemy
+    ./build/env/bin/pip install snowflake-sqlalchemy
 
 Then give Hue the information about the database source:
 
@@ -706,7 +722,7 @@ Just give Hue the information about the database source:
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install gsheetsdb
+    ./build/env/bin/pip install gsheetsdb
 
 Then give Hue the information about the database source:
 
@@ -721,7 +737,7 @@ Read more on the [gsheetsdb page](https://github.com/betodealmeida/gsheets-db-ap
 
 The dialect should be added to the Python system or Hue Python virtual environment:
 
-      ./build/env/bin/pip install psycopg2
+    ./build/env/bin/pip install psycopg2
 
 Then give Hue the information about the database source: