PHP code example of google / cloud-bigquery-reservation

1. Go to this page and download the library: Download google/cloud-bigquery-reservation library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

google / cloud-bigquery-reservation example snippets




use Google\Cloud\BigQuery\Reservation\V1\ReservationServiceClient;

$projectId = '[PROJECT_ID]';
$locationId = '[LOCATION_ID]';
$reservationId = '[RESERVATION_ID]';

$client = new ReservationServiceClient();
$parent = $client->locationName($projectId, $locationId);

$reservation = $client->createReservation($parent, [
    'reservationId' => $reservationId
])