Topik ini menjelaskan cara mengambil nama tabel data dalam instance Tablestore menggunakan Tablestore SDK for Java.
Prasyarat
Klien telah diinisialisasi. Untuk informasi lebih lanjut, lihat Initialize a Tablestore client.
Metode
public ListTableResponse listTable() throws TableStoreException, ClientExceptionContoh kode
Berikut adalah contoh kode yang menunjukkan cara mengambil nama tabel data dalam sebuah instance dan mencetak nama-nama tersebut:
public static void listTableExample(SyncClient client) {
ListTableResponse response = client.listTable();
for(String tableName : response.getTableNames()) {
System.out.println(tableName);
}
}Referensi
Untuk informasi lebih lanjut, lihat Query the names of time series tables.