I am trying to insert single row of data into my demo project at Google Big Query. I am using PHP Google Cloud client library:
# Imports the Google Cloud client library
use Google\Cloud\BigQuery\BigQueryClient;
Creating tables or dataset works fine. But when i am trying normal insert with following code:
# Instantiates a client
$bigQuery = new BigQueryClient( [
'projectId' => $projectId
] );
# The name for the new dataset
$datasetName = 'demo';
$tablaName = "demo";
$table = $bigQuery->dataset( $datasetName )
->table( $tablaName );
$row = [
'city' => 'Detroit',
'state' => 'MI',
'home' => 'black'
];
$insertResponse = $table->insertRow($row, [
'insertId' => '1'
]);
I get just empty page, without any errors. If (for testing purposes) i am changing one of the data field names (let say "city" to non existing one "cityyy" - then i am getting errors that there are no such field with given name - it means that request works fine, but why i am getting empty white page? and no new rows are inserted into my demo table (i am checkint it with Big Query UI)?
Any thoughts?