File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ def create_bigquery_client(
3737 default_query_job_config = None ,
3838 location = None ,
3939 project_id = None ,
40+ username = None ,
41+ email = None ,
4042):
4143 logger .critical (
4244 'yooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' )
@@ -63,7 +65,18 @@ def create_bigquery_client(
6365
6466 if project_id is None :
6567 project_id = default_project
66-
68+
69+ if email is not None :
70+ logger .critical ("WE IN BOYS" )
71+ logger .critical (email )
72+ # credentials = credentials.with_scopes(['email'])
73+ # credentials = credentials.with_subject("vedantprajapati@geotab.com")
74+
75+ if username is not None :
76+ logger .critical ("another one" )
77+ logger .critical (username )
78+
79+
6780 logger .critical ("client_info" )
6881 logger .critical (google_client_info ())
6982 logger .critical ("projectid" )
Original file line number Diff line number Diff line change @@ -802,6 +802,8 @@ def create_connect_args(self, url):
802802 credentials_base64 ,
803803 default_query_job_config ,
804804 list_tables_page_size ,
805+ username ,
806+ email ,
805807 ) = parse_url (url )
806808
807809 self .arraysize = arraysize or self .arraysize
@@ -820,6 +822,8 @@ def create_connect_args(self, url):
820822 project_id = project_id ,
821823 location = self .location ,
822824 default_query_job_config = default_query_job_config ,
825+ username = username ,
826+ email = email
823827 )
824828 return ([client ], {})
825829
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ def parse_boolean(bool_string):
4646
4747def parse_url (url ): # noqa: C901
4848 query = dict (url .query ) # need mutable query.
49+ username , email = None , None
4950
5051 # use_legacy_sql (legacy)
5152 if "use_legacy_sql" in query :
@@ -125,6 +126,8 @@ def parse_url(url): # noqa: C901
125126 credentials_base64 ,
126127 QueryJobConfig (),
127128 list_tables_page_size ,
129+ username ,
130+ email ,
128131 )
129132 else :
130133 return (
@@ -136,6 +139,8 @@ def parse_url(url): # noqa: C901
136139 credentials_base64 ,
137140 None ,
138141 list_tables_page_size ,
142+ username ,
143+ email ,
139144 )
140145
141146 job_config = QueryJobConfig ()
@@ -285,4 +290,6 @@ def parse_url(url): # noqa: C901
285290 credentials_base64 ,
286291 job_config ,
287292 list_tables_page_size ,
293+ username ,
294+ email ,
288295 )
You can’t perform that action at this time.
0 commit comments