Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions bigquery/shakespeare/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Google BigQuery PHP Sample Application

## Description

This simple command-line application demonstrates how to invoke Google BigQuery from PHP.

## Build and Run
1. **Enable APIs** - [Enable the BigQuery API](https://console.cloud.google.com/flows/enableapi?apiid=bigquery)
and create a new project or select an existing project.
2. **Download The Credentials** - Click "Go to credentials" after enabling the APIs. Click "New Credentials"
and select "Service Account Key". Create a new service account, use the JSON key type, and
select "Create". Once downloaded, set the environment variable `GOOGLE_APPLICATION_CREDENTIALS`
to the path of the JSON key that was downloaded.
3. **Clone the repo** and cd into this directory

```sh
$ git clone https://github.com/GoogleCloudPlatform/php-docs-samples
$ cd php-docs-samples/bigquery/api
```
4. **Install dependencies** via [Composer](http://getcomposer.org/doc/00-intro.md).
Run `php composer.phar install` (if composer is installed locally) or `composer install`
(if composer is installed globally).
5. Run `php shakespeare.php YOUR_PROJECT_ID` to run the sample.
```

## Contributing changes

* See [CONTRIBUTING.md](../../CONTRIBUTING.md)

## Licensing

* See [LICENSE](../../LICENSE)
5 changes: 5 additions & 0 deletions bigquery/shakespeare/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"google/cloud": "^0.10.1"
}
}
Loading