I want to fetch data from BigQuery and display it on website page ; however , I fetch the data using the code below ,
Integer offset = this.getPage(page, size);
String query =
String.format("select * from `COLLECTION` where status = 'FAILED' LIMIT %s OFFSET %s ;", size.toString(), offset.toString());
QueryJobConfiguration queryConfig =
QueryJobConfiguration.newBuilder(query)
.build();
TableResult queryResult = bigquery.query(queryConfig);
Iterable<FieldValueList> queryValues = queryResult.getValues();
queryValues returns the column names in property(schema) and values in another property(No page schema) . which really hard to map between row's values and column
I want to return the result like this :
"mobile_no": "011111111",
"amount": "55",
"days": "3",
to be able to construct Dto and return it in my api response