Bladeren bron

[sparksql] Change snippet type from 'sql to 'sparksql' (#2901)

Harsh Gupta 3 jaren geleden
bovenliggende
commit
bd6324a79c

+ 1 - 1
desktop/libs/notebook/src/notebook/conf.py

@@ -146,7 +146,7 @@ def get_ordered_interpreters(user=None):
       'category': i.get('category', 'editor'),
       "is_sql": i.get('is_sql') or \
           i['interface'] in ["hiveserver2", "rdbms", "jdbc", "solr", "sqlalchemy", "ksql", "flink"] or \
-          i['type'] == 'sql',
+          i['type'] in ["sql", "sparksql"],
       "is_catalog": i['interface'] in ["hms",],
     }
     for i in interpreters

+ 2 - 0
desktop/libs/notebook/src/notebook/connectors/spark_shell.py

@@ -424,6 +424,8 @@ class SparkApi(Api):
     api = self.get_api()
     all_sessions = {}
 
+    session_type = 'sql' if session_type == 'sparksql' else session_type
+
     try:
       all_sessions = api.get_sessions()
     except Exception as e: