google / cloud-bigquery-connection
Google BigQuery 连接客户端,用于 PHP
v2.0.0
2024-09-07 00:21 UTC
Requires
- php: ^8.0
- google/gax: ^1.34.0
Requires (Dev)
- phpunit/phpunit: ^9.0
Suggests
- ext-grpc: Enables use of gRPC, a universal high-performance RPC framework created by Google.
- ext-protobuf: Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions.
This package is auto-updated.
Last update: 2024-09-07 01:43:18 UTC
README
适用于 Google BigQuery 连接 的 PHP 语言的惯用客户端。
注意: 本存储库是 Google Cloud PHP 的一部分。任何支持请求、错误报告或开发贡献都应指向该项目。
安装
首先,安装 PHP 首选的依赖项管理器 Composer。
现在安装此组件
$ composer require google/cloud-bigquery-connection
此组件支持 HTTP/1.1 上的 REST 和 gRPC。要利用 gRPC 提供的好处(如流式传输方法),请参阅我们的 gRPC 安装指南。
身份验证
有关更多关于客户端身份验证的信息,请参阅我们的 身份验证指南。身份验证后,您就可以开始发送请求了。
示例
require 'vendor/autoload.php'; use Google\Cloud\BigQuery\Connection\V1\ConnectionServiceClient; use Google\Cloud\BigQuery\Connection\V1\Connection; $projectId = '[PROJECT_ID]'; $locationId = '[LOCATION_ID]'; $connectionId = '[CONNECTION_ID]'; $client = new ConnectionServiceClient(); $parent = $client->locationName($projectId, $locationId); $connection = new Connection([ 'name' => $client->connectionName($projectId, $locationId, $connectionId), ]); $connection = $client->createConnection($parent, $connection);
版本
此组件被认为是 GA(一般可用)。因此,在所有次要或补丁版本中都不会引入向后不兼容的更改。我们将以最高优先级解决问题和请求。
下一步
- 了解 官方文档。