public Map<String, List<String>> getMartTablesInfo(JdbcLinkObject conObj, String dsName)
      throws MartBuilderException {
    Map<String, List<String>> tblColMap =
        new TreeMap<String, List<String>>(McUtils.BETTER_STRING_COMPARATOR); // see DCCTEST-491
    List<String> colList = new ArrayList<String>();
    StringBuffer sb =
        new StringBuffer(
            "select table_name,column_name,column_key "
                + "from information_schema.columns where table_schema='"
                + conObj.getDatabaseName()
                + "' and "
                + "table_name like '"
                + dsName
                + "%' order by "
                + "table_name, ordinal_position");
    String lastTableName = "";
    List<Map<String, String>> resultSet = ConnectionPool.Instance.query(conObj, sb.toString());

    for (Map<String, String> mapItem : resultSet) {
      String tableName = (String) mapItem.get("table_name");
      if (!(tableName.endsWith("__main") || tableName.endsWith("__dm"))) {
        continue;
      }
      // finish all columns in one table and move to the next, if previous table doesn't have a PK,
      // create using keyguessing
      if (!lastTableName.equals(tableName)) {
        if (!lastTableName.equals("")) {
          tblColMap.put(lastTableName, colList);
          colList = new ArrayList<String>();
        }
        // move to next table
        // clean flags
        lastTableName = tableName;
      }
      colList.add((String) mapItem.get("column_name"));
    }

    // sort column list
    Collections.sort(colList, McUtils.BETTER_STRING_COMPARATOR); // see DCCTEST-491

    if (!McUtils.isStringEmpty(lastTableName)) tblColMap.put(lastTableName, colList);

    return tblColMap;
  }