Skip to content

Commit

Permalink
Add BigQueryDataTransfer (#811)
Browse files Browse the repository at this point in the history
* Update README and composer.json

* Remove doc links

* Update composer and README
  • Loading branch information
michaelbausor authored and jdpedrie committed Dec 22, 2017
1 parent ed7b7c0 commit f409de0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ This client supports the following Google Cloud Platform services at a [Beta](#v
This client supports the following Google Cloud Platform services at an [Alpha](#versioning) quality level:
* [Google Cloud Speech](#google-cloud-speech-alpha) (Alpha)
* [Google Stackdriver Trace](#google-stackdriver-trace-alpha) (Alpha)
* [Google Cloud BigQuery Data Transfer](#google-cloud-bigquerydatatransfer-alpha) (Alpha)

If you need support for other Google APIs, please check out the [Google APIs Client Library for PHP](https://github.com/google/google-api-php-client).

Expand Down Expand Up @@ -899,6 +900,36 @@ Stackdriver Trace can be installed separately by requiring the `google/cloud-tra
$ composer require google/cloud-trace
```

## Google Cloud BigQuery Data Transfer (Alpha)

- [Source Code](https://github.com/GoogleCloudPlatform/google-cloud-php-bigquerydatatransfer)

**NOTE:** The BigQuery Data Transfer client library is not included in
google/cloud, and must be installed separately. See below for installation
instructions.

#### Preview

```php
require 'vendor/autoload.php';

use Google\Cloud\BigQuery\DataTransfer\V1\DataTransferServiceClient;

$dataTransferServiceClient = new DataTransferServiceClient();
$projectId = '[MY_PROJECT_ID]';
$location = 'us-central1';
$formattedLocation = $dataTransferServiceClient->locationName($projectId, $location);
$dataSources = $dataTransferServiceClient->listDataSources($formattedLocation);
```

#### google/cloud-bigquerydatatransfer

Google Cloud BigQuery Data Transfer **must** be installed separately by requiring the `google/cloud-bigquerydatatransfer` composer package:

```
$ composer require google/cloud-bigquerydatatransfer
```

## Caching Access Tokens

By default the library will use a simple in-memory caching implementation, however it is possible to override this behavior by passing a [PSR-6](http://www.php-fig.org/psr/psr-6/) caching implementation in to the desired client.
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"monolog/monolog": "~1",
"psr/http-message": "1.0.*",
"ramsey/uuid": "~3",
"google/proto-client": "0.29.0",
"google/gax": "0.28.0"
"google/proto-client": "^0.29.0",
"google/gax": "^0.28.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.0",
Expand Down Expand Up @@ -87,7 +87,8 @@
"google/cloud-vision": "0.8.0"
},
"suggest": {
"phpseclib/phpseclib": "May be used in place of OpenSSL for creating signed Cloud Storage URLs. Please require version ^2."
"phpseclib/phpseclib": "May be used in place of OpenSSL for creating signed Cloud Storage URLs. Please require version ^2.",
"google/cloud-bigquerydatatransfer": "Client library for the BigQuery Data Transfer API."
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit f409de0

Please sign in to comment.