【问题标题】:How to get name of tableid of an existing Dataset in Cloud Bigquery如何在 Cloud Bigquery 中获取现有数据集的 tableid 名称
【发布时间】:2014-06-19 04:48:01
【问题描述】:
【问题讨论】:
标签:
java
google-bigquery
google-cloud-storage
【解决方案1】:
private static void listTables(Bigquery service, String projectNumber, String datasetId) throws IOException {
Bigquery.Tables.List listTablesReply = service.tables().list(projectNumber, datasetId);
TableList tableList = listTablesReply.execute();
if (tableList.getTables() != null) {
List tables = tableList.getTables();
System.out.println("Tables list:");
for (TableList.Tables table : tables) {
System.out.format("%s\n", table.getId());
}
}
}
我认为在这种情况下它会对我们有所帮助:)