소스 검색

HUE-8888 [docs] Show how to use credentials with SqlAlchemy

Romain 5 년 전
부모
커밋
9edcbd254b
1개의 변경된 파일10개의 추가작업 그리고 6개의 파일을 삭제
  1. 10 6
      docs/docs-site/content/administrator/configuration/connectors/_index.md

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

@@ -17,14 +17,14 @@ Hue connects to any database or warehouse via native or SqlAlchemy connectors. C
     [[[mysql]]]
     name=MySQL
     interface=sqlalchemy
-    options='{"url": "mysql://${USER}:${PASSWORD}@localhost:3306/hue"}'
+    options='{"url": "mysql://user:password@localhost:3306/hue"}'
 
     [[[presto]]]
     name = Presto
     interface=sqlalchemy
     options='{"url": "presto://localhost:8080/hive/default"}'
 
-Note that USER and PASSWORD can be prompted to the user like in the MySQL connector above.
+Note that USER and PASSWORD can be prompted to the user by using variables like `mysql://${USER}:${PASSWORD}@localhost:3306/hue`.
 
 Read about [how to build your own parser](/developer/parsers/) if you are looking at better autocompletes for your own SQL dialects.
 
@@ -146,15 +146,19 @@ Then give Hue the information about the database source following the `presto://
 
 With impersonation:
 
-        options='{"url": "presto://localhost:8080/tpch/default", "has_impersonation": true}'
+    options='{"url": "presto://localhost:8080/tpch/default", "has_impersonation": true}'
 
 With Kerberos:
 
-        options='{"url": "presto://localhost:8080/tpch/default?KerberosKeytabPath=/path/to/keytab&KerberosPrincipal=principal&KerberosRemoteServiceName=service&protocol=https"'
+    options='{"url": "presto://localhost:8080/tpch/default?KerberosKeytabPath=/path/to/keytab&KerberosPrincipal=principal&KerberosRemoteServiceName=service&protocol=https"'
 
-Alternatives.
+With credentials:
 
-Direct interface:
+    options='{"url": "presto://username:password@localhost:8080/tpch/default"}'
+
+Alternative interfaces.
+
+Direct:
 
     [[[presto]]]
       name=Presto SQL