package test.hive;

import java.util.HashMap;
import java.util.Map;
import util.JdbcUtil;
import util.SqlUtil;

public class ConnTest {
   public static void main(String[] args) {
      String content = "{\n      \"ip_port\": \"10.11.120.15:10000\",\n      \"url\": \"jdbc:hive2://10.11.120.15:10000/discover\",\n      \"username\": \"admin\",\n      \"password\": \"admin\",\n      \"dbType\": \"hive\",\n      \"isIgnorecase\":\"1\",\n      \"excludeSchema\": [    ]}";
      JdbcUtil.initData(content);
      ConnTest c = new ConnTest();
      c.testHive();
   }

   void testHive() {
      Map<String, String> params = new HashMap();
      String sql = InsertTest.insert_3;
      params.put("sql", sql);
      params.put("dbType", "hive");
      params.put("schema", "default");
      params.put("url", "jdbc:hive2://10.11.120.15:10000/default");
      SqlUtil sqlUtil = new SqlUtil();
      System.out.println(sql);
      System.out.println("---------------------/source sql    ------------------------------------------------");
      sqlUtil.parseSqlStructure(params);
   }
}
