Schema Table Datanode Table type Subtables Database
CUSTDB PARTY_ROLE custdb_01 SHARDING CUSTDB_01
CUSTDB PARTY_ROLE custdb_02 SHARDING CUSTDB_02
CUSTDB PARTY_ROLE custdb_03 SHARDING CUSTDB_03
awk 'NR>1 && $4=="SHARDING" {print $2}' data.txt | sort -u
注释:
NR>1 :跳过标题行(第一行)。
$4 :第 4 列(Table type)。
$2 :第 2 列(Table 名称)。
输出所有符合条件的表名(每行一个)。