@@ -27,7 +27,6 @@ class SpannerClient:
2727 and getting/updating import statuses.
2828 """
2929 _LOCK_ID = "global_ingestion_lock"
30- _DEFAULT_GRAPH_PATH = "/*/*/*.mcf"
3130
3231 def __init__ (self , project_id : str , instance_id : str , database_id : str ):
3332 """Initializes a Spanner client and connects to a specific database."""
@@ -202,9 +201,9 @@ def update_import_status(self, params: dict):
202201 exec_time = params ['exec_time' ]
203202 data_volume = params ['data_volume' ]
204203 status = params ['status' ]
205- version = params ['version' ]. removesuffix ( self . _DEFAULT_GRAPH_PATH )
204+ version = params ['version' ]
206205 next_refresh = params ['next_refresh' ]
207- graph_paths = params . get ( 'graph_paths' , [ self . _DEFAULT_GRAPH_PATH ])
206+ graph_paths = params [ 'graph_paths' ]
208207 logging .info (f"Updating import status for { import_name } to { status } " )
209208
210209 def _record (transaction : Transaction ):
@@ -237,7 +236,7 @@ def _record(transaction: Transaction):
237236 raise
238237
239238 def update_version_history (self , import_name : str , version : str ,
240- comment : str ):
239+ caller : str , comment : str ):
241240 """Updates the version history table.
242241
243242 Args:
@@ -248,8 +247,12 @@ def update_version_history(self, import_name: str, version: str,
248247 logging .info (f"Updating version history for { import_name } to { version } " )
249248
250249 def _record (transaction : Transaction ):
251- columns = ["ImportName" , "Version" , "UpdateTimestamp" , "Comment" ]
252- values = [[import_name , version , spanner .COMMIT_TIMESTAMP , comment ]]
250+ columns = [
251+ "ImportName" , "Version" , "UpdateTimestamp" , "Caller" , "Comment"
252+ ]
253+ values = [[
254+ import_name , version , spanner .COMMIT_TIMESTAMP , caller , comment
255+ ]]
253256 transaction .insert (table = "ImportVersionHistory" ,
254257 columns = columns ,
255258 values = values )
0 commit comments