public Map<String, TableMeta> loadTableMeta(List<String> tables) throws DataXException {
        Map<String, TableMeta> tableMetas = new HashMap();

        try (Statement stmt = conn.createStatement()) {
            ResultSet rs = stmt.executeQuery("show stables");
            while (rs.next()) {
                TableMeta tableMeta = buildSupTableMeta(rs);
                if (!tables.contains(tableMeta.tbname))
                    continue;
                tableMetas.put(tableMeta.tbname, tableMeta);
            }

            rs = stmt.executeQuery("show tables");
            while (rs.next()) {
                TableMeta tableMeta = buildSubTableMeta(rs);
                if (!tables.contains(tableMeta.tbname))
                    continue;
                tableMetas.put(tableMeta.tbname, tableMeta);
            }

            for (String tbname : tables) {
                if (!tableMetas.containsKey(tbname)) {
                    throw DataXException.asDataXException(TDengineWriterErrorCode.RUNTIME_EXCEPTION, "table metadata of " + tbname + " is empty!");
                }
            }
        } catch (SQLException e) {
            throw DataXException.asDataXException(TDengineWriterErrorCode.RUNTIME_EXCEPTION, e.getMessage());
        }
        return tableMetas;
    }
@Test
    public void loadTableMeta() throws SQLException {
        // given
        SchemaManager schemaManager = new SchemaManager(conn);
        List<String> tables = Arrays.asList("stb1", "stb2", "tb1", "tb3", "weather");

        // when
        Map<String, TableMeta> tableMetaMap = schemaManager.loadTableMeta(tables);

        // then
        TableMeta stb1 = tableMetaMap.get("stb1");
        Assert.assertEquals(TableType.SUP_TABLE, stb1.tableType);
        Assert.assertEquals("stb1", stb1.tbname);
        Assert.assertEquals(3, stb1.columns);
        Assert.assertEquals(1, stb1.tags);
        Assert.assertEquals(2, stb1.tables);

        TableMeta tb3 = tableMetaMap.get("tb3");
        Assert.assertEquals(TableType.SUB_TABLE, tb3.tableType);
        Assert.assertEquals("tb3", tb3.tbname);
        Assert.assertEquals(4, tb3.columns);
        Assert.assertEquals("stb2", tb3.stable_name);

        TableMeta weather = tableMetaMap.get("weather");
        Assert.assertEquals(TableType.NML_TABLE, weather.tableType);
        Assert.assertEquals("weather", weather.tbname);
        Assert.assertEquals(6, weather.columns);
        Assert.assertNull(weather.stable_name);
    }