pan3793 commented on code in PR #3185:
URL: https://github.com/apache/incubator-kyuubi/pull/3185#discussion_r951032631


##########
docs/extensions/engines/spark/lineage.md:
##########
@@ -0,0 +1,168 @@
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements.  See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
+
+# SQL Lineage Support
+
+When we execute a SQL statement, the computing engine will return to a result 
set,
+each column in the result set may originate from different tables, and these 
different
+tables depend on other tables, which may have been calculated by functions, 
aggregation, etc.
+The source table is related to the result set, which is the SQL Lineage.
+
+## Introduction
+
+The current lineage parsing functionality is implemented as a plugin by 
extending Spark's `QueryExecutionListener`.
+1. The `SparkListenerSQLExecutionEnd` event is triggered after the SQL 
execution is finished and captured by the `QueryExecuctionListener`, 
+   where the SQL lineage parsing process is performed on the successfully 
executed SQL.
+2. Will write the parsed lineage information to the log file in JSON format.
+
+### Example
+
+When the following SQL is executed:
+```sql
+select a as col0, b as col1 from test_table0
+```
+The lineage of this SQL:
+```json
+{
+   "inputTables":[
+      "default.test_table0"
+   ],
+   "outputTables":[
+      
+   ],
+   "columnLineage":[
+      [

Review Comment:
   `{` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to