PHP Класс Google\Cloud\BigQuery\Job

Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Google\Cloud\BigQuery\Connection\ConnectionInterface $connection, string $id, string $projectId, array $info = [], ValueMapper $mapper = null )
cancel ( array $options = [] ) Requests that a job be cancelled. You will need to poll the job to ensure the cancel request successfully goes through.
exists ( ) : boolean Check whether or not the job exists.
id ( ) : string Retrieves the job's ID.
identity ( ) : array Retrieves the job's identity.
info ( array $options = [] ) : array Retrieves the job's details. If no job data is cached a network request will be made to retrieve it.
isComplete ( array $options = [] ) : boolean Checks the job's completeness. Useful in combination with {@see Google\Cloud\BigQuery\Job::reload()} to poll for job status.
queryResults ( array $options = [] ) : QueryResults Retrieves the results of a query job.
reload ( array $options = [] ) : array Triggers a network request to reload the job's details.

Описание методов

__construct() публичный Метод

public __construct ( Google\Cloud\BigQuery\Connection\ConnectionInterface $connection, string $id, string $projectId, array $info = [], ValueMapper $mapper = null )
$connection Google\Cloud\BigQuery\Connection\ConnectionInterface Represents a connection to BigQuery.
$id string The job's ID.
$projectId string The project's ID.
$info array [optional] The job's metadata.
$mapper ValueMapper Maps values between PHP and BigQuery.

cancel() публичный Метод

Example: $job->cancel(); $isComplete = $job->isComplete(); while (!$isComplete) { sleep(1); // let's wait for a moment... $job->reload(); $isComplete = $job->isComplete(); } echo 'Job successfully cancelled.';
См. также: https://cloud.google.com/bigquery/docs/reference/v2/jobs/cancel Jobs cancel API documentation.
public cancel ( array $options = [] )
$options array [optional] Configuration options.

exists() публичный Метод

Example: echo $job->exists();
public exists ( ) : boolean
Результат boolean

id() публичный Метод

Example: echo $job->id();
public id ( ) : string
Результат string

identity() публичный Метод

An identity provides a description of a nested resource. Example: echo $job->identity()['projectId'];
public identity ( ) : array
Результат array

info() публичный Метод

Example: $info = $job->info(); echo $info['statistics']['startTime'];
См. также: https://cloud.google.com/bigquery/docs/reference/v2/jobs#resource Jobs resource documentation.
public info ( array $options = [] ) : array
$options array [optional] Configuration options.
Результат array

isComplete() публичный Метод

Example: $isComplete = $job->isComplete(); while (!$isComplete) { sleep(1); // let's wait for a moment... $job->reload(); $isComplete = $job->isComplete(); } echo 'Query complete!';
public isComplete ( array $options = [] ) : boolean
$options array [optional] Configuration options.
Результат boolean

queryResults() публичный Метод

Example: $queryResults = $job->queryResults();
См. также: https://cloud.google.com/bigquery/docs/reference/v2/jobs/getQueryResults Jobs getQueryResults API documentation.
public queryResults ( array $options = [] ) : QueryResults
$options array [optional] { Configuration options. @type int $maxResults Maximum number of results to read. @type int $startIndex Zero-based index of the starting row. @type int $timeoutMs How long to wait for the query to complete, in milliseconds. **Defaults to** `10000` milliseconds (10 seconds). }
Результат QueryResults

reload() публичный Метод

Example: echo $job->isComplete(); // false sleep(1); // let's wait for a moment... $job->reload(); // execute a network request echo $job->isComplete(); // true
См. также: https://cloud.google.com/bigquery/docs/reference/v2/jobs/get Jobs get API documentation.
public reload ( array $options = [] ) : array
$options array [optional] Configuration options.
Результат array