0
Google BigQuery의 테이블에서 추출한 행에서 행을 읽으려고하면 배열의 첫 번째 행만 읽습니다.Google BigQuery 배열로 행을 읽는 중
나는 그것을 다른 코드에 같은 방식으로 일을하고이 모든 행을 읽는되지 않는 이유를 모르는
<?php
function top10($chart){
$client = new Google_Client();
$client->useApplicationDefaultCredentials();
$client->addScope(Google_Service_Bigquery::BIGQUERY);
$bigquery = new Google_Service_Bigquery($client);
$projectId = 'projectID';
$request = new Google_Service_Bigquery_QueryRequest();
$query = "SELECT First_Name, Last_Name, G FROM [" . $chart. "] ORDER BY G DESC LIMIT 10";
$request->setQuery($query);
$response = $bigquery->jobs->query($projectId, $request);
$rows = $response->getRows();
$ii = 0;
$i = 0;
foreach ($rows as $row)
{
foreach ($row['f'] as $field)
{
$Info[$i][$ii] = $field['v'];
$ii++;
}
$i++;
}
}
?>