Преглед изворни кода

HUE-9187 [design] Information on Editor v2 and connector convergence

Romain пре 5 година
родитељ
комит
9743ce78e2
1 измењених фајлова са 192 додато и 0 уклоњено
  1. 192 0
      docs/designs/notebook2.md

+ 192 - 0
docs/designs/notebook2.md

@@ -0,0 +1,192 @@
+
+
+* Component with sub components
+* More than one query running at same time in same editor
+* Reusable in popup like in Dashboard
+* Result popup explorer
+* Preso/Notebook mode
+
+* Buttons on middle line
+
+* Query History versioning (execution/saved later)
+
+* Scheduling + notifications + sharing
+
+* Js executor
+* Proxy executor
+
+ ## March update
+
+Summary: [connectors](docs/designs/connectors.md) are becoming the source of truth (both for API and UI)
+
+* Standardize how to use the dialect names (cf. from notebook type, snippet connector, snippet type)
+* Connectors are replacing Computes? [agreed]
+* Namespace: utility still to browse DB without a compute. One idea would be to use connectors as well. So independent (bit like File connectors, but a HMS connector could be linked to a Hive connector and we transparently handle both or more. Could be HMS, or Atlas data catalog,..) and good timing when working on the specific left panels like 'catalogs', 'schemas', 'ksql streams', 'ksql topics'. etc..
+* Could add optional FK to Connector (to handle more than one dialect instance) e.g. list all mysql queries as by default we should list only hive queries of hive connector X when opening it in the editor
+
+
+So overall moving everything to connectors, handy for storing their custom properties there too and removing all the hardcoding. Then last step would be to add SQL properties like schema left assist panel, has UDF doc, has query browser, has language references so that it is truly refactored.
+
+### API
+
+Editor document type: if not a 'notebook', 'query-[dialect-name]' like in v1.
+
+    /notebook/api/get_history?doc_type=mysql&...
+    /notebook/api/execute/9 [connector id]
+
+    /desktop/api2/docs/?type=query-mysql&...
+
+Document2
+
+    type: query-impala
+    connector: FK to connector ID [to add]
+
+### Examples
+
+**Document types**
+
+    directory
+    gist
+    oozie-bundle2
+    oozie-coordinator2
+    oozie-workflow2
+    query-athena
+    query-bigquery
+    query-es
+    query-flink
+    query-hive
+    query-impala
+    query-ksql
+    query-mysql
+    query-phoenix
+    query-postgresql
+    query-presto
+    query-sparksql
+    query-sql
+    search-dashboard
+
+
+**Saved Query**
+
+    {
+      "description": "",
+      "directoryUuid": "",
+      "executingAllIndex": 0,
+      "id": null,
+      "isExecutingAll": false,
+      "isHidingCode": false,
+      "isHistory": false,
+      "isManaged": false,
+      "isPresentationModeDefault": false,
+      "isSaved": false,
+      "name": "Abc",
+      "parentSavedQueryUuid": null,
+      "presentationSnippets": {},
+      "result": {},
+      "sessions": [
+        {
+          "type": "9",
+          "id": null,
+          "properties": []
+        }
+      ],
+      "snippets": [
+        {
+          "aceCursorPosition": null,
+          "aceSize": 100,
+          "executor": {
+            "executables": [
+              {
+                "executeEnded": 0,
+                "executeStarted": 0,
+                "handle": {
+                  "statement_id": 0
+                },
+                "id": "d9c7ef6e-3d11-3b1d-ca0d-019a1ddb5257",
+                "logs": {
+                  "jobs": [],
+                  "errors": []
+                },
+                "lost": false,
+                "observerState": {
+                  "result-chart": {
+                    "chartYMulti": []
+                  }
+                },
+                "progress": 0,
+                "status": "ready",
+                "type": "sqlExecutable",
+                "database": "default",
+                "parsedStatement": {
+                  "type": "statement",
+                  "statement": "sss",
+                  "location": {
+                    "first_line": 1,
+                    "last_line": 1,
+                    "first_column": 0,
+                    "last_column": 3
+                  },
+                  "firstToken": "sss"
+                }
+              }
+            ]
+          },
+          "connector": {
+            "name": "MySql",
+            "type": "9",
+            "displayName": "MySql",
+            "buttonName": "Query",
+            "tooltip": "9 Query",
+            "page": "/editor/?type=9",
+            "is_sql": true,
+            "dialect": "mysql",
+            "dialect_properties": {
+              "is_sql": true,
+              "sql_identifier_quote": "`",
+              "sql_identifier_comment_single": "--",
+              "has_catalog": true,
+              "has_database": true,
+              "has_table": true,
+              "has_live_queries": false,
+              "has_optimizer_risks": false,
+              "has_optimizer_values": false,
+              "has_auto_limit": false
+            }
+          },
+          "currentQueryTab": "queryHistory",
+          "database": "default",
+          "id": "d2132c2b-b7f6-2696-265e-4ebaa576ff17",
+          "is_redacted": false,
+          "lastAceSelectionRowOffset": 0,
+          "lastExecuted": 0,
+          "name": "",
+          "namespace": {
+            "id": "default",
+            "name": "default",
+            "status": "CREATED",
+            "computes": [
+              {
+                "id": "default",
+                "name": "default",
+                "type": "direct",
+                "credentials": {}
+              }
+            ]
+          },
+          "pinnedContextTabs": [],
+          "properties": {},
+          "settingsVisible": false,
+          "showLogs": true,
+          "statement_raw": "sss",
+          "statementPath": "",
+          "statementType": "text",
+          "status": "ready",
+          "type": "mysql",
+          "variables": [],
+          "wasBatchExecuted": false
+        }
+      ],
+      "type": "query-9",
+      "uuid": "51eac6cf-6df8-ecab-5089-927c0287718a",
+      "viewSchedulerId": ""
+    }