Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion bigframes/session/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,11 +836,20 @@ def _read_bigquery_load_job(
)

self._start_generic_job(load_job)
table_id = f"{table.project}.{table.dataset_id}.{table.table_id}"

# Update the table expiration so we aren't limited to the default 24
# hours of the anonymous dataset.
table_expiration = bigquery.Table(table_id)
table_expiration.expires = (
datetime.datetime.now(datetime.timezone.utc) + constants.DEFAULT_EXPIRATION
)
self.bqclient.update_table(table_expiration, ["expires"])

# The BigQuery REST API for tables.get doesn't take a session ID, so we
# can't get the schema for a temp table that way.
return self.read_gbq_table(
f"{table.project}.{table.dataset_id}.{table.table_id}",
table_id,
index_col=index_col,
col_order=col_order,
)
Expand Down