PHP 클래스 Google\Cloud\BigQuery\Job

파일 보기 프로젝트 열기: GoogleCloudPlatform/gcloud-php

공개 메소드들

메소드 설명
__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