Browse Source

[hive] Also add Hive via SqlAlchemy connector

Romain Rigaux 5 năm trước cách đây
mục cha
commit
02c760949a
1 tập tin đã thay đổi với 29 bổ sung2 xóa
  1. 29 2
      desktop/core/src/desktop/lib/connectors/types.py

+ 29 - 2
desktop/core/src/desktop/lib/connectors/types.py

@@ -29,10 +29,9 @@ LOG = logging.getLogger(__name__)
 
 CONNECTOR_TYPES = [
   {
-    'id': 'hive',
     'dialect': 'hive',
     'nice_name': 'Hive',
-    'description': '',
+    'description': 'Recommended',
     'category': 'editor',
     'interface': 'hiveserver2',
     'settings': [
@@ -57,6 +56,34 @@ CONNECTOR_TYPES = [
       'trim_statement_semicolon': False,
     }
   },
+  {
+    'dialect': 'hive',
+    'nice_name': 'Hive',
+    'description': 'Via SqlAlchemy interface',
+    'category': 'editor',
+    'interface': 'sqlalchemy',
+    'settings': [
+      {'name': 'url', 'value': 'hive://localhost:10000'},
+      {'name': 'has_ssh', 'value': False},
+      {'name': 'ssh_server_host', 'value': '127.0.0.1'},
+    ],
+    'properties': {
+      'is_sql': True,
+      'sql_identifier_quote': '`',
+      'sql_identifier_comment_single': '--',
+      'has_catalog': False,
+      'has_database': True,
+      'has_table': True,
+      'has_live_queries': False,
+      'has_optimizer_risks': True,
+      'has_optimizer_values': True,
+      'has_auto_limit': False,
+      'has_reference_language': True,
+      'has_reference_functions': True,
+      'has_use_statement': True,
+      'trim_statement_semicolon': False,
+    }
+  },
   {
     'nice_name': "Impala",
     'dialect': 'impala',