class ActiveRecord::Base

no-doc

Public Class Methods

big_query_connection(config) click to toggle source

Build a new BigQuery connection with the given configuration.

# File lib/active_record/connection_adapters/big_query_adapter.rb, line 17
def big_query_connection(config)
  config = config.symbolize_keys
  params = {
    keyfile: config[:keyfile],
    project: config[:project],
    datasets: config[:datasets]
  }
  connection = ::BigQueryAdapter::Connection.new(params)
  ConnectionAdapters::BigQueryAdapter
    .new(connection, logger, config, {})
end