google / cloud-bigquery
BigQuery Client for PHP
Requires
- php: ^8.0
- google/cloud-core: ^1.55
- ramsey/uuid: ^3.0|^4.0
Requires (Dev)
- erusev/parsedown: ^1.6
- google/cloud-storage: ^1.3
- phpdocumentor/reflection: ^5.3.3
- phpdocumentor/reflection-docblock: ^5.3
- phpspec/prophecy-phpunit: ^2.0
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: 2.*
Suggests
- google/cloud-storage: Makes it easier to load data from Cloud Storage into BigQuery
- dev-main
- v1.31.0
- v1.30.3
- v1.30.2
- v1.30.1
- v1.30.0
- v1.29.1
- v1.29.0
- v1.28.3
- v1.28.2
- v1.28.1
- v1.28.0
- v1.27.0
- v1.26.1
- v1.26.0
- v1.25.1
- v1.25.0
- v1.24.2
- v1.24.1
- v1.24.0
- v1.23.10
- v1.23.9
- v1.23.8
- v1.23.7
- v1.23.6
- v1.23.5
- v1.23.4
- v1.23.3
- v1.23.2
- v1.23.1
- v1.23.0
- v1.22.2
- v1.22.1
- v1.22.0
- v1.21.0
- v1.20.1
- v1.20.0
- v1.19.0
- v1.18.0
- v1.17.0
- v1.16.0
- v1.15.1
- v1.15.0
- v1.14.0
- v1.13.0
- v1.12.2
- v1.12.1
- v1.12.0
- v1.11.0
- v1.10.0
- v1.9.0
- v1.8.0
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.6
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.6.0
- v0.5.0
- v0.4.0
- v0.3.1
- v0.3.0
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.0
This package is auto-updated.
Last update: 2024-10-28 04:41:27 UTC
README
Idiomatic PHP client for Google BigQuery.
NOTE: This repository is part of Google Cloud PHP. Any support requests, bug reports, or development contributions should be directed to that project.
Allows you to create, manage, share and query data.
Installation
To begin, install the preferred dependency manager for PHP, Composer.
Now install this component:
$ composer require google/cloud-bigquery
Authentication
Please see our Authentication guide for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.
Sample
require 'vendor/autoload.php'; use Google\Cloud\BigQuery\BigQueryClient; $bigQuery = new BigQueryClient(); // Get an instance of a previously created table. $dataset = $bigQuery->dataset('my_dataset'); $table = $dataset->table('my_table'); // Begin a job to import data from a CSV file into the table. $loadJobConfig = $table->load( fopen('/data/my_data.csv', 'r') ); $job = $table->runJob($loadJobConfig); // Run a query and inspect the results. $queryJobConfig = $bigQuery->query( 'SELECT * FROM `my_project.my_dataset.my_table`' ); $queryResults = $bigQuery->runQuery($queryJobConfig); foreach ($queryResults as $row) { print_r($row); }
Version
This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.
Next Steps
- Understand the official documentation.
- Take a look at in-depth usage samples.