in upload.py [0:0]
def __exit__(self, exc_type, exc_value, traceback):
"""Abort the opened session."""
if self._session_cfg:
# abort the session in any case to have a clean state at the end
# (sometimes in case of script failure, the table is locked in
# the session)
job = self._bigquery_client.query(
"CALL BQ.ABORT_SESSION();",
job_config=self._session_cfg.config(bigquery.QueryJobConfig())
)
job.result()