google-cloud-bigquery 3.24.0__tar.gz → 3.26.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.24.0 → google_cloud_bigquery-3.26.0}/MANIFEST.in +1 -1
- {google-cloud-bigquery-3.24.0/google_cloud_bigquery.egg-info → google_cloud_bigquery-3.26.0}/PKG-INFO +11 -13
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/__init__.py +32 -4
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/_helpers.py +28 -10
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/_pandas_helpers.py +4 -2
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/_versions_helpers.py +14 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/dbapi/connection.py +20 -10
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/job/base.py +6 -3
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/job/load.py +41 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/job/query.py +8 -2
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/magics/magics.py +17 -64
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/query.py +9 -11
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/version.py +1 -1
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0/google_cloud_bigquery.egg-info}/PKG-INFO +11 -13
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google_cloud_bigquery.egg-info/requires.txt +10 -11
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/setup.py +7 -14
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/test_client.py +22 -7
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/test_magics.py +4 -1
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/test_base.py +18 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/test_load_config.py +39 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/test_query.py +14 -1
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test__helpers.py +61 -1
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test__pandas_helpers.py +17 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_dbapi_connection.py +20 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_job_retry.py +1 -1
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_magics.py +179 -112
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_query.py +19 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_table.py +3 -3
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/LICENSE +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/README.rst +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/_http.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/_job_helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/_pyarrow_helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/_tqdm_helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/client.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/dataset.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/dbapi/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/dbapi/_helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/dbapi/cursor.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/dbapi/exceptions.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/dbapi/types.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/encryption_configuration.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/enums.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/exceptions.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/external_config.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/format_options.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/iam.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/job/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/job/copy_.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/job/extract.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/magics/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/magics/line_arg_parser/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/magics/line_arg_parser/exceptions.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/magics/line_arg_parser/lexer.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/magics/line_arg_parser/parser.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/magics/line_arg_parser/visitors.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/model.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/opentelemetry_tracing.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/py.typed +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/retry.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/routine/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/routine/routine.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/schema.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/standard_sql.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/table.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery_v2/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery_v2/types/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery_v2/types/encryption_config.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery_v2/types/model.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery_v2/types/model_reference.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery_v2/types/standard_sql.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery_v2/types/table_reference.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google_cloud_bigquery.egg-info/SOURCES.txt +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google_cloud_bigquery.egg-info/dependency_links.txt +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google_cloud_bigquery.egg-info/not-zip-safe +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google_cloud_bigquery.egg-info/top_level.txt +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/setup.cfg +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/characters.json +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/characters.jsonl +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/colors.avro +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/numeric_38_12.parquet +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/people.csv +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/scalars.csv +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/scalars.jsonl +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/scalars_extreme.jsonl +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/scalars_schema.json +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/scalars_schema_csv.json +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/data/schema.json +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/scrub_datasets.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/conftest.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/test_arrow.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/test_job_retry.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/test_list_rows.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/test_pandas.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/test_query.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/system/test_structs.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/_helpers/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/_helpers/test_from_json.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/conftest.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/test_copy.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/test_extract.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/test_load.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/test_query_config.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/test_query_pandas.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/job/test_query_stats.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/line_arg_parser/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/line_arg_parser/test_lexer.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/line_arg_parser/test_parser.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/line_arg_parser/test_visitors.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/model/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/model/test_model.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/model/test_model_reference.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/routine/__init__.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/routine/test_remote_function_options.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/routine/test_routine.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/routine/test_routine_argument.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/routine/test_routine_reference.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test__http.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test__job_helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test__pyarrow_helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test__versions_helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_client.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_create_dataset.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_dataset.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_dbapi__helpers.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_dbapi_cursor.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_dbapi_types.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_delete_dataset.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_encryption_configuration.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_external_config.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_format_options.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_legacy_types.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_list_datasets.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_list_jobs.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_list_models.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_list_projects.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_list_routines.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_list_tables.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_opentelemetry_tracing.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_packaging.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_retry.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_schema.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_signature_compatibility.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_standard_sql_types.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_table_arrow.py +0 -0
- {google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/tests/unit/test_table_pandas.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: google-cloud-bigquery
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.26.0
|
|
4
4
|
Summary: Google BigQuery API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/python-bigquery
|
|
6
6
|
Author: Google LLC
|
|
@@ -22,12 +22,12 @@ Classifier: Operating System :: OS Independent
|
|
|
22
22
|
Classifier: Topic :: Internet
|
|
23
23
|
Requires-Python: >=3.7
|
|
24
24
|
License-File: LICENSE
|
|
25
|
-
Requires-Dist: google-api-core[grpc]
|
|
25
|
+
Requires-Dist: google-api-core[grpc]<3.0.0dev,>=2.11.1
|
|
26
26
|
Requires-Dist: google-auth<3.0.0dev,>=2.14.1
|
|
27
|
-
Requires-Dist: google-cloud-core<3.0.0dev,>=
|
|
28
|
-
Requires-Dist: google-resumable-media<3.0dev,>=0.
|
|
27
|
+
Requires-Dist: google-cloud-core<3.0.0dev,>=2.4.1
|
|
28
|
+
Requires-Dist: google-resumable-media<3.0dev,>=2.0.0
|
|
29
29
|
Requires-Dist: packaging>=20.0.0
|
|
30
|
-
Requires-Dist: python-dateutil<3.0dev,>=2.7.
|
|
30
|
+
Requires-Dist: python-dateutil<3.0dev,>=2.7.3
|
|
31
31
|
Requires-Dist: requests<3.0.0dev,>=2.21.0
|
|
32
32
|
Provides-Extra: bqstorage
|
|
33
33
|
Requires-Dist: google-cloud-bigquery-storage<3.0.0dev,>=2.6.0; extra == "bqstorage"
|
|
@@ -46,8 +46,7 @@ Provides-Extra: geopandas
|
|
|
46
46
|
Requires-Dist: geopandas<1.0dev,>=0.9.0; extra == "geopandas"
|
|
47
47
|
Requires-Dist: Shapely<3.0.0dev,>=1.8.4; extra == "geopandas"
|
|
48
48
|
Provides-Extra: ipython
|
|
49
|
-
Requires-Dist:
|
|
50
|
-
Requires-Dist: ipykernel>=6.0.0; extra == "ipython"
|
|
49
|
+
Requires-Dist: bigquery-magics>=0.1.0; extra == "ipython"
|
|
51
50
|
Provides-Extra: tqdm
|
|
52
51
|
Requires-Dist: tqdm<5.0.0dev,>=4.7.4; extra == "tqdm"
|
|
53
52
|
Provides-Extra: opentelemetry
|
|
@@ -55,8 +54,8 @@ Requires-Dist: opentelemetry-api>=1.1.0; extra == "opentelemetry"
|
|
|
55
54
|
Requires-Dist: opentelemetry-sdk>=1.1.0; extra == "opentelemetry"
|
|
56
55
|
Requires-Dist: opentelemetry-instrumentation>=0.20b0; extra == "opentelemetry"
|
|
57
56
|
Provides-Extra: bigquery-v2
|
|
58
|
-
Requires-Dist: proto-plus<2.0.0dev,>=1.
|
|
59
|
-
Requires-Dist: protobuf!=
|
|
57
|
+
Requires-Dist: proto-plus<2.0.0dev,>=1.22.3; extra == "bigquery-v2"
|
|
58
|
+
Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2; extra == "bigquery-v2"
|
|
60
59
|
Provides-Extra: all
|
|
61
60
|
Requires-Dist: google-cloud-bigquery-storage<3.0.0dev,>=2.6.0; extra == "all"
|
|
62
61
|
Requires-Dist: grpcio<2.0dev,>=1.47.0; extra == "all"
|
|
@@ -70,14 +69,13 @@ Requires-Dist: ipywidgets>=7.7.0; extra == "all"
|
|
|
70
69
|
Requires-Dist: ipykernel>=6.0.0; extra == "all"
|
|
71
70
|
Requires-Dist: geopandas<1.0dev,>=0.9.0; extra == "all"
|
|
72
71
|
Requires-Dist: Shapely<3.0.0dev,>=1.8.4; extra == "all"
|
|
73
|
-
Requires-Dist:
|
|
74
|
-
Requires-Dist: ipykernel>=6.0.0; extra == "all"
|
|
72
|
+
Requires-Dist: bigquery-magics>=0.1.0; extra == "all"
|
|
75
73
|
Requires-Dist: tqdm<5.0.0dev,>=4.7.4; extra == "all"
|
|
76
74
|
Requires-Dist: opentelemetry-api>=1.1.0; extra == "all"
|
|
77
75
|
Requires-Dist: opentelemetry-sdk>=1.1.0; extra == "all"
|
|
78
76
|
Requires-Dist: opentelemetry-instrumentation>=0.20b0; extra == "all"
|
|
79
|
-
Requires-Dist: proto-plus<2.0.0dev,>=1.
|
|
80
|
-
Requires-Dist: protobuf!=
|
|
77
|
+
Requires-Dist: proto-plus<2.0.0dev,>=1.22.3; extra == "all"
|
|
78
|
+
Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2; extra == "all"
|
|
81
79
|
|
|
82
80
|
Python Client for Google BigQuery
|
|
83
81
|
=================================
|
{google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/__init__.py
RENAMED
|
@@ -27,6 +27,7 @@ The main concepts with this API are:
|
|
|
27
27
|
- :class:`~google.cloud.bigquery.table.Table` represents a single "relation".
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
|
+
import warnings
|
|
30
31
|
|
|
31
32
|
from google.cloud.bigquery import version as bigquery_version
|
|
32
33
|
|
|
@@ -43,6 +44,7 @@ from google.cloud.bigquery.enums import KeyResultStatementKind
|
|
|
43
44
|
from google.cloud.bigquery.enums import SqlTypeNames
|
|
44
45
|
from google.cloud.bigquery.enums import StandardSqlTypeNames
|
|
45
46
|
from google.cloud.bigquery.exceptions import LegacyBigQueryStorageError
|
|
47
|
+
from google.cloud.bigquery.exceptions import LegacyPandasError
|
|
46
48
|
from google.cloud.bigquery.exceptions import LegacyPyarrowError
|
|
47
49
|
from google.cloud.bigquery.external_config import ExternalConfig
|
|
48
50
|
from google.cloud.bigquery.external_config import BigtableOptions
|
|
@@ -113,6 +115,24 @@ from google.cloud.bigquery.table import TableReference
|
|
|
113
115
|
from google.cloud.bigquery.table import TimePartitioningType
|
|
114
116
|
from google.cloud.bigquery.table import TimePartitioning
|
|
115
117
|
from google.cloud.bigquery.encryption_configuration import EncryptionConfiguration
|
|
118
|
+
from google.cloud.bigquery import _versions_helpers
|
|
119
|
+
|
|
120
|
+
try:
|
|
121
|
+
import bigquery_magics # type: ignore
|
|
122
|
+
except ImportError:
|
|
123
|
+
bigquery_magics = None
|
|
124
|
+
|
|
125
|
+
sys_major, sys_minor, sys_micro = _versions_helpers.extract_runtime_version()
|
|
126
|
+
|
|
127
|
+
if sys_major == 3 and sys_minor in (7, 8):
|
|
128
|
+
warnings.warn(
|
|
129
|
+
"The python-bigquery library will stop supporting Python 3.7 "
|
|
130
|
+
"and Python 3.8 in a future major release expected in Q4 2024. "
|
|
131
|
+
f"Your Python version is {sys_major}.{sys_minor}.{sys_micro}. We "
|
|
132
|
+
"recommend that you update soon to ensure ongoing support. For "
|
|
133
|
+
"more details, see: [Google Cloud Client Libraries Supported Python Versions policy](https://cloud.google.com/python/docs/supported-python-versions)",
|
|
134
|
+
PendingDeprecationWarning,
|
|
135
|
+
)
|
|
116
136
|
|
|
117
137
|
__all__ = [
|
|
118
138
|
"__version__",
|
|
@@ -214,8 +234,16 @@ __all__ = [
|
|
|
214
234
|
|
|
215
235
|
def load_ipython_extension(ipython):
|
|
216
236
|
"""Called by IPython when this module is loaded as an IPython extension."""
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
_cell_magic, magic_kind="cell", magic_name="bigquery"
|
|
237
|
+
warnings.warn(
|
|
238
|
+
"%load_ext google.cloud.bigquery is deprecated. Install bigquery-magics package and use `%load_ext bigquery_magics`, instead.",
|
|
239
|
+
category=FutureWarning,
|
|
221
240
|
)
|
|
241
|
+
|
|
242
|
+
if bigquery_magics is not None:
|
|
243
|
+
bigquery_magics.load_ipython_extension(ipython)
|
|
244
|
+
else:
|
|
245
|
+
from google.cloud.bigquery.magics.magics import _cell_magic
|
|
246
|
+
|
|
247
|
+
ipython.register_magic_function(
|
|
248
|
+
_cell_magic, magic_kind="cell", magic_name="bigquery"
|
|
249
|
+
)
|
{google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/_helpers.py
RENAMED
|
@@ -21,6 +21,7 @@ import json
|
|
|
21
21
|
import math
|
|
22
22
|
import re
|
|
23
23
|
import os
|
|
24
|
+
import warnings
|
|
24
25
|
from typing import Optional, Union
|
|
25
26
|
|
|
26
27
|
from dateutil import relativedelta
|
|
@@ -297,12 +298,7 @@ def _record_from_json(value, field):
|
|
|
297
298
|
record = {}
|
|
298
299
|
record_iter = zip(field.fields, value["f"])
|
|
299
300
|
for subfield, cell in record_iter:
|
|
300
|
-
|
|
301
|
-
if subfield.mode == "REPEATED":
|
|
302
|
-
value = [converter(item["v"], subfield) for item in cell["v"]]
|
|
303
|
-
else:
|
|
304
|
-
value = converter(cell["v"], subfield)
|
|
305
|
-
record[subfield.name] = value
|
|
301
|
+
record[subfield.name] = _field_from_json(cell["v"], subfield)
|
|
306
302
|
return record
|
|
307
303
|
|
|
308
304
|
|
|
@@ -382,7 +378,11 @@ def _field_to_index_mapping(schema):
|
|
|
382
378
|
|
|
383
379
|
|
|
384
380
|
def _field_from_json(resource, field):
|
|
385
|
-
|
|
381
|
+
def default_converter(value, field):
|
|
382
|
+
_warn_unknown_field_type(field)
|
|
383
|
+
return value
|
|
384
|
+
|
|
385
|
+
converter = _CELLDATA_FROM_JSON.get(field.field_type, default_converter)
|
|
386
386
|
if field.mode == "REPEATED":
|
|
387
387
|
return [converter(item["v"], field) for item in resource]
|
|
388
388
|
else:
|
|
@@ -484,6 +484,11 @@ def _json_to_json(value):
|
|
|
484
484
|
return json.dumps(value)
|
|
485
485
|
|
|
486
486
|
|
|
487
|
+
def _string_to_json(value):
|
|
488
|
+
"""NOOP string -> string coercion"""
|
|
489
|
+
return value
|
|
490
|
+
|
|
491
|
+
|
|
487
492
|
def _timestamp_to_json_parameter(value):
|
|
488
493
|
"""Coerce 'value' to an JSON-compatible representation.
|
|
489
494
|
|
|
@@ -596,6 +601,7 @@ _SCALAR_VALUE_TO_JSON_ROW = {
|
|
|
596
601
|
"DATE": _date_to_json,
|
|
597
602
|
"TIME": _time_to_json,
|
|
598
603
|
"JSON": _json_to_json,
|
|
604
|
+
"STRING": _string_to_json,
|
|
599
605
|
# Make sure DECIMAL and BIGDECIMAL are handled, even though
|
|
600
606
|
# requests for them should be converted to NUMERIC. Better safe
|
|
601
607
|
# than sorry.
|
|
@@ -609,6 +615,15 @@ _SCALAR_VALUE_TO_JSON_PARAM = _SCALAR_VALUE_TO_JSON_ROW.copy()
|
|
|
609
615
|
_SCALAR_VALUE_TO_JSON_PARAM["TIMESTAMP"] = _timestamp_to_json_parameter
|
|
610
616
|
|
|
611
617
|
|
|
618
|
+
def _warn_unknown_field_type(field):
|
|
619
|
+
warnings.warn(
|
|
620
|
+
"Unknown type '{}' for field '{}'. Behavior reading and writing this type is not officially supported and may change in the future.".format(
|
|
621
|
+
field.field_type, field.name
|
|
622
|
+
),
|
|
623
|
+
FutureWarning,
|
|
624
|
+
)
|
|
625
|
+
|
|
626
|
+
|
|
612
627
|
def _scalar_field_to_json(field, row_value):
|
|
613
628
|
"""Maps a field and value to a JSON-safe value.
|
|
614
629
|
|
|
@@ -621,9 +636,12 @@ def _scalar_field_to_json(field, row_value):
|
|
|
621
636
|
Returns:
|
|
622
637
|
Any: A JSON-serializable object.
|
|
623
638
|
"""
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
639
|
+
|
|
640
|
+
def default_converter(value):
|
|
641
|
+
_warn_unknown_field_type(field)
|
|
642
|
+
return value
|
|
643
|
+
|
|
644
|
+
converter = _SCALAR_VALUE_TO_JSON_ROW.get(field.field_type, default_converter)
|
|
627
645
|
return converter(row_value)
|
|
628
646
|
|
|
629
647
|
|
|
@@ -200,11 +200,13 @@ def bq_to_arrow_field(bq_field, array_type=None):
|
|
|
200
200
|
# local NULL values. Arrow will gladly interpret these NULL values
|
|
201
201
|
# as non-NULL and give you an arbitrary value. See:
|
|
202
202
|
# https://github.com/googleapis/python-bigquery/issues/1692
|
|
203
|
-
nullable=True,
|
|
203
|
+
nullable=False if bq_field.mode.upper() == "REPEATED" else True,
|
|
204
204
|
metadata=metadata,
|
|
205
205
|
)
|
|
206
206
|
|
|
207
|
-
warnings.warn(
|
|
207
|
+
warnings.warn(
|
|
208
|
+
"Unable to determine Arrow type for field '{}'.".format(bq_field.name)
|
|
209
|
+
)
|
|
208
210
|
return None
|
|
209
211
|
|
|
210
212
|
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
"""Shared helper functions for verifying versions of installed modules."""
|
|
16
16
|
|
|
17
|
+
import sys
|
|
17
18
|
from typing import Any
|
|
18
19
|
|
|
19
20
|
import packaging.version
|
|
@@ -248,3 +249,16 @@ SUPPORTS_RANGE_PYARROW = (
|
|
|
248
249
|
and PYARROW_VERSIONS.try_import() is not None
|
|
249
250
|
and PYARROW_VERSIONS.installed_version >= _MIN_PYARROW_VERSION_RANGE
|
|
250
251
|
)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def extract_runtime_version():
|
|
255
|
+
# Retrieve the version information
|
|
256
|
+
version_info = sys.version_info
|
|
257
|
+
|
|
258
|
+
# Extract the major, minor, and micro components
|
|
259
|
+
major = version_info.major
|
|
260
|
+
minor = version_info.minor
|
|
261
|
+
micro = version_info.micro
|
|
262
|
+
|
|
263
|
+
# Display the version number in a clear format
|
|
264
|
+
return major, minor, micro
|
|
@@ -35,12 +35,18 @@ class Connection(object):
|
|
|
35
35
|
A client that uses the faster BigQuery Storage API to fetch rows from
|
|
36
36
|
BigQuery. If not passed, it is created using the same credentials
|
|
37
37
|
as ``client`` (provided that BigQuery Storage dependencies are installed).
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
prefer_bqstorage_client (Optional[bool]):
|
|
39
|
+
Prefer the BigQuery Storage client over the REST client. If Storage
|
|
40
|
+
client isn't available, fall back to the REST client. Defaults to
|
|
41
|
+
``True``.
|
|
41
42
|
"""
|
|
42
43
|
|
|
43
|
-
def __init__(
|
|
44
|
+
def __init__(
|
|
45
|
+
self,
|
|
46
|
+
client=None,
|
|
47
|
+
bqstorage_client=None,
|
|
48
|
+
prefer_bqstorage_client=True,
|
|
49
|
+
):
|
|
44
50
|
if client is None:
|
|
45
51
|
client = bigquery.Client()
|
|
46
52
|
self._owns_client = True
|
|
@@ -49,7 +55,10 @@ class Connection(object):
|
|
|
49
55
|
|
|
50
56
|
# A warning is already raised by the BQ Storage client factory factory if
|
|
51
57
|
# instantiation fails, or if the given BQ Storage client instance is outdated.
|
|
52
|
-
if
|
|
58
|
+
if not prefer_bqstorage_client:
|
|
59
|
+
bqstorage_client = None
|
|
60
|
+
self._owns_bqstorage_client = False
|
|
61
|
+
elif bqstorage_client is None:
|
|
53
62
|
bqstorage_client = client._ensure_bqstorage_client()
|
|
54
63
|
self._owns_bqstorage_client = bqstorage_client is not None
|
|
55
64
|
else:
|
|
@@ -95,7 +104,7 @@ class Connection(object):
|
|
|
95
104
|
return new_cursor
|
|
96
105
|
|
|
97
106
|
|
|
98
|
-
def connect(client=None, bqstorage_client=None):
|
|
107
|
+
def connect(client=None, bqstorage_client=None, prefer_bqstorage_client=True):
|
|
99
108
|
"""Construct a DB-API connection to Google BigQuery.
|
|
100
109
|
|
|
101
110
|
Args:
|
|
@@ -108,11 +117,12 @@ def connect(client=None, bqstorage_client=None):
|
|
|
108
117
|
A client that uses the faster BigQuery Storage API to fetch rows from
|
|
109
118
|
BigQuery. If not passed, it is created using the same credentials
|
|
110
119
|
as ``client`` (provided that BigQuery Storage dependencies are installed).
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
prefer_bqstorage_client (Optional[bool]):
|
|
121
|
+
Prefer the BigQuery Storage client over the REST client. If Storage
|
|
122
|
+
client isn't available, fall back to the REST client. Defaults to
|
|
123
|
+
``True``.
|
|
114
124
|
|
|
115
125
|
Returns:
|
|
116
126
|
google.cloud.bigquery.dbapi.Connection: A new DB-API connection to BigQuery.
|
|
117
127
|
"""
|
|
118
|
-
return Connection(client, bqstorage_client)
|
|
128
|
+
return Connection(client, bqstorage_client, prefer_bqstorage_client)
|
{google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/job/base.py
RENAMED
|
@@ -49,7 +49,7 @@ _ERROR_REASON_TO_EXCEPTION = {
|
|
|
49
49
|
"notImplemented": http.client.NOT_IMPLEMENTED,
|
|
50
50
|
"policyViolation": http.client.FORBIDDEN,
|
|
51
51
|
"quotaExceeded": http.client.FORBIDDEN,
|
|
52
|
-
"rateLimitExceeded": http.client.
|
|
52
|
+
"rateLimitExceeded": http.client.TOO_MANY_REQUESTS,
|
|
53
53
|
"resourceInUse": http.client.BAD_REQUEST,
|
|
54
54
|
"resourcesExceeded": http.client.BAD_REQUEST,
|
|
55
55
|
"responseTooLarge": http.client.FORBIDDEN,
|
|
@@ -218,8 +218,11 @@ class _JobConfig(object):
|
|
|
218
218
|
err.__traceback__
|
|
219
219
|
)
|
|
220
220
|
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
if value is not None:
|
|
222
|
+
# docs indicate a string is expected by the API
|
|
223
|
+
self._properties["jobTimeoutMs"] = str(value)
|
|
224
|
+
else:
|
|
225
|
+
self._properties.pop("jobTimeoutMs", None)
|
|
223
226
|
|
|
224
227
|
@property
|
|
225
228
|
def labels(self):
|
{google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/job/load.py
RENAMED
|
@@ -32,6 +32,26 @@ from google.cloud.bigquery.job.base import _JobReference
|
|
|
32
32
|
from google.cloud.bigquery.query import ConnectionProperty
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
class ColumnNameCharacterMap:
|
|
36
|
+
"""Indicates the character map used for column names.
|
|
37
|
+
|
|
38
|
+
https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#columnnamecharactermap
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
COLUMN_NAME_CHARACTER_MAP_UNSPECIFIED = "COLUMN_NAME_CHARACTER_MAP_UNSPECIFIED"
|
|
42
|
+
"""Unspecified column name character map."""
|
|
43
|
+
|
|
44
|
+
STRICT = "STRICT"
|
|
45
|
+
"""Support flexible column name and reject invalid column names."""
|
|
46
|
+
|
|
47
|
+
V1 = "V1"
|
|
48
|
+
""" Support alphanumeric + underscore characters and names must start with
|
|
49
|
+
a letter or underscore. Invalid column names will be normalized."""
|
|
50
|
+
|
|
51
|
+
V2 = "V2"
|
|
52
|
+
"""Support flexible column name. Invalid column names will be normalized."""
|
|
53
|
+
|
|
54
|
+
|
|
35
55
|
class LoadJobConfig(_JobConfig):
|
|
36
56
|
"""Configuration options for load jobs.
|
|
37
57
|
|
|
@@ -597,6 +617,27 @@ class LoadJobConfig(_JobConfig):
|
|
|
597
617
|
else:
|
|
598
618
|
self._del_sub_prop("parquetOptions")
|
|
599
619
|
|
|
620
|
+
@property
|
|
621
|
+
def column_name_character_map(self) -> str:
|
|
622
|
+
"""Optional[google.cloud.bigquery.job.ColumnNameCharacterMap]:
|
|
623
|
+
Character map supported for column names in CSV/Parquet loads. Defaults
|
|
624
|
+
to STRICT and can be overridden by Project Config Service. Using this
|
|
625
|
+
option with unsupported load formats will result in an error.
|
|
626
|
+
|
|
627
|
+
See
|
|
628
|
+
https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationLoad.FIELDS.column_name_character_map
|
|
629
|
+
"""
|
|
630
|
+
return self._get_sub_prop(
|
|
631
|
+
"columnNameCharacterMap",
|
|
632
|
+
ColumnNameCharacterMap.COLUMN_NAME_CHARACTER_MAP_UNSPECIFIED,
|
|
633
|
+
)
|
|
634
|
+
|
|
635
|
+
@column_name_character_map.setter
|
|
636
|
+
def column_name_character_map(self, value: Optional[str]):
|
|
637
|
+
if value is None:
|
|
638
|
+
value = ColumnNameCharacterMap.COLUMN_NAME_CHARACTER_MAP_UNSPECIFIED
|
|
639
|
+
self._set_sub_prop("columnNameCharacterMap", value)
|
|
640
|
+
|
|
600
641
|
|
|
601
642
|
class LoadJob(_AsyncJob):
|
|
602
643
|
"""Asynchronous job for loading data into a table.
|
{google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/job/query.py
RENAMED
|
@@ -476,6 +476,11 @@ class QueryJobConfig(_JobConfig):
|
|
|
476
476
|
ID, each separated by ``.``. For example:
|
|
477
477
|
``your-project.your_dataset.your_table``.
|
|
478
478
|
|
|
479
|
+
.. note::
|
|
480
|
+
|
|
481
|
+
Only table ID is passed to the backend, so any configuration
|
|
482
|
+
in `~google.cloud.bigquery.table.Table` is discarded.
|
|
483
|
+
|
|
479
484
|
See
|
|
480
485
|
https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationQuery.FIELDS.destination_table
|
|
481
486
|
"""
|
|
@@ -1532,8 +1537,9 @@ class QueryJob(_AsyncJob):
|
|
|
1532
1537
|
# Setting max_results should be equivalent to setting page_size with
|
|
1533
1538
|
# regards to allowing the user to tune how many results to download
|
|
1534
1539
|
# while we wait for the query to finish. See internal issue:
|
|
1535
|
-
# 344008814.
|
|
1536
|
-
|
|
1540
|
+
# 344008814. But if start_index is set, user is trying to access a
|
|
1541
|
+
# specific page, so we don't need to set page_size. See issue #1950.
|
|
1542
|
+
if page_size is None and max_results is not None and start_index is None:
|
|
1537
1543
|
page_size = max_results
|
|
1538
1544
|
|
|
1539
1545
|
# When timeout has default sentinel value ``object()``, do not pass
|
{google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/magics/magics.py
RENAMED
|
@@ -14,70 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
"""IPython Magics
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
IPython cell magic to run a query and display the result as a DataFrame
|
|
20
|
-
|
|
21
|
-
.. code-block:: python
|
|
22
|
-
|
|
23
|
-
%%bigquery [<destination_var>] [--project <project>] [--use_legacy_sql]
|
|
24
|
-
[--verbose] [--params <params>]
|
|
25
|
-
<query>
|
|
26
|
-
|
|
27
|
-
Parameters:
|
|
28
|
-
|
|
29
|
-
* ``<destination_var>`` (Optional[line argument]):
|
|
30
|
-
variable to store the query results. The results are not displayed if
|
|
31
|
-
this parameter is used. If an error occurs during the query execution,
|
|
32
|
-
the corresponding ``QueryJob`` instance (if available) is stored in
|
|
33
|
-
the variable instead.
|
|
34
|
-
* ``--destination_table`` (Optional[line argument]):
|
|
35
|
-
A dataset and table to store the query results. If table does not exists,
|
|
36
|
-
it will be created. If table already exists, its data will be overwritten.
|
|
37
|
-
Variable should be in a format <dataset_id>.<table_id>.
|
|
38
|
-
* ``--no_query_cache`` (Optional[line argument]):
|
|
39
|
-
Do not use cached query results.
|
|
40
|
-
* ``--project <project>`` (Optional[line argument]):
|
|
41
|
-
Project to use for running the query. Defaults to the context
|
|
42
|
-
:attr:`~google.cloud.bigquery.magics.Context.project`.
|
|
43
|
-
* ``--use_bqstorage_api`` (Optional[line argument]):
|
|
44
|
-
[Deprecated] Not used anymore, as BigQuery Storage API is used by default.
|
|
45
|
-
* ``--use_rest_api`` (Optional[line argument]):
|
|
46
|
-
Use the BigQuery REST API instead of the Storage API.
|
|
47
|
-
* ``--use_legacy_sql`` (Optional[line argument]):
|
|
48
|
-
Runs the query using Legacy SQL syntax. Defaults to Standard SQL if
|
|
49
|
-
this argument not used.
|
|
50
|
-
* ``--verbose`` (Optional[line argument]):
|
|
51
|
-
If this flag is used, information including the query job ID and the
|
|
52
|
-
amount of time for the query to complete will not be cleared after the
|
|
53
|
-
query is finished. By default, this information will be displayed but
|
|
54
|
-
will be cleared after the query is finished.
|
|
55
|
-
* ``--params <params>`` (Optional[line argument]):
|
|
56
|
-
If present, the argument following the ``--params`` flag must be
|
|
57
|
-
either:
|
|
58
|
-
|
|
59
|
-
* :class:`str` - A JSON string representation of a dictionary in the
|
|
60
|
-
format ``{"param_name": "param_value"}`` (ex. ``{"num": 17}``). Use
|
|
61
|
-
of the parameter in the query should be indicated with
|
|
62
|
-
``@param_name``. See ``In[5]`` in the Examples section below.
|
|
63
|
-
|
|
64
|
-
* :class:`dict` reference - A reference to a ``dict`` in the format
|
|
65
|
-
``{"param_name": "param_value"}``, where the value types must be JSON
|
|
66
|
-
serializable. The variable reference is indicated by a ``$`` before
|
|
67
|
-
the variable name (ex. ``$my_dict_var``). See ``In[6]`` and ``In[7]``
|
|
68
|
-
in the Examples section below.
|
|
69
|
-
|
|
70
|
-
* ``<query>`` (required, cell argument):
|
|
71
|
-
SQL query to run. If the query does not contain any whitespace (aside
|
|
72
|
-
from leading and trailing whitespace), it is assumed to represent a
|
|
73
|
-
fully-qualified table ID, and the latter's data will be fetched.
|
|
17
|
+
Install ``bigquery-magics`` and call ``%load_ext bigquery_magics`` to use the
|
|
18
|
+
``%%bigquery`` cell magic.
|
|
74
19
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
.. note::
|
|
79
|
-
All queries run using this magic will run using the context
|
|
80
|
-
:attr:`~google.cloud.bigquery.magics.Context.credentials`.
|
|
20
|
+
See the `BigQuery Magics reference documentation
|
|
21
|
+
<https://googleapis.dev/python/bigquery-magics/latest/>`_.
|
|
81
22
|
"""
|
|
82
23
|
|
|
83
24
|
from __future__ import print_function
|
|
@@ -109,6 +50,11 @@ from google.cloud.bigquery import exceptions
|
|
|
109
50
|
from google.cloud.bigquery.dbapi import _helpers
|
|
110
51
|
from google.cloud.bigquery.magics import line_arg_parser as lap
|
|
111
52
|
|
|
53
|
+
try:
|
|
54
|
+
import bigquery_magics # type: ignore
|
|
55
|
+
except ImportError:
|
|
56
|
+
bigquery_magics = None
|
|
57
|
+
|
|
112
58
|
|
|
113
59
|
IPYTHON_USER_AGENT = "ipython-{}".format(IPython.__version__)
|
|
114
60
|
|
|
@@ -280,7 +226,14 @@ class Context(object):
|
|
|
280
226
|
self._progress_bar_type = value
|
|
281
227
|
|
|
282
228
|
|
|
283
|
-
|
|
229
|
+
# If bigquery_magics is available, we load that extension rather than this one.
|
|
230
|
+
# Ensure google.cloud.bigquery.magics.context setters are on the correct magics
|
|
231
|
+
# implementation in case the user has installed the package but hasn't updated
|
|
232
|
+
# their code.
|
|
233
|
+
if bigquery_magics is not None:
|
|
234
|
+
context = bigquery_magics.context
|
|
235
|
+
else:
|
|
236
|
+
context = Context()
|
|
284
237
|
|
|
285
238
|
|
|
286
239
|
def _handle_error(error, destination_var=None):
|
{google-cloud-bigquery-3.24.0 → google_cloud_bigquery-3.26.0}/google/cloud/bigquery/query.py
RENAMED
|
@@ -591,9 +591,8 @@ class ScalarQueryParameter(_AbstractQueryParameter):
|
|
|
591
591
|
Dict: JSON mapping
|
|
592
592
|
"""
|
|
593
593
|
value = self.value
|
|
594
|
-
converter = _SCALAR_VALUE_TO_JSON_PARAM.get(self.type_)
|
|
595
|
-
|
|
596
|
-
value = converter(value) # type: ignore
|
|
594
|
+
converter = _SCALAR_VALUE_TO_JSON_PARAM.get(self.type_, lambda value: value)
|
|
595
|
+
value = converter(value) # type: ignore
|
|
597
596
|
resource: Dict[str, Any] = {
|
|
598
597
|
"parameterType": {"type": self.type_},
|
|
599
598
|
"parameterValue": {"value": value},
|
|
@@ -748,9 +747,10 @@ class ArrayQueryParameter(_AbstractQueryParameter):
|
|
|
748
747
|
else:
|
|
749
748
|
a_type = self.array_type.to_api_repr()
|
|
750
749
|
|
|
751
|
-
converter = _SCALAR_VALUE_TO_JSON_PARAM.get(
|
|
752
|
-
|
|
753
|
-
|
|
750
|
+
converter = _SCALAR_VALUE_TO_JSON_PARAM.get(
|
|
751
|
+
a_type["type"], lambda value: value
|
|
752
|
+
)
|
|
753
|
+
values = [converter(value) for value in values] # type: ignore
|
|
754
754
|
a_values = [{"value": value} for value in values]
|
|
755
755
|
|
|
756
756
|
resource = {
|
|
@@ -792,7 +792,7 @@ class ArrayQueryParameter(_AbstractQueryParameter):
|
|
|
792
792
|
|
|
793
793
|
|
|
794
794
|
class StructQueryParameter(_AbstractQueryParameter):
|
|
795
|
-
"""
|
|
795
|
+
"""Name / positional query parameters for struct values.
|
|
796
796
|
|
|
797
797
|
Args:
|
|
798
798
|
name (Optional[str]):
|
|
@@ -897,10 +897,8 @@ class StructQueryParameter(_AbstractQueryParameter):
|
|
|
897
897
|
values[name] = repr_["parameterValue"]
|
|
898
898
|
else:
|
|
899
899
|
s_types[name] = {"name": name, "type": {"type": type_}}
|
|
900
|
-
converter = _SCALAR_VALUE_TO_JSON_PARAM.get(type_)
|
|
901
|
-
|
|
902
|
-
value = converter(value) # type: ignore
|
|
903
|
-
values[name] = {"value": value}
|
|
900
|
+
converter = _SCALAR_VALUE_TO_JSON_PARAM.get(type_, lambda value: value)
|
|
901
|
+
values[name] = {"value": converter(value)}
|
|
904
902
|
|
|
905
903
|
resource = {
|
|
906
904
|
"parameterType": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: google-cloud-bigquery
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.26.0
|
|
4
4
|
Summary: Google BigQuery API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/python-bigquery
|
|
6
6
|
Author: Google LLC
|
|
@@ -22,12 +22,12 @@ Classifier: Operating System :: OS Independent
|
|
|
22
22
|
Classifier: Topic :: Internet
|
|
23
23
|
Requires-Python: >=3.7
|
|
24
24
|
License-File: LICENSE
|
|
25
|
-
Requires-Dist: google-api-core[grpc]
|
|
25
|
+
Requires-Dist: google-api-core[grpc]<3.0.0dev,>=2.11.1
|
|
26
26
|
Requires-Dist: google-auth<3.0.0dev,>=2.14.1
|
|
27
|
-
Requires-Dist: google-cloud-core<3.0.0dev,>=
|
|
28
|
-
Requires-Dist: google-resumable-media<3.0dev,>=0.
|
|
27
|
+
Requires-Dist: google-cloud-core<3.0.0dev,>=2.4.1
|
|
28
|
+
Requires-Dist: google-resumable-media<3.0dev,>=2.0.0
|
|
29
29
|
Requires-Dist: packaging>=20.0.0
|
|
30
|
-
Requires-Dist: python-dateutil<3.0dev,>=2.7.
|
|
30
|
+
Requires-Dist: python-dateutil<3.0dev,>=2.7.3
|
|
31
31
|
Requires-Dist: requests<3.0.0dev,>=2.21.0
|
|
32
32
|
Provides-Extra: bqstorage
|
|
33
33
|
Requires-Dist: google-cloud-bigquery-storage<3.0.0dev,>=2.6.0; extra == "bqstorage"
|
|
@@ -46,8 +46,7 @@ Provides-Extra: geopandas
|
|
|
46
46
|
Requires-Dist: geopandas<1.0dev,>=0.9.0; extra == "geopandas"
|
|
47
47
|
Requires-Dist: Shapely<3.0.0dev,>=1.8.4; extra == "geopandas"
|
|
48
48
|
Provides-Extra: ipython
|
|
49
|
-
Requires-Dist:
|
|
50
|
-
Requires-Dist: ipykernel>=6.0.0; extra == "ipython"
|
|
49
|
+
Requires-Dist: bigquery-magics>=0.1.0; extra == "ipython"
|
|
51
50
|
Provides-Extra: tqdm
|
|
52
51
|
Requires-Dist: tqdm<5.0.0dev,>=4.7.4; extra == "tqdm"
|
|
53
52
|
Provides-Extra: opentelemetry
|
|
@@ -55,8 +54,8 @@ Requires-Dist: opentelemetry-api>=1.1.0; extra == "opentelemetry"
|
|
|
55
54
|
Requires-Dist: opentelemetry-sdk>=1.1.0; extra == "opentelemetry"
|
|
56
55
|
Requires-Dist: opentelemetry-instrumentation>=0.20b0; extra == "opentelemetry"
|
|
57
56
|
Provides-Extra: bigquery-v2
|
|
58
|
-
Requires-Dist: proto-plus<2.0.0dev,>=1.
|
|
59
|
-
Requires-Dist: protobuf!=
|
|
57
|
+
Requires-Dist: proto-plus<2.0.0dev,>=1.22.3; extra == "bigquery-v2"
|
|
58
|
+
Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2; extra == "bigquery-v2"
|
|
60
59
|
Provides-Extra: all
|
|
61
60
|
Requires-Dist: google-cloud-bigquery-storage<3.0.0dev,>=2.6.0; extra == "all"
|
|
62
61
|
Requires-Dist: grpcio<2.0dev,>=1.47.0; extra == "all"
|
|
@@ -70,14 +69,13 @@ Requires-Dist: ipywidgets>=7.7.0; extra == "all"
|
|
|
70
69
|
Requires-Dist: ipykernel>=6.0.0; extra == "all"
|
|
71
70
|
Requires-Dist: geopandas<1.0dev,>=0.9.0; extra == "all"
|
|
72
71
|
Requires-Dist: Shapely<3.0.0dev,>=1.8.4; extra == "all"
|
|
73
|
-
Requires-Dist:
|
|
74
|
-
Requires-Dist: ipykernel>=6.0.0; extra == "all"
|
|
72
|
+
Requires-Dist: bigquery-magics>=0.1.0; extra == "all"
|
|
75
73
|
Requires-Dist: tqdm<5.0.0dev,>=4.7.4; extra == "all"
|
|
76
74
|
Requires-Dist: opentelemetry-api>=1.1.0; extra == "all"
|
|
77
75
|
Requires-Dist: opentelemetry-sdk>=1.1.0; extra == "all"
|
|
78
76
|
Requires-Dist: opentelemetry-instrumentation>=0.20b0; extra == "all"
|
|
79
|
-
Requires-Dist: proto-plus<2.0.0dev,>=1.
|
|
80
|
-
Requires-Dist: protobuf!=
|
|
77
|
+
Requires-Dist: proto-plus<2.0.0dev,>=1.22.3; extra == "all"
|
|
78
|
+
Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2; extra == "all"
|
|
81
79
|
|
|
82
80
|
Python Client for Google BigQuery
|
|
83
81
|
=================================
|