承接 schulzefelix/laravel-bigquery 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

schulzefelix/laravel-bigquery

最新稳定版本:1.7.0

Composer 安装命令:

composer require schulzefelix/laravel-bigquery

包简介

无描述信息

关键字:

README 文档

README

Latest Version Software License Build Status Quality Score StyleCI Latest Version on Packagist Total Downloads

Using this package you can easily interact with the Google BigQuery API.

Install

This package can be installed through Composer.

composer require schulzefelix/laravel-bigquery

Optionally, you can publish the config file of this package with this command:

php artisan vendor:publish --provider="SchulzeFelix\BigQuery\BigQueryServiceProvider"

The following config file will be published in config/bigquery.php

return [
 
    /*
    |--------------------------------------------------------------------------
    | Application Credentials
    |--------------------------------------------------------------------------
    |
    | Path to the Service Account Credentials JSON File
    |
    | https://googlecloudplatform.github.io/google-cloud-php/#/docs/google-cloud/v0.35.0/guides/authentication
    |
    */
 
    'application_credentials' => env('GOOGLE_CLOUD_APPLICATION_CREDENTIALS'),


    /*
    | OPTIONAL:
    | Use keyFile to use a json config from the current environment.
    | For example secrets in laravel vapor
    |
    | https://docs.vapor.build/1.0/projects/environments.html#secrets
    */
    //'keyFile' => json_decode(trim(env('GOOGLE_CLOUD_APPLICATION_CREDENTIALS')), true),
 
    /*
    |--------------------------------------------------------------------------
    | Project ID
    |--------------------------------------------------------------------------
    |
    | The Project Name is a user-friendly name,
    | while the Project ID is required by the Google Cloud client libraries to authenticate API requests.
    |
    */
 
    'project_id' => env('GOOGLE_CLOUD_PROJECT_ID'),
 
    /*
    |--------------------------------------------------------------------------
    | Client Auth Cache Store
    |--------------------------------------------------------------------------
    |
    | This option controls the auth cache connection that gets used.
    |
    | Supported: "apc", "array", "database", "file", "memcached", "redis"
    |
    */
 
    'auth_cache_store' => 'file',
 
    /*
    |--------------------------------------------------------------------------
    | Client Options
    |--------------------------------------------------------------------------
    |
    | Here you may configure additional parameters that
    | the underlying BigQueryClient will use.
    |
    | Optional parameters: "authCacheOptions", "authHttpHandler", "httpHandler", "retries", "scopes", "returnInt64AsObject"
    */
 
    'client_options' => [
        'retries' => 3, // Default
    ],
    
    /*
    |--------------------------------------------------------------------------
    | Dataset location
    |--------------------------------------------------------------------------
    |
    | Specify the dataset location.
    |
    | Supported values can be found at https://cloud.google.com/bigquery/docs/locations
    |
    */

    'location' => '',
];

Usage

This package just initialize the BigQuery connection, you can use every method like in Google's API. You can use the provided Facade or retrieve the it from the IoC Container.

BigQuery::apiMethod();
 
app('bigquery')->apiMethod();

Here are two basic example to create a dataset and check for existence of a table

Create Dataset

$dataset = BigQuery::createDataset('myNewDataSet');

Check Existence Of A Table

BigQuery::dataset(myNewDataSet)->table('aTable')->exists());

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ vendor/bin/phpunit

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email github@schulze.co instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 298.92k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 35
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 35
  • Watchers: 3
  • Forks: 21
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知