Skip to content

bigquery: load_table_from_dataframe and load_table_from_json drop timeout on the table lookup #18936

Open

Description

@abhishekacharya200

Client.load_table_from_dataframe and Client.load_table_from_json accept timeout, but the get_table(destination) call they make before uploading doesn't receive it.

load_table_from_dataframe uses that lookup to read the existing table's schema, and load_table_from_json uses it to decide on autodetect. BigQuery's DEFAULT_TIMEOUT is None, so this request has no timeout at all, even when the caller set one, and a slow or stuck connection can hang there.

The upload that follows does get the timeout. create_dataset, create_table and create_routine had the same gap, which #18766 covers.

client.load_table_from_json([{"id": 1}], "project.dataset.table", timeout=7.5)
# the GET for the destination table is sent with timeout=None

Expected: the lookup uses the caller's timeout, like the upload does.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions