google-cloud-bigquery 3.40.0__tar.gz → 3.41.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_cloud_bigquery-3.40.0/google_cloud_bigquery.egg-info → google_cloud_bigquery-3.41.0}/PKG-INFO +4 -3
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/_pandas_helpers.py +113 -58
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/client.py +5 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/dbapi/cursor.py +3 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/job/query.py +42 -1
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/retry.py +11 -5
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/table.py +138 -6
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/version.py +1 -1
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0/google_cloud_bigquery.egg-info}/PKG-INFO +4 -3
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/pyproject.toml +3 -3
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/setup.py +0 -1
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/conftest.py +16 -9
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/test_client.py +24 -11
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/test_magics.py +2 -2
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/test_pandas.py +1 -1
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/test_query.py +12 -5
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_async_job_retry.py +5 -4
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_query.py +49 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_query_pandas.py +41 -2
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test__pandas_helpers.py +252 -20
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_client.py +4 -4
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_client_retry.py +6 -1
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_dbapi_cursor.py +5 -1
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_table.py +49 -26
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_table_pandas.py +6 -3
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/LICENSE +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/MANIFEST.in +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/README.rst +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/_helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/_http.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/_job_helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/_pyarrow_helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/_tqdm_helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/_versions_helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/dataset.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/dbapi/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/dbapi/_helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/dbapi/connection.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/dbapi/exceptions.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/dbapi/types.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/encryption_configuration.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/enums.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/exceptions.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/external_config.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/format_options.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/iam.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/job/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/job/base.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/job/copy_.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/job/extract.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/job/load.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/magics/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/magics/line_arg_parser/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/magics/line_arg_parser/exceptions.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/magics/line_arg_parser/lexer.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/magics/line_arg_parser/parser.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/magics/line_arg_parser/visitors.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/magics/magics.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/model.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/opentelemetry_tracing.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/py.typed +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/query.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/routine/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/routine/routine.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/schema.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/standard_sql.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery_v2/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery_v2/types/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery_v2/types/encryption_config.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery_v2/types/model.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery_v2/types/model_reference.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery_v2/types/standard_sql.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery_v2/types/table_reference.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google_cloud_bigquery.egg-info/SOURCES.txt +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google_cloud_bigquery.egg-info/dependency_links.txt +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google_cloud_bigquery.egg-info/requires.txt +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google_cloud_bigquery.egg-info/top_level.txt +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/setup.cfg +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/characters.json +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/characters.jsonl +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/colors.avro +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/numeric_38_12.parquet +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/people.csv +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/pico.csv +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/pico_schema.json +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/scalars.csv +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/scalars.jsonl +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/scalars_extreme.jsonl +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/scalars_schema.json +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/scalars_schema_csv.json +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/data/schema.json +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/scrub_datasets.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/test_arrow.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/test_job_retry.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/test_list_rows.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/system/test_structs.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/_helpers/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/_helpers/test_cell_data_parser.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/_helpers/test_data_frame_cell_data_parser.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/_helpers/test_scalar_query_param_parser.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/conftest.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_base.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_copy.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_extract.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_load.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_load_config.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_query_config.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_query_job_retry.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/job/test_query_stats.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/line_arg_parser/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/line_arg_parser/test_lexer.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/line_arg_parser/test_parser.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/line_arg_parser/test_visitors.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/model/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/model/test_model.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/model/test_model_reference.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/routine/__init__.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/routine/test_external_runtime_options.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/routine/test_remote_function_options.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/routine/test_routine.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/routine/test_routine_argument.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/routine/test_routine_reference.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test__helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test__http.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test__job_helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test__job_helpers_retry.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test__pyarrow_helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test__versions_helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_client_bigframes.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_client_resumable_media_upload.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_create_dataset.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_dataset.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_dbapi__helpers.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_dbapi_connection.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_dbapi_types.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_delete_dataset.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_encryption_configuration.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_external_config.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_format_options.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_job_retry.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_legacy_types.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_list_datasets.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_list_jobs.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_list_models.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_list_projects.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_list_routines.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_list_tables.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_magics.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_opentelemetry_tracing.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_packaging.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_query.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_retry.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_schema.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_signature_compatibility.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_standard_sql_types.py +0 -0
- {google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/tests/unit/test_table_arrow.py +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-bigquery
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.41.0
|
|
4
4
|
Summary: Google BigQuery API client library
|
|
5
5
|
Author-email: Google LLC <googleapis-packages@google.com>
|
|
6
|
-
License
|
|
6
|
+
License: Apache 2.0
|
|
7
7
|
Project-URL: Repository, https://github.com/googleapis/python-bigquery
|
|
8
8
|
Classifier: Development Status :: 5 - Production/Stable
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
10
10
|
Classifier: Programming Language :: Python
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
12
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
13
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -17,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
17
18
|
Classifier: Programming Language :: Python :: 3.14
|
|
18
19
|
Classifier: Operating System :: OS Independent
|
|
19
20
|
Classifier: Topic :: Internet
|
|
20
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.8
|
|
21
22
|
Description-Content-Type: text/x-rst
|
|
22
23
|
License-File: LICENSE
|
|
23
24
|
Requires-Dist: google-api-core[grpc]<3.0.0,>=2.11.1
|
|
@@ -26,12 +26,14 @@ from itertools import islice
|
|
|
26
26
|
import logging
|
|
27
27
|
import queue
|
|
28
28
|
import threading
|
|
29
|
+
import time
|
|
29
30
|
import warnings
|
|
30
31
|
from typing import Any, Union, Optional, Callable, Generator, List
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
from google.cloud.bigquery import _pyarrow_helpers
|
|
34
35
|
from google.cloud.bigquery import _versions_helpers
|
|
36
|
+
from google.cloud.bigquery import retry as bq_retry
|
|
35
37
|
from google.cloud.bigquery import schema
|
|
36
38
|
|
|
37
39
|
|
|
@@ -739,7 +741,7 @@ def _row_iterator_page_to_arrow(page, column_names, arrow_types):
|
|
|
739
741
|
return pyarrow.RecordBatch.from_arrays(arrays, names=column_names)
|
|
740
742
|
|
|
741
743
|
|
|
742
|
-
def download_arrow_row_iterator(pages, bq_schema):
|
|
744
|
+
def download_arrow_row_iterator(pages, bq_schema, timeout=None):
|
|
743
745
|
"""Use HTTP JSON RowIterator to construct an iterable of RecordBatches.
|
|
744
746
|
|
|
745
747
|
Args:
|
|
@@ -750,6 +752,10 @@ def download_arrow_row_iterator(pages, bq_schema):
|
|
|
750
752
|
Mapping[str, Any] \
|
|
751
753
|
]]):
|
|
752
754
|
A decription of the fields in result pages.
|
|
755
|
+
timeout (Optional[float]):
|
|
756
|
+
The number of seconds to wait for the underlying download to complete.
|
|
757
|
+
If ``None``, wait indefinitely.
|
|
758
|
+
|
|
753
759
|
Yields:
|
|
754
760
|
:class:`pyarrow.RecordBatch`
|
|
755
761
|
The next page of records as a ``pyarrow`` record batch.
|
|
@@ -758,8 +764,16 @@ def download_arrow_row_iterator(pages, bq_schema):
|
|
|
758
764
|
column_names = bq_to_arrow_schema(bq_schema) or [field.name for field in bq_schema]
|
|
759
765
|
arrow_types = [bq_to_arrow_data_type(field) for field in bq_schema]
|
|
760
766
|
|
|
761
|
-
|
|
762
|
-
|
|
767
|
+
if timeout is None:
|
|
768
|
+
for page in pages:
|
|
769
|
+
yield _row_iterator_page_to_arrow(page, column_names, arrow_types)
|
|
770
|
+
else:
|
|
771
|
+
start_time = time.monotonic()
|
|
772
|
+
for page in pages:
|
|
773
|
+
if time.monotonic() - start_time > timeout:
|
|
774
|
+
raise concurrent.futures.TimeoutError()
|
|
775
|
+
|
|
776
|
+
yield _row_iterator_page_to_arrow(page, column_names, arrow_types)
|
|
763
777
|
|
|
764
778
|
|
|
765
779
|
def _row_iterator_page_to_dataframe(page, column_names, dtypes):
|
|
@@ -777,7 +791,7 @@ def _row_iterator_page_to_dataframe(page, column_names, dtypes):
|
|
|
777
791
|
return pandas.DataFrame(columns, columns=column_names)
|
|
778
792
|
|
|
779
793
|
|
|
780
|
-
def download_dataframe_row_iterator(pages, bq_schema, dtypes):
|
|
794
|
+
def download_dataframe_row_iterator(pages, bq_schema, dtypes, timeout=None):
|
|
781
795
|
"""Use HTTP JSON RowIterator to construct a DataFrame.
|
|
782
796
|
|
|
783
797
|
Args:
|
|
@@ -791,14 +805,27 @@ def download_dataframe_row_iterator(pages, bq_schema, dtypes):
|
|
|
791
805
|
dtypes(Mapping[str, numpy.dtype]):
|
|
792
806
|
The types of columns in result data to hint construction of the
|
|
793
807
|
resulting DataFrame. Not all column types have to be specified.
|
|
808
|
+
timeout (Optional[float]):
|
|
809
|
+
The number of seconds to wait for the underlying download to complete.
|
|
810
|
+
If ``None``, wait indefinitely.
|
|
811
|
+
|
|
794
812
|
Yields:
|
|
795
813
|
:class:`pandas.DataFrame`
|
|
796
814
|
The next page of records as a ``pandas.DataFrame`` record batch.
|
|
797
815
|
"""
|
|
798
816
|
bq_schema = schema._to_schema_fields(bq_schema)
|
|
799
817
|
column_names = [field.name for field in bq_schema]
|
|
800
|
-
|
|
801
|
-
|
|
818
|
+
|
|
819
|
+
if timeout is None:
|
|
820
|
+
for page in pages:
|
|
821
|
+
yield _row_iterator_page_to_dataframe(page, column_names, dtypes)
|
|
822
|
+
else:
|
|
823
|
+
start_time = time.monotonic()
|
|
824
|
+
for page in pages:
|
|
825
|
+
if time.monotonic() - start_time > timeout:
|
|
826
|
+
raise concurrent.futures.TimeoutError()
|
|
827
|
+
|
|
828
|
+
yield _row_iterator_page_to_dataframe(page, column_names, dtypes)
|
|
802
829
|
|
|
803
830
|
|
|
804
831
|
def _bqstorage_page_to_arrow(page):
|
|
@@ -869,6 +896,7 @@ def _download_table_bqstorage(
|
|
|
869
896
|
max_queue_size: Any = _MAX_QUEUE_SIZE_DEFAULT,
|
|
870
897
|
max_stream_count: Optional[int] = None,
|
|
871
898
|
download_state: Optional[_DownloadState] = None,
|
|
899
|
+
timeout: Optional[float] = None,
|
|
872
900
|
) -> Generator[Any, None, None]:
|
|
873
901
|
"""Downloads a BigQuery table using the BigQuery Storage API.
|
|
874
902
|
|
|
@@ -899,6 +927,9 @@ def _download_table_bqstorage(
|
|
|
899
927
|
download_state (Optional[_DownloadState]):
|
|
900
928
|
A threadsafe state object which can be used to observe the
|
|
901
929
|
behavior of the worker threads created by this method.
|
|
930
|
+
timeout (Optional[float]):
|
|
931
|
+
The number of seconds to wait for the download to complete.
|
|
932
|
+
If None, wait indefinitely.
|
|
902
933
|
|
|
903
934
|
Yields:
|
|
904
935
|
pandas.DataFrame: Pandas DataFrames, one for each chunk of data
|
|
@@ -906,6 +937,8 @@ def _download_table_bqstorage(
|
|
|
906
937
|
|
|
907
938
|
Raises:
|
|
908
939
|
ValueError: If attempting to read from a specific partition or snapshot.
|
|
940
|
+
concurrent.futures.TimeoutError:
|
|
941
|
+
If the download does not complete within the specified timeout.
|
|
909
942
|
|
|
910
943
|
Note:
|
|
911
944
|
This method requires the `google-cloud-bigquery-storage` library
|
|
@@ -921,6 +954,7 @@ def _download_table_bqstorage(
|
|
|
921
954
|
if "@" in table.table_id:
|
|
922
955
|
raise ValueError("Reading from a specific snapshot is not currently supported.")
|
|
923
956
|
|
|
957
|
+
start_time = time.monotonic()
|
|
924
958
|
requested_streams = determine_requested_streams(preserve_order, max_stream_count)
|
|
925
959
|
|
|
926
960
|
requested_session = bigquery_storage.types.stream.ReadSession(
|
|
@@ -937,10 +971,16 @@ def _download_table_bqstorage(
|
|
|
937
971
|
ArrowSerializationOptions.CompressionCodec(1)
|
|
938
972
|
)
|
|
939
973
|
|
|
974
|
+
retry_policy = (
|
|
975
|
+
bq_retry.DEFAULT_RETRY.with_deadline(timeout) if timeout is not None else None
|
|
976
|
+
)
|
|
977
|
+
|
|
940
978
|
session = bqstorage_client.create_read_session(
|
|
941
979
|
parent="projects/{}".format(project_id),
|
|
942
980
|
read_session=requested_session,
|
|
943
981
|
max_stream_count=requested_streams,
|
|
982
|
+
retry=retry_policy,
|
|
983
|
+
timeout=timeout,
|
|
944
984
|
)
|
|
945
985
|
|
|
946
986
|
_LOGGER.debug(
|
|
@@ -973,60 +1013,71 @@ def _download_table_bqstorage(
|
|
|
973
1013
|
|
|
974
1014
|
worker_queue: queue.Queue[int] = queue.Queue(maxsize=max_queue_size)
|
|
975
1015
|
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1016
|
+
# Manually manage the pool to control shutdown behavior on timeout.
|
|
1017
|
+
pool = concurrent.futures.ThreadPoolExecutor(max_workers=max(1, total_streams))
|
|
1018
|
+
wait_on_shutdown = True
|
|
1019
|
+
try:
|
|
1020
|
+
# Manually submit jobs and wait for download to complete rather
|
|
1021
|
+
# than using pool.map because pool.map continues running in the
|
|
1022
|
+
# background even if there is an exception on the main thread.
|
|
1023
|
+
# See: https://github.com/googleapis/google-cloud-python/pull/7698
|
|
1024
|
+
not_done = [
|
|
1025
|
+
pool.submit(
|
|
1026
|
+
_download_table_bqstorage_stream,
|
|
1027
|
+
download_state,
|
|
1028
|
+
bqstorage_client,
|
|
1029
|
+
session,
|
|
1030
|
+
stream,
|
|
1031
|
+
worker_queue,
|
|
1032
|
+
page_to_item,
|
|
1033
|
+
)
|
|
1034
|
+
for stream in session.streams
|
|
1035
|
+
]
|
|
1036
|
+
|
|
1037
|
+
while not_done:
|
|
1038
|
+
# Check for timeout
|
|
1039
|
+
if timeout is not None:
|
|
1040
|
+
elapsed = time.monotonic() - start_time
|
|
1041
|
+
if elapsed > timeout:
|
|
1042
|
+
wait_on_shutdown = False
|
|
1043
|
+
raise concurrent.futures.TimeoutError(
|
|
1044
|
+
f"Download timed out after {timeout} seconds."
|
|
1045
|
+
)
|
|
1046
|
+
|
|
1047
|
+
# Don't block on the worker threads. For performance reasons,
|
|
1048
|
+
# we want to block on the queue's get method, instead. This
|
|
1049
|
+
# prevents the queue from filling up, because the main thread
|
|
1050
|
+
# has smaller gaps in time between calls to the queue's get
|
|
1051
|
+
# method. For a detailed explanation, see:
|
|
1052
|
+
# https://friendliness.dev/2019/06/18/python-nowait/
|
|
1053
|
+
done, not_done = _nowait(not_done)
|
|
1054
|
+
for future in done:
|
|
1055
|
+
# Call result() on any finished threads to raise any
|
|
1056
|
+
# exceptions encountered.
|
|
1057
|
+
future.result()
|
|
1058
|
+
|
|
1059
|
+
try:
|
|
1060
|
+
frame = worker_queue.get(timeout=_PROGRESS_INTERVAL)
|
|
1061
|
+
yield frame
|
|
1062
|
+
except queue.Empty: # pragma: NO COVER
|
|
1063
|
+
continue
|
|
1013
1064
|
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1065
|
+
# Return any remaining values after the workers finished.
|
|
1066
|
+
while True: # pragma: NO COVER
|
|
1067
|
+
try:
|
|
1068
|
+
frame = worker_queue.get_nowait()
|
|
1069
|
+
yield frame
|
|
1070
|
+
except queue.Empty: # pragma: NO COVER
|
|
1071
|
+
break
|
|
1072
|
+
finally:
|
|
1073
|
+
# No need for a lock because reading/replacing a variable is
|
|
1074
|
+
# defined to be an atomic operation in the Python language
|
|
1075
|
+
# definition (enforced by the global interpreter lock).
|
|
1076
|
+
download_state.done = True
|
|
1026
1077
|
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1078
|
+
# Shutdown all background threads, now that they should know to
|
|
1079
|
+
# exit early.
|
|
1080
|
+
pool.shutdown(wait=wait_on_shutdown)
|
|
1030
1081
|
|
|
1031
1082
|
|
|
1032
1083
|
def download_arrow_bqstorage(
|
|
@@ -1037,6 +1088,7 @@ def download_arrow_bqstorage(
|
|
|
1037
1088
|
selected_fields=None,
|
|
1038
1089
|
max_queue_size=_MAX_QUEUE_SIZE_DEFAULT,
|
|
1039
1090
|
max_stream_count=None,
|
|
1091
|
+
timeout=None,
|
|
1040
1092
|
):
|
|
1041
1093
|
return _download_table_bqstorage(
|
|
1042
1094
|
project_id,
|
|
@@ -1047,6 +1099,7 @@ def download_arrow_bqstorage(
|
|
|
1047
1099
|
page_to_item=_bqstorage_page_to_arrow,
|
|
1048
1100
|
max_queue_size=max_queue_size,
|
|
1049
1101
|
max_stream_count=max_stream_count,
|
|
1102
|
+
timeout=timeout,
|
|
1050
1103
|
)
|
|
1051
1104
|
|
|
1052
1105
|
|
|
@@ -1060,6 +1113,7 @@ def download_dataframe_bqstorage(
|
|
|
1060
1113
|
selected_fields=None,
|
|
1061
1114
|
max_queue_size=_MAX_QUEUE_SIZE_DEFAULT,
|
|
1062
1115
|
max_stream_count=None,
|
|
1116
|
+
timeout=None,
|
|
1063
1117
|
):
|
|
1064
1118
|
page_to_item = functools.partial(_bqstorage_page_to_dataframe, column_names, dtypes)
|
|
1065
1119
|
return _download_table_bqstorage(
|
|
@@ -1071,6 +1125,7 @@ def download_dataframe_bqstorage(
|
|
|
1071
1125
|
page_to_item=page_to_item,
|
|
1072
1126
|
max_queue_size=max_queue_size,
|
|
1073
1127
|
max_stream_count=max_stream_count,
|
|
1128
|
+
timeout=timeout,
|
|
1074
1129
|
)
|
|
1075
1130
|
|
|
1076
1131
|
|
{google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/client.py
RENAMED
|
@@ -3655,6 +3655,11 @@ class Client(ClientWithProject):
|
|
|
3655
3655
|
page_size (Optional[int]):
|
|
3656
3656
|
The maximum number of rows in each page of results from the
|
|
3657
3657
|
initial jobs.query request. Non-positive values are ignored.
|
|
3658
|
+
|
|
3659
|
+
This parameter only affects the jobs.query and
|
|
3660
|
+
jobs.getQueryResults API calls. Large results downloaded with
|
|
3661
|
+
the BigQuery Storage Read API are intentionally unaffected
|
|
3662
|
+
by this parameter.
|
|
3658
3663
|
max_results (Optional[int]):
|
|
3659
3664
|
The maximum total number of rows from this request.
|
|
3660
3665
|
|
{google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/dbapi/cursor.py
RENAMED
|
@@ -213,6 +213,7 @@ class Cursor(object):
|
|
|
213
213
|
formatted_operation,
|
|
214
214
|
job_config=job_config,
|
|
215
215
|
job_id=job_id,
|
|
216
|
+
job_retry=None,
|
|
216
217
|
).result(
|
|
217
218
|
page_size=self.arraysize,
|
|
218
219
|
)
|
|
@@ -323,6 +324,8 @@ class Cursor(object):
|
|
|
323
324
|
read_session=requested_session,
|
|
324
325
|
# a single stream only, as DB API is not well-suited for multithreading
|
|
325
326
|
max_stream_count=1,
|
|
327
|
+
retry=None,
|
|
328
|
+
timeout=None,
|
|
326
329
|
)
|
|
327
330
|
|
|
328
331
|
if not read_session.streams:
|
{google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/job/query.py
RENAMED
|
@@ -50,7 +50,7 @@ from google.cloud.bigquery.schema import SchemaField
|
|
|
50
50
|
from google.cloud.bigquery.table import _EmptyRowIterator
|
|
51
51
|
from google.cloud.bigquery.table import RangePartitioning
|
|
52
52
|
from google.cloud.bigquery.table import _table_arg_to_table_ref
|
|
53
|
-
from google.cloud.bigquery.table import TableReference
|
|
53
|
+
from google.cloud.bigquery.table import TableReference, PropertyGraphReference
|
|
54
54
|
from google.cloud.bigquery.table import TimePartitioning
|
|
55
55
|
from google.cloud.bigquery._tqdm_helpers import wait_for_query
|
|
56
56
|
|
|
@@ -1332,6 +1332,30 @@ class QueryJob(_AsyncJob):
|
|
|
1332
1332
|
|
|
1333
1333
|
return tables
|
|
1334
1334
|
|
|
1335
|
+
@property
|
|
1336
|
+
def referenced_property_graphs(self):
|
|
1337
|
+
"""Return referenced property graphs from job statistics, if present.
|
|
1338
|
+
|
|
1339
|
+
See:
|
|
1340
|
+
https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobStatistics2.FIELDS.referenced_property_graphs
|
|
1341
|
+
|
|
1342
|
+
Returns:
|
|
1343
|
+
List[google.cloud.bigquery.table.PropertyGraphReference]:
|
|
1344
|
+
mappings describing the property graphs, or an empty list
|
|
1345
|
+
if the query has not yet completed.
|
|
1346
|
+
"""
|
|
1347
|
+
property_graphs = []
|
|
1348
|
+
|
|
1349
|
+
for pg in self._job_statistics().get("referencedPropertyGraphs", ()):
|
|
1350
|
+
property_graphs.append(
|
|
1351
|
+
PropertyGraphReference(
|
|
1352
|
+
DatasetReference(pg["projectId"], pg["datasetId"]),
|
|
1353
|
+
pg["propertyGraphId"],
|
|
1354
|
+
)
|
|
1355
|
+
)
|
|
1356
|
+
|
|
1357
|
+
return property_graphs
|
|
1358
|
+
|
|
1335
1359
|
@property
|
|
1336
1360
|
def undeclared_query_parameters(self):
|
|
1337
1361
|
"""Return undeclared query parameters from job statistics, if present.
|
|
@@ -1857,6 +1881,7 @@ class QueryJob(_AsyncJob):
|
|
|
1857
1881
|
bqstorage_client: Optional["bigquery_storage.BigQueryReadClient"] = None,
|
|
1858
1882
|
create_bqstorage_client: bool = True,
|
|
1859
1883
|
max_results: Optional[int] = None,
|
|
1884
|
+
timeout: Optional[float] = None,
|
|
1860
1885
|
) -> "pyarrow.Table":
|
|
1861
1886
|
"""[Beta] Create a class:`pyarrow.Table` by loading all pages of a
|
|
1862
1887
|
table or query.
|
|
@@ -1904,6 +1929,10 @@ class QueryJob(_AsyncJob):
|
|
|
1904
1929
|
|
|
1905
1930
|
.. versionadded:: 2.21.0
|
|
1906
1931
|
|
|
1932
|
+
timeout (Optional[float]):
|
|
1933
|
+
The number of seconds to wait for the underlying download to complete.
|
|
1934
|
+
If ``None``, wait indefinitely.
|
|
1935
|
+
|
|
1907
1936
|
Returns:
|
|
1908
1937
|
pyarrow.Table
|
|
1909
1938
|
A :class:`pyarrow.Table` populated with row data and column
|
|
@@ -1921,6 +1950,7 @@ class QueryJob(_AsyncJob):
|
|
|
1921
1950
|
progress_bar_type=progress_bar_type,
|
|
1922
1951
|
bqstorage_client=bqstorage_client,
|
|
1923
1952
|
create_bqstorage_client=create_bqstorage_client,
|
|
1953
|
+
timeout=timeout,
|
|
1924
1954
|
)
|
|
1925
1955
|
|
|
1926
1956
|
# If changing the signature of this method, make sure to apply the same
|
|
@@ -1949,6 +1979,7 @@ class QueryJob(_AsyncJob):
|
|
|
1949
1979
|
range_timestamp_dtype: Union[
|
|
1950
1980
|
Any, None
|
|
1951
1981
|
] = DefaultPandasDTypes.RANGE_TIMESTAMP_DTYPE,
|
|
1982
|
+
timeout: Optional[float] = None,
|
|
1952
1983
|
) -> "pandas.DataFrame":
|
|
1953
1984
|
"""Return a pandas DataFrame from a QueryJob
|
|
1954
1985
|
|
|
@@ -2141,6 +2172,10 @@ class QueryJob(_AsyncJob):
|
|
|
2141
2172
|
|
|
2142
2173
|
.. versionadded:: 3.21.0
|
|
2143
2174
|
|
|
2175
|
+
timeout (Optional[float]):
|
|
2176
|
+
The number of seconds to wait for the underlying download to complete.
|
|
2177
|
+
If ``None``, wait indefinitely.
|
|
2178
|
+
|
|
2144
2179
|
Returns:
|
|
2145
2180
|
pandas.DataFrame:
|
|
2146
2181
|
A :class:`~pandas.DataFrame` populated with row data
|
|
@@ -2174,6 +2209,7 @@ class QueryJob(_AsyncJob):
|
|
|
2174
2209
|
range_date_dtype=range_date_dtype,
|
|
2175
2210
|
range_datetime_dtype=range_datetime_dtype,
|
|
2176
2211
|
range_timestamp_dtype=range_timestamp_dtype,
|
|
2212
|
+
timeout=timeout,
|
|
2177
2213
|
)
|
|
2178
2214
|
|
|
2179
2215
|
# If changing the signature of this method, make sure to apply the same
|
|
@@ -2191,6 +2227,7 @@ class QueryJob(_AsyncJob):
|
|
|
2191
2227
|
int_dtype: Union[Any, None] = DefaultPandasDTypes.INT_DTYPE,
|
|
2192
2228
|
float_dtype: Union[Any, None] = None,
|
|
2193
2229
|
string_dtype: Union[Any, None] = None,
|
|
2230
|
+
timeout: Optional[float] = None,
|
|
2194
2231
|
) -> "geopandas.GeoDataFrame":
|
|
2195
2232
|
"""Return a GeoPandas GeoDataFrame from a QueryJob
|
|
2196
2233
|
|
|
@@ -2269,6 +2306,9 @@ class QueryJob(_AsyncJob):
|
|
|
2269
2306
|
then the data type will be ``numpy.dtype("object")``. BigQuery String
|
|
2270
2307
|
type can be found at:
|
|
2271
2308
|
https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#string_type
|
|
2309
|
+
timeout (Optional[float]):
|
|
2310
|
+
The number of seconds to wait for the underlying download to complete.
|
|
2311
|
+
If ``None``, wait indefinitely.
|
|
2272
2312
|
|
|
2273
2313
|
Returns:
|
|
2274
2314
|
geopandas.GeoDataFrame:
|
|
@@ -2296,6 +2336,7 @@ class QueryJob(_AsyncJob):
|
|
|
2296
2336
|
int_dtype=int_dtype,
|
|
2297
2337
|
float_dtype=float_dtype,
|
|
2298
2338
|
string_dtype=string_dtype,
|
|
2339
|
+
timeout=timeout,
|
|
2299
2340
|
)
|
|
2300
2341
|
|
|
2301
2342
|
def __iter__(self):
|
{google_cloud_bigquery-3.40.0 → google_cloud_bigquery-3.41.0}/google/cloud/bigquery/retry.py
RENAMED
|
@@ -12,12 +12,15 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
import logging
|
|
16
|
+
|
|
15
17
|
from google.api_core import exceptions
|
|
16
18
|
from google.api_core import retry
|
|
17
19
|
import google.api_core.future.polling
|
|
18
20
|
from google.auth import exceptions as auth_exceptions # type: ignore
|
|
19
21
|
import requests.exceptions
|
|
20
22
|
|
|
23
|
+
_LOGGER = logging.getLogger(__name__)
|
|
21
24
|
|
|
22
25
|
_RETRYABLE_REASONS = frozenset(
|
|
23
26
|
["rateLimitExceeded", "backendError", "internalError", "badGateway"]
|
|
@@ -61,14 +64,17 @@ _DEFAULT_JOB_DEADLINE = 2.0 * (2.0 * _DEFAULT_RETRY_DEADLINE)
|
|
|
61
64
|
def _should_retry(exc):
|
|
62
65
|
"""Predicate for determining when to retry.
|
|
63
66
|
|
|
64
|
-
We retry if and only if the 'reason' is
|
|
65
|
-
|
|
67
|
+
We retry if and only if the 'reason' is in _RETRYABLE_REASONS or is
|
|
68
|
+
in _UNSTRUCTURED_RETRYABLE_TYPES.
|
|
66
69
|
"""
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
try:
|
|
71
|
+
reason = exc.errors[0]["reason"]
|
|
72
|
+
except (AttributeError, IndexError, TypeError, KeyError):
|
|
73
|
+
# Fallback for when errors attribute is missing, empty, or not a dict
|
|
74
|
+
# or doesn't contain "reason" (e.g. gRPC exceptions).
|
|
75
|
+
_LOGGER.debug("Inspecting unstructured error for retry: %r", exc)
|
|
69
76
|
return isinstance(exc, _UNSTRUCTURED_RETRYABLE_TYPES)
|
|
70
77
|
|
|
71
|
-
reason = exc.errors[0]["reason"]
|
|
72
78
|
return reason in _RETRYABLE_REASONS
|
|
73
79
|
|
|
74
80
|
|