JSqlParser for Data Lineage?

We are a data warehouse development team and most of our ETL logic can be expressed as a series of SQL select statements. I am looking for a tool to extract data lineage in a structured manner by parsing the queries. The query and the simplified lineage output would look like this:Query:SELECT A AS COLUMN_1, B AS COLUMN_2, A+B AS COLUMN_SUM FROM MYTABLE;OutputCOLUMN_1: MYTABLE.ACOLUMN_2: MYTABLE.BCOLUMN_3: MYTABLE.ACOLUMN_3: MYTABLE.BIs JSQLParser a good tool for this purpose? Any pointers or experiences on how to use the tool would be appre...Read more

Access array element use JSqlParser

I insert this sql into JSqlParser: select count(distinct case when split(vir_name,"\\/")[OFFSET(0)] in ("G-Ware","RiskWare","Tool","PornWare","Trojan") then apk_name else null end) as black_apk_n from table1and get error: Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "(" at line 1, column 13. It may has something to do with array access issue, how to manage the same thing in JSqlParser?...Read more

jsqlparser - please help for CCJSqlParser issue

I use below code to get selected columns. But in the column item, why the table.getName() is alias name t1 or t2 and table.getAlias() is null?Is any sample code to get the table name(Spark_Test_1, Spark_Test_2) and the alias table name(t1,t2) in the same time?String sql = "SELECT t1.AsOfD,t1.ValidD,t1.urn,t1.Money FROM Spark_Test_1 as t1 join Spark_Test_2 as t2 on ( t1.AsOfD = t2.AsOfD)"; Statement statement = CCJSqlParserUtil.parse(sqlStr); Select selectStatement = (Select) statement; for (int i = 0; i < size; i++) { ...Read more