i am fetching records from Google big query using gem 'google-api-client', When I fetch records from table
client.execute(api_method: @compute_api.tabledata.list,
parameters: {projectId: project,
datasetId: dataset,
tableId: table,
maxResults: 10}).body
I get response like,
{
"kind": "bigquery#tableDataList",
"etag": "\"iBDiwpngzDA0oFU52344ksWOrjA/-xEFKhLUueR63_XVaLG4z_mJt-8\"",
"totalRows": "2000113",
"pageToken": "BEIYURQ3J4AQAAAS23IIBAEAAUNAICAMCAGCBMFOCU======",
"rows": [
{
"f": [
{
"v": "11873943041"
},
{
"v": "639592585-0-1809110554@8.19.146.76"
},
{
"v": "1.430438401E9"
},
{
"v": "1.430438402E9"
},
{
"v": "1.430438404E9"
},
{
"v": "1.430438862E9"
}]}]}
Which does not have column names in it, Does anyone have any idea about how to get columns names along with data?
Currently I need to make another API request to fetch schema and get column names.