Giter VIP home page Giter VIP logo

laravel-bigquery's Introduction

Laravel BigQuery

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

For Laravel 5.8, use version 1.1.2 of this package!

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'),
 
    /*
    |--------------------------------------------------------------------------
    | 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
    ],
];

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 [email protected] instead of using the issue tracker.

Credits

License

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

laravel-bigquery's People

Contributors

schulzefelix avatar babisp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.