Google_Service_Bigquery_Jobs_Resource

The "jobs" collection of methods.

Defined (1)

The class is defined in the following location(s).

/lib/Google/Service/Bigquery.php  
  1. class Google_Service_Bigquery_Jobs_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Retrieves the specified job by ID. (jobs.get) 
  5. * @param string $projectId 
  6. * Project ID of the requested job 
  7. * @param string $jobId 
  8. * Job ID of the requested job 
  9. * @param array $optParams Optional parameters. 
  10. * @return Google_Service_Bigquery_Job 
  11. */ 
  12. public function get($projectId, $jobId, $optParams = array()) 
  13. $params = array('projectId' => $projectId, 'jobId' => $jobId); 
  14. $params = array_merge($params, $optParams); 
  15. return $this->call('get', array($params), "Google_Service_Bigquery_Job"); 
  16. /** 
  17. * Retrieves the results of a query job. (jobs.getQueryResults) 
  18. * @param string $projectId 
  19. * Project ID of the query job 
  20. * @param string $jobId 
  21. * Job ID of the query job 
  22. * @param array $optParams Optional parameters. 
  23. * @opt_param string timeoutMs 
  24. * How long to wait for the query to complete, in milliseconds, before returning. Default is to 
  25. * return immediately. If the timeout passes before the job completes, the request will fail with a 
  26. * TIMEOUT error 
  27. * @opt_param string maxResults 
  28. * Maximum number of results to read 
  29. * @opt_param string pageToken 
  30. * Page token, returned by a previous call, to request the next page of results 
  31. * @opt_param string startIndex 
  32. * Zero-based index of the starting row 
  33. * @return Google_Service_Bigquery_GetQueryResultsResponse 
  34. */ 
  35. public function getQueryResults($projectId, $jobId, $optParams = array()) 
  36. $params = array('projectId' => $projectId, 'jobId' => $jobId); 
  37. $params = array_merge($params, $optParams); 
  38. return $this->call('getQueryResults', array($params), "Google_Service_Bigquery_GetQueryResultsResponse"); 
  39. /** 
  40. * Starts a new asynchronous job. (jobs.insert) 
  41. * @param string $projectId 
  42. * Project ID of the project that will be billed for the job 
  43. * @param Google_Job $postBody 
  44. * @param array $optParams Optional parameters. 
  45. * @return Google_Service_Bigquery_Job 
  46. */ 
  47. public function insert($projectId, Google_Service_Bigquery_Job $postBody, $optParams = array()) 
  48. $params = array('projectId' => $projectId, 'postBody' => $postBody); 
  49. $params = array_merge($params, $optParams); 
  50. return $this->call('insert', array($params), "Google_Service_Bigquery_Job"); 
  51. /** 
  52. * Lists all the Jobs in the specified project that were started by the user. 
  53. * (jobs.listJobs) 
  54. * @param string $projectId 
  55. * Project ID of the jobs to list 
  56. * @param array $optParams Optional parameters. 
  57. * @opt_param string projection 
  58. * Restrict information returned to a set of selected fields 
  59. * @opt_param string stateFilter 
  60. * Filter for job state 
  61. * @opt_param bool allUsers 
  62. * Whether to display jobs owned by all users in the project. Default false 
  63. * @opt_param string maxResults 
  64. * Maximum number of results to return 
  65. * @opt_param string pageToken 
  66. * Page token, returned by a previous call, to request the next page of results 
  67. * @return Google_Service_Bigquery_JobList 
  68. */ 
  69. public function listJobs($projectId, $optParams = array()) 
  70. $params = array('projectId' => $projectId); 
  71. $params = array_merge($params, $optParams); 
  72. return $this->call('list', array($params), "Google_Service_Bigquery_JobList"); 
  73. /** 
  74. * Runs a BigQuery SQL query synchronously and returns query results if the 
  75. * query completes within a specified timeout. (jobs.query) 
  76. * @param string $projectId 
  77. * Project ID of the project billed for the query 
  78. * @param Google_QueryRequest $postBody 
  79. * @param array $optParams Optional parameters. 
  80. * @return Google_Service_Bigquery_QueryResponse 
  81. */ 
  82. public function query($projectId, Google_Service_Bigquery_QueryRequest $postBody, $optParams = array()) 
  83. $params = array('projectId' => $projectId, 'postBody' => $postBody); 
  84. $params = array_merge($params, $optParams); 
  85. return $this->call('query', array($params), "Google_Service_Bigquery_QueryResponse");