@@ -0,0 +1,1525 @@
+package metadata.etl.lhotse.extractor;%0A%0Aimport metadata.etl.lhotse.LzExecMessage;%0Aimport metadata.etl.lhotse.LzTaskExecRecord;%0Aimport metadata.etl.utils.XmlParser;%0Aimport metadata.etl.utils.hiveparser.HiveSqlAnalyzer;%0Aimport metadata.etl.utils.hiveparser.HiveSqlType;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport wherehows.common.schemas.LineageRecord;%0Aimport wherehows.common.utils.ProcessUtils;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A * Created by hadoop on 5/8/17.%0A */%0Apublic class HiveSqlLineageExtractor implements BaseLineageExtractor %7B%0A%0A    private static final Logger logger = LoggerFactory.getLogger(Hive2HdfsLineageExtractor.class);%0A%0A    @Override%0A    public List%3CLineageRecord%3E getLineageRecord(String logLocation, LzExecMessage message,%0A                                                int defaultDatabaseId) %7B%0A        LzTaskExecRecord lzTaskExecRecord = message.lzTaskExecRecord;%0A        List%3CLineageRecord%3E lineageRecords = new ArrayList%3C%3E();%0A        try %7B%0A            logger.info(%22start to parse the log: %7B%7D%22, logLocation);%0A            XmlParser xmlParser = new XmlParser(logLocation);%0A            // get info from logs%0A            String sqlFilePath = xmlParser.getExtProperty(%22extProperties/entry/sql.file.name%22);%0A            long flowExecId = Long.parseLong(xmlParser.getExtProperty(%22curRunDate%22));%0A%0A            // read sql statements from sql file on ftp%0A%0A        %7D catch (Exception e) %7B%0A            e.printStackTrace();%0A        %7D%0A        return lineageRecords;%0A    %7D%0A%7D%0A

add hive sql lineage support