Module: Google::Cloud::Bigquery
- Defined in:
 - lib/google/cloud/bigquery.rb,
lib/google/cloud/bigquery/job.rb,
lib/google/cloud/bigquery/data.rb,
lib/google/cloud/bigquery/time.rb,
lib/google/cloud/bigquery/table.rb,
lib/google/cloud/bigquery/schema.rb,
lib/google/cloud/bigquery/convert.rb,
lib/google/cloud/bigquery/dataset.rb,
lib/google/cloud/bigquery/project.rb,
lib/google/cloud/bigquery/service.rb,
lib/google/cloud/bigquery/version.rb,
lib/google/cloud/bigquery/copy_job.rb,
lib/google/cloud/bigquery/external.rb,
lib/google/cloud/bigquery/job/list.rb,
lib/google/cloud/bigquery/load_job.rb,
lib/google/cloud/bigquery/query_job.rb,
lib/google/cloud/bigquery/table/list.rb,
lib/google/cloud/bigquery/credentials.rb,
lib/google/cloud/bigquery/extract_job.rb,
lib/google/cloud/bigquery/dataset/list.rb,
lib/google/cloud/bigquery/project/list.rb,
lib/google/cloud/bigquery/schema/field.rb,
lib/google/cloud/bigquery/dataset/access.rb,
lib/google/cloud/bigquery/insert_response.rb,
lib/google/cloud/bigquery/table/async_inserter.rb,
lib/google/cloud/bigquery/encryption_configuration.rb 
Overview
Google Cloud BigQuery
Google BigQuery enables super-fast, SQL-like queries against massive datasets, using the processing power of Google's infrastructure.
See BigQuery Overview.
Defined Under Namespace
Modules: External Classes: CopyJob, Credentials, Data, Dataset, EncryptionConfiguration, ExtractJob, InsertResponse, Job, LoadJob, Project, QueryJob, Schema, Table, Time
Constant Summary collapse
- VERSION =
 "1.7.1".freeze
Class Method Summary collapse
- 
  
    
      .configure {|Google::Cloud.configure.bigquery| ... } ⇒ Google::Cloud::Config 
    
    
  
  
  
  
  
  
  
  
  
    
Configure the Google Cloud BigQuery library.
 - 
  
    
      .new(project_id: nil, credentials: nil, scope: nil, retries: nil, timeout: nil, project: nil, keyfile: nil)  ⇒ Google::Cloud::Bigquery::Project 
    
    
  
  
  
  
  
  
  
  
  
    
Creates a new
Projectinstance connected to the BigQuery service. 
Class Method Details
.configure {|Google::Cloud.configure.bigquery| ... } ⇒ Google::Cloud::Config
Configure the Google Cloud BigQuery library.
The following BigQuery configuration parameters are supported:
project_id- (String) Identifier for a BigQuery project. (The parameterprojectis considered deprecated, but may also be used.)credentials- (String, Hash, Google::Auth::Credentials) The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object. (See Credentials) (The parameterkeyfileis considered deprecated, but may also be used.)scope- (String, Array) The OAuth 2.0 scopes controlling the set of resources and operations that the connection can access. retries- (Integer) Number of times to retry requests on server error.timeout- (Integer) Default timeout to use in requests.
      109 110 111 112 113  | 
    
      # File 'lib/google/cloud/bigquery.rb', line 109 def self.configure yield Google::Cloud.configure.bigquery if block_given? Google::Cloud.configure.bigquery end  | 
  
.new(project_id: nil, credentials: nil, scope: nil, retries: nil, timeout: nil, project: nil, keyfile: nil) ⇒ Google::Cloud::Bigquery::Project
Creates a new Project instance connected to the BigQuery service.
Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
      67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87  | 
    
      # File 'lib/google/cloud/bigquery.rb', line 67 def self.new project_id: nil, credentials: nil, scope: nil, retries: nil, timeout: nil, project: nil, keyfile: nil project_id ||= (project || default_project_id) project_id = project_id.to_s # Always cast to a string raise ArgumentError, "project_id is missing" if project_id.empty? scope ||= configure.scope retries ||= configure.retries timeout ||= configure.timeout credentials ||= (keyfile || default_credentials(scope: scope)) unless credentials.is_a? Google::Auth::Credentials credentials = Bigquery::Credentials.new credentials, scope: scope end Bigquery::Project.new( Bigquery::Service.new( project_id, credentials, retries: retries, timeout: timeout ) ) end  |