@@ -29,10 +29,13 @@ export default class BigQueryDriver extends AbstractDriver<DriverLib, DriverOpti
2929
3030 public async open ( ) {
3131 const getCredentials = ( ) => {
32+
33+
3234 const authentication_method = this . credentials . authenticator
3335 if ( authentication_method === 'CLI' ) {
3436 return {
35- projectId : this . credentials . projectId
37+ projectId : this . credentials . projectId ,
38+ location : this . credentials . location
3639 } ;
3740 } else if ( authentication_method === 'OAUTH' ) {
3841 // currently causing error
@@ -43,12 +46,14 @@ export default class BigQueryDriver extends AbstractDriver<DriverLib, DriverOpti
4346 return {
4447 // is this a legit way to handle this typescript error
4548 authClient : oauth as JSONClient ,
46- projectId : this . credentials . projectId
49+ projectId : this . credentials . projectId ,
50+ location : this . credentials . location
4751 } ;
4852 } else {
4953 console . log ( 'keyfile' , this . credentials . keyfile )
5054 return {
51- keyFilename : this . credentials . keyfile
55+ keyFilename : this . credentials . keyfile ,
56+ location : this . credentials . location
5257 }
5358 } ;
5459 }
@@ -57,6 +62,7 @@ export default class BigQueryDriver extends AbstractDriver<DriverLib, DriverOpti
5762
5863 this . connection = new Promise ( ( resolve , reject ) => {
5964 try {
65+ console . log ( 'connOptions' , connOptions )
6066 const bigquery = new BigQuery ( { ...connOptions , maxRetries : 10 } ) ;
6167 resolve ( bigquery ) ;
6268 } catch ( error ) {
@@ -91,6 +97,7 @@ export default class BigQueryDriver extends AbstractDriver<DriverLib, DriverOpti
9197 const options = {
9298 // typescript complains if this is not an array
9399 query : [ query ] ,
100+ location : this . credentials . location ,
94101 } ;
95102 const resultsAgg : NSDatabase . IResult [ ] = [ ] ;
96103
0 commit comments