File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -836,11 +836,20 @@ def _read_bigquery_load_job(
836
836
)
837
837
838
838
self ._start_generic_job (load_job )
839
+ table_id = f"{ table .project } .{ table .dataset_id } .{ table .table_id } "
840
+
841
+ # Update the table expiration so we aren't limited to the default 24
842
+ # hours of the anonymous dataset.
843
+ table_expiration = bigquery .Table (table_id )
844
+ table_expiration .expires = (
845
+ datetime .datetime .now (datetime .timezone .utc ) + constants .DEFAULT_EXPIRATION
846
+ )
847
+ self .bqclient .update_table (table_expiration , ["expires" ])
839
848
840
849
# The BigQuery REST API for tables.get doesn't take a session ID, so we
841
850
# can't get the schema for a temp table that way.
842
851
return self .read_gbq_table (
843
- f" { table . project } . { table . dataset_id } . { table . table_id } " ,
852
+ table_id ,
844
853
index_col = index_col ,
845
854
col_order = col_order ,
846
855
)
You can’t perform that action at this time.
0 commit comments