Skip to content

Commit

Permalink
feat: Add support for BigQuery Models. (#2039)
Browse files Browse the repository at this point in the history
* feat: adds support for BigQuery ML Models

  * Updated discovery doc for bigquery
  * Created model class
  * Added model and models methods to BigQuery\Dataset client
  * Added network calls to ConnectionInterface and Rest connection

* fix: modifies order of params to prevent accidental overwrites

* Address review feedback

* Address review comments

* add param description
  • Loading branch information
danielgsims authored and jdpedrie committed Jul 22, 2019
1 parent a0ae202 commit e2e006f
Show file tree
Hide file tree
Showing 11 changed files with 4,656 additions and 2,552 deletions.
24 changes: 24 additions & 0 deletions BigQuery/src/Connection/ConnectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,28 @@ public function insertJobUpload(array $args = []);
* @return array
*/
public function getServiceAccount(array $args = []);

/**
* @param array $args
* @return array
*/
public function getModel(array $args = []);

/**
* @param array $args
* @return array
*/
public function deleteModel(array $args = []);

/**
* @param array $args
* @return array
*/
public function patchModel(array $args = []);

/**
* @param array $args
* @return array
*/
public function listModels(array $args = []);
}
36 changes: 36 additions & 0 deletions BigQuery/src/Connection/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,40 @@ private function resolveUploadOptions(array $args)

return $args;
}

/**
* @param array $args
* @return array
*/
public function getModel(array $args = [])
{
return $this->send('models', 'get', $args);
}

/**
* @param array $args
* @return array
*/
public function deleteModel(array $args = [])
{
return $this->send('models', 'delete', $args);
}

/**
* @param array $args
* @return array
*/
public function patchModel(array $args = [])
{
return $this->send('models', 'patch', $args);
}

/**
* @param array $args
* @return array
*/
public function listModels(array $args = [])
{
return $this->send('models', 'list', $args);
}
}
Loading

0 comments on commit e2e006f

Please sign in to comment.