File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 6
6
from typing import Any , Mapping , Optional
7
7
8
8
try :
9
+ from google .api_core .client_info import ClientInfo
9
10
from google .cloud import bigquery
10
11
from google .cloud .exceptions import NotFound
11
12
from google .oauth2 import service_account
28
29
29
30
logger = logging .getLogger (__name__ )
30
31
32
+ # Bump this if there are significant changes to the sink
33
+ SINK_VERSION = "1.0"
34
+
31
35
# A column name for the records keys
32
36
_KEY_COLUMN_NAME = "__key"
33
37
@@ -137,6 +141,8 @@ def __init__(
137
141
scopes = ["https://www.googleapis.com/auth/bigquery" ],
138
142
)
139
143
kwargs ["credentials" ] = credentials
144
+ user_agent = f"quixstreams-bigquery-sink/{ SINK_VERSION } (GPN:Quix;)"
145
+ kwargs .setdefault ("client_info" , ClientInfo (user_agent = user_agent ))
140
146
self ._client : Optional [bigquery .Client ] = None
141
147
self ._client_settings = kwargs
142
148
You can’t perform that action at this time.
0 commit comments