private void writeHql(ArrayList<String> colName, ArrayList<String> colType, ArrayList<String> colRemark, String tabComments) {
        StringBuffer content=new StringBuffer();
        content.append("USE "+data_db_name.toUpperCase()+";\n");
        content.append("DROP TABLE "+tn.toUpperCase()+";\n");
        content.append("CREATE TABLE "+tn.toUpperCase()+"(\n");
        for(int i=0; i<colName.size(); ++i){
            content.append("  "+String.format("%-33s", colName.get(i).replaceAll("[#|(|)]", ""))+" "+(colType.get(i).equalsIgnoreCase("ROWID")?"STRING":colType.get(i))+" COMMENT '"+colRemark.get(i).replaceAll(";","")+"'");
            if(i!=colName.size()-1)
                content.append(",\n");
            else
                content.append("\n");
        }

        if(unreptWay.equals("no")){
            content.append(")comment '"+tabComments.replaceAll(";","")+"' row format delimited fields terminated by '\\001' stored as rcfile;\n");
        }else if(unreptWay.equals("increment")){
            content.append(")comment '"+tabComments.replaceAll(";","")+"' partitioned by (CHANNEL STRING,OP_MONTH STRING) row format delimited fields terminated by '\\001' stored as rcfile;\n");
        }

        String initPath=System.getProperty("user.dir")+File.separator+projectName+"-ods"+ File.separator+"hql";
        wfa.mkdirs(initPath);
        wfa.writeFromStringBuffer(initPath+File.separator+index+"_create_"+tn+".hql","UTF-8",content);
    }