The following BigQuery configuration parameters are supported:
project_id - (String) Identifier for a BigQuery project. (The
parameter project is 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
parameter keyfile is considered deprecated, but may also be used.)
endpoint - (String) Override of the endpoint host name, or nil
to use the default endpoint.
scope - (String, Array
retries - (Integer) Number of times to retry requests on server
error.
timeout - (Integer) Default timeout to use in requests.
Yields
(Google::Cloud.configure.bigquery)
Returns
(Google::Cloud::Config) โ The configuration object the
Google::Cloud::Bigquery library uses.
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.
Parameters
project_id (String) (defaults to: nil) โ Identifier for a BigQuery project. If not
present, the default project for the credentials is used.
credentials (String, Hash, Google::Auth::Credentials) (defaults to: nil) โ The path to
the keyfile as a String, the contents of the keyfile as a Hash, or a
Google::Auth::Credentials object. (See Credentials)
scope (String, Array<String>) (defaults to: nil) โ
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# BigQuery API - Module Google::Cloud::Bigquery (v1.55.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.55.0 (latest)](/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery)\n- [1.54.0](/ruby/docs/reference/google-cloud-bigquery/1.54.0/Google-Cloud-Bigquery)\n- [1.53.0](/ruby/docs/reference/google-cloud-bigquery/1.53.0/Google-Cloud-Bigquery)\n- [1.52.1](/ruby/docs/reference/google-cloud-bigquery/1.52.1/Google-Cloud-Bigquery)\n- [1.51.1](/ruby/docs/reference/google-cloud-bigquery/1.51.1/Google-Cloud-Bigquery)\n- [1.50.0](/ruby/docs/reference/google-cloud-bigquery/1.50.0/Google-Cloud-Bigquery)\n- [1.49.1](/ruby/docs/reference/google-cloud-bigquery/1.49.1/Google-Cloud-Bigquery)\n- [1.48.1](/ruby/docs/reference/google-cloud-bigquery/1.48.1/Google-Cloud-Bigquery)\n- [1.47.0](/ruby/docs/reference/google-cloud-bigquery/1.47.0/Google-Cloud-Bigquery)\n- [1.46.1](/ruby/docs/reference/google-cloud-bigquery/1.46.1/Google-Cloud-Bigquery)\n- [1.45.0](/ruby/docs/reference/google-cloud-bigquery/1.45.0/Google-Cloud-Bigquery)\n- [1.44.2](/ruby/docs/reference/google-cloud-bigquery/1.44.2/Google-Cloud-Bigquery)\n- [1.43.1](/ruby/docs/reference/google-cloud-bigquery/1.43.1/Google-Cloud-Bigquery)\n- [1.42.0](/ruby/docs/reference/google-cloud-bigquery/1.42.0/Google-Cloud-Bigquery)\n- [1.41.0](/ruby/docs/reference/google-cloud-bigquery/1.41.0/Google-Cloud-Bigquery)\n- [1.40.0](/ruby/docs/reference/google-cloud-bigquery/1.40.0/Google-Cloud-Bigquery)\n- [1.39.0](/ruby/docs/reference/google-cloud-bigquery/1.39.0/Google-Cloud-Bigquery)\n- [1.38.1](/ruby/docs/reference/google-cloud-bigquery/1.38.1/Google-Cloud-Bigquery) \nReference documentation and code samples for the BigQuery API module Google::Cloud::Bigquery.\n\nGoogle Cloud BigQuery\n---------------------\n\nGoogle BigQuery enables super-fast, SQL-like queries against massive\ndatasets, using the processing power of Google's infrastructure.\n\nSee [BigQuery Overview](./index.html \"BigQuery Overview\").\n\nMethods\n-------\n\n### .configure\n\n def self.configure() -\u003e Google::Cloud::Config\n\nConfigure the Google Cloud BigQuery library.\n\nThe following BigQuery configuration parameters are supported:\n\n- `project_id` - (String) Identifier for a BigQuery project. (The parameter `project` is considered deprecated, but may also be used.)\n- `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](/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Credentials \"Google::Cloud::Bigquery::Credentials (class)\")) (The parameter `keyfile` is considered deprecated, but may also be used.)\n- `endpoint` - (String) Override of the endpoint host name, or `nil` to use the default endpoint.\n- `scope` - (String, Array\n- `retries` - (Integer) Number of times to retry requests on server error.\n- `timeout` - (Integer) Default timeout to use in requests. \n**Yields**\n\n- (Google::Cloud.configure.bigquery) \n**Returns**\n\n- (Google::Cloud::Config) --- The configuration object the Google::Cloud::Bigquery library uses.\n\n### .new\n\n def self.new(project_id: nil, credentials: nil, scope: nil, retries: nil, timeout: nil, endpoint: nil, project: nil, keyfile: nil, universe_domain: nil) -\u003e Google::Cloud::Bigquery::Project\n\nCreates a new `Project` instance connected to the BigQuery service.\nEach call creates a new connection.\n\n\n\u003cbr /\u003e\n\nFor more information on connecting to Google Cloud see the\n[Authentication Guide](./AUTHENTICATION \"Authentication Guide\"). \n**Parameters**\n\n- **project_id** (String) *(defaults to: nil)* --- Identifier for a BigQuery project. If not present, the default project for the credentials is used.\n- **credentials** (String, Hash, Google::Auth::Credentials) *(defaults to: nil)* --- The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object. (See [Credentials](/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Credentials \"Google::Cloud::Bigquery::Credentials (class)\"))\n- **scope** (String, Array\\\u003cString\\\u003e) *(defaults to: nil)* ---\n\n The OAuth 2.0 scopes controlling\n the set of resources and operations that the connection can access.\n See # [Using OAuth 2.0 to Access Google #\n APIs](https://developers.google.com/identity/protocols/OAuth2).\n\n The default scope is:\n - `https://www.googleapis.com/auth/bigquery`\n- **retries** (Integer) *(defaults to: nil)* --- Number of times to retry requests on server error. The default value is `5`. Optional.\n- **timeout** (Integer) *(defaults to: nil)* --- Default timeout to use in requests. Optional.\n- **endpoint** (String) *(defaults to: nil)* --- Override of the endpoint host name. Optional. If the param is nil, uses the default endpoint.\n- **project** (String) *(defaults to: nil)* --- Alias for the `project_id` argument. Deprecated.\n- **keyfile** (String) *(defaults to: nil)* --- Alias for the `credentials` argument. Deprecated. \n**Returns**\n\n- ([Google::Cloud::Bigquery::Project](./Google-Cloud-Bigquery-Project)) \n**Raises**\n\n- (ArgumentError)\n**Example** \n\n```ruby\nrequire \"google/cloud/bigquery\"\n\nbigquery = Google::Cloud::Bigquery.new\ndataset = bigquery.dataset \"my_dataset\"\ntable = dataset.table \"my_table\"\n```\n\nConstants\n---------\n\n### VERSION\n\n**value:**\"1.55.0\".freeze"]]