I am confused in how to fetch the paginated data from bigquery in Java,
I followed the docs from bigquery but it's not clear for me
// Identify the table itself
TableId tableId = TableId.of("dataset", "table");
// Page over 100 records. If you don't need pagination, remove the pageSize parameter.
TableResult result = bigQuery.listTableData(tableId, BigQuery.TableDataListOption.pageSize(100));
// Print the records
result
.iterateAll()
.forEach(
row -> {
row.forEach(fieldValue -> System.out.print(fieldValue.toString() + ", "));
System.out.println();
});
I have doubt this query will be giving only first 100 rows, whereas I want to fetch all the data from table, for example in page 1 -> 100 rows, page 2 -> 100 rows and so on untill all data is fetched from table.
Please help me understand where I am wrong.. in the table there is 20 Million records