google-cloud-bigquery 3.17.2__tar.gz → 3.19.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.
Files changed (151) hide show
  1. {google-cloud-bigquery-3.17.2/google_cloud_bigquery.egg-info → google-cloud-bigquery-3.19.0}/PKG-INFO +3 -2
  2. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/__init__.py +4 -0
  3. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/_helpers.py +59 -0
  4. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/_job_helpers.py +1 -1
  5. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/_pandas_helpers.py +19 -0
  6. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/client.py +103 -105
  7. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/enums.py +2 -0
  8. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/job/query.py +5 -0
  9. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/magics/magics.py +1 -1
  10. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/opentelemetry_tracing.py +1 -1
  11. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/query.py +297 -0
  12. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/standard_sql.py +35 -1
  13. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/version.py +1 -1
  14. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0/google_cloud_bigquery.egg-info}/PKG-INFO +3 -2
  15. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google_cloud_bigquery.egg-info/requires.txt +2 -1
  16. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/setup.py +2 -1
  17. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/test_client.py +38 -0
  18. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/test_pandas.py +12 -1
  19. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/test_query.py +34 -1
  20. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/conftest.py +2 -1
  21. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/helpers.py +18 -3
  22. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/test_base.py +1 -1
  23. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/test_copy.py +1 -1
  24. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/test_extract.py +1 -1
  25. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/test_load.py +1 -2
  26. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/test_query.py +8 -8
  27. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/test_query_pandas.py +1 -1
  28. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/test_query_stats.py +4 -0
  29. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test__helpers.py +95 -1
  30. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test__http.py +1 -1
  31. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test__job_helpers.py +3 -3
  32. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test__pandas_helpers.py +51 -21
  33. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test__versions_helpers.py +2 -2
  34. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_client.py +18 -7
  35. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_create_dataset.py +2 -1
  36. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_dataset.py +1 -1
  37. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_dbapi_connection.py +1 -2
  38. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_dbapi_cursor.py +1 -1
  39. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_encryption_configuration.py +1 -1
  40. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_job_retry.py +1 -1
  41. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_list_datasets.py +2 -1
  42. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_list_jobs.py +1 -1
  43. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_list_projects.py +2 -1
  44. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_magics.py +3 -3
  45. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_opentelemetry_tracing.py +1 -2
  46. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_query.py +549 -2
  47. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_retry.py +1 -1
  48. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_schema.py +1 -1
  49. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_standard_sql_types.py +52 -0
  50. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_table.py +4 -1
  51. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/LICENSE +0 -0
  52. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/MANIFEST.in +0 -0
  53. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/README.rst +0 -0
  54. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/_http.py +0 -0
  55. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/_pyarrow_helpers.py +0 -0
  56. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/_tqdm_helpers.py +0 -0
  57. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/_versions_helpers.py +0 -0
  58. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/dataset.py +0 -0
  59. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/dbapi/__init__.py +0 -0
  60. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/dbapi/_helpers.py +0 -0
  61. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/dbapi/connection.py +0 -0
  62. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/dbapi/cursor.py +0 -0
  63. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/dbapi/exceptions.py +0 -0
  64. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/dbapi/types.py +0 -0
  65. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/encryption_configuration.py +0 -0
  66. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/exceptions.py +0 -0
  67. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/external_config.py +0 -0
  68. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/format_options.py +0 -0
  69. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/iam.py +0 -0
  70. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/job/__init__.py +0 -0
  71. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/job/base.py +0 -0
  72. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/job/copy_.py +0 -0
  73. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/job/extract.py +0 -0
  74. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/job/load.py +0 -0
  75. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/magics/__init__.py +0 -0
  76. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/magics/line_arg_parser/__init__.py +0 -0
  77. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/magics/line_arg_parser/exceptions.py +0 -0
  78. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/magics/line_arg_parser/lexer.py +0 -0
  79. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/magics/line_arg_parser/parser.py +0 -0
  80. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/magics/line_arg_parser/visitors.py +0 -0
  81. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/model.py +0 -0
  82. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/py.typed +0 -0
  83. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/retry.py +0 -0
  84. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/routine/__init__.py +0 -0
  85. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/routine/routine.py +0 -0
  86. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/schema.py +0 -0
  87. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery/table.py +0 -0
  88. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery_v2/__init__.py +0 -0
  89. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery_v2/types/__init__.py +0 -0
  90. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery_v2/types/encryption_config.py +0 -0
  91. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery_v2/types/model.py +0 -0
  92. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery_v2/types/model_reference.py +0 -0
  93. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery_v2/types/standard_sql.py +0 -0
  94. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google/cloud/bigquery_v2/types/table_reference.py +0 -0
  95. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google_cloud_bigquery.egg-info/SOURCES.txt +0 -0
  96. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google_cloud_bigquery.egg-info/dependency_links.txt +0 -0
  97. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google_cloud_bigquery.egg-info/not-zip-safe +0 -0
  98. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/google_cloud_bigquery.egg-info/top_level.txt +0 -0
  99. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/setup.cfg +0 -0
  100. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/__init__.py +0 -0
  101. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/data/characters.json +0 -0
  102. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/data/characters.jsonl +0 -0
  103. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/data/colors.avro +0 -0
  104. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/data/numeric_38_12.parquet +0 -0
  105. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/data/people.csv +0 -0
  106. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/data/scalars.jsonl +0 -0
  107. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/data/scalars_extreme.jsonl +0 -0
  108. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/data/scalars_schema.json +0 -0
  109. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/data/schema.json +0 -0
  110. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/scrub_datasets.py +0 -0
  111. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/__init__.py +0 -0
  112. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/conftest.py +0 -0
  113. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/helpers.py +0 -0
  114. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/test_arrow.py +0 -0
  115. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/test_job_retry.py +0 -0
  116. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/test_list_rows.py +0 -0
  117. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/test_magics.py +0 -0
  118. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/system/test_structs.py +0 -0
  119. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/__init__.py +0 -0
  120. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/_helpers/__init__.py +0 -0
  121. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/_helpers/test_from_json.py +0 -0
  122. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/__init__.py +0 -0
  123. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/helpers.py +0 -0
  124. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/test_load_config.py +0 -0
  125. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/job/test_query_config.py +0 -0
  126. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/line_arg_parser/__init__.py +0 -0
  127. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/line_arg_parser/test_lexer.py +0 -0
  128. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/line_arg_parser/test_parser.py +0 -0
  129. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/line_arg_parser/test_visitors.py +0 -0
  130. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/model/__init__.py +0 -0
  131. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/model/test_model.py +0 -0
  132. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/model/test_model_reference.py +0 -0
  133. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/routine/__init__.py +0 -0
  134. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/routine/test_remote_function_options.py +0 -0
  135. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/routine/test_routine.py +0 -0
  136. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/routine/test_routine_argument.py +0 -0
  137. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/routine/test_routine_reference.py +0 -0
  138. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test__pyarrow_helpers.py +0 -0
  139. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_dbapi__helpers.py +0 -0
  140. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_dbapi_types.py +0 -0
  141. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_delete_dataset.py +0 -0
  142. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_external_config.py +0 -0
  143. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_format_options.py +0 -0
  144. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_legacy_types.py +0 -0
  145. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_list_models.py +0 -0
  146. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_list_routines.py +0 -0
  147. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_list_tables.py +0 -0
  148. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_packaging.py +0 -0
  149. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_signature_compatibility.py +0 -0
  150. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.0}/tests/unit/test_table_arrow.py +0 -0
  151. {google-cloud-bigquery-3.17.2 → google-cloud-bigquery-3.19.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.17.2
3
+ Version: 3.19.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,7 +22,8 @@ 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!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5
25
+ Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.1
26
+ Requires-Dist: google-auth<3.0.0dev,>=2.14.1
26
27
  Requires-Dist: google-cloud-core<3.0.0dev,>=1.6.0
27
28
  Requires-Dist: google-resumable-media<3.0dev,>=0.6.0
28
29
  Requires-Dist: packaging>=20.0.0
@@ -83,6 +83,8 @@ from google.cloud.bigquery.query import ArrayQueryParameterType
83
83
  from google.cloud.bigquery.query import ConnectionProperty
84
84
  from google.cloud.bigquery.query import ScalarQueryParameter
85
85
  from google.cloud.bigquery.query import ScalarQueryParameterType
86
+ from google.cloud.bigquery.query import RangeQueryParameter
87
+ from google.cloud.bigquery.query import RangeQueryParameterType
86
88
  from google.cloud.bigquery.query import SqlParameterScalarTypes
87
89
  from google.cloud.bigquery.query import StructQueryParameter
88
90
  from google.cloud.bigquery.query import StructQueryParameterType
@@ -122,10 +124,12 @@ __all__ = [
122
124
  "ArrayQueryParameter",
123
125
  "ScalarQueryParameter",
124
126
  "StructQueryParameter",
127
+ "RangeQueryParameter",
125
128
  "ArrayQueryParameterType",
126
129
  "ScalarQueryParameterType",
127
130
  "SqlParameterScalarTypes",
128
131
  "StructQueryParameterType",
132
+ "RangeQueryParameterType",
129
133
  # Datasets
130
134
  "Dataset",
131
135
  "DatasetReference",
@@ -30,6 +30,8 @@ from google.cloud._helpers import _datetime_from_microseconds
30
30
  from google.cloud._helpers import _RFC3339_MICROS
31
31
  from google.cloud._helpers import _RFC3339_NO_FRACTION
32
32
  from google.cloud._helpers import _to_bytes
33
+ from google.auth import credentials as ga_credentials # type: ignore
34
+ from google.api_core import client_options as client_options_lib
33
35
 
34
36
  _RFC3339_MICROS_NO_ZULU = "%Y-%m-%dT%H:%M:%S.%f"
35
37
  _TIMEONLY_WO_MICROS = "%H:%M:%S"
@@ -55,9 +57,66 @@ BIGQUERY_EMULATOR_HOST = "BIGQUERY_EMULATOR_HOST"
55
57
  _DEFAULT_HOST = "https://bigquery.googleapis.com"
56
58
  """Default host for JSON API."""
57
59
 
60
+ _DEFAULT_HOST_TEMPLATE = "https://bigquery.{UNIVERSE_DOMAIN}"
61
+ """ Templatized endpoint format. """
62
+
58
63
  _DEFAULT_UNIVERSE = "googleapis.com"
59
64
  """Default universe for the JSON API."""
60
65
 
66
+ _UNIVERSE_DOMAIN_ENV = "GOOGLE_CLOUD_UNIVERSE_DOMAIN"
67
+ """Environment variable for setting universe domain."""
68
+
69
+
70
+ def _get_client_universe(
71
+ client_options: Optional[Union[client_options_lib.ClientOptions, dict]]
72
+ ) -> str:
73
+ """Retrieves the specified universe setting.
74
+
75
+ Args:
76
+ client_options: specified client options.
77
+ Returns:
78
+ str: resolved universe setting.
79
+
80
+ """
81
+ if isinstance(client_options, dict):
82
+ client_options = client_options_lib.from_dict(client_options)
83
+ universe = _DEFAULT_UNIVERSE
84
+ options_universe = getattr(client_options, "universe_domain", None)
85
+ if (
86
+ options_universe
87
+ and isinstance(options_universe, str)
88
+ and len(options_universe) > 0
89
+ ):
90
+ universe = options_universe
91
+ else:
92
+ env_universe = os.getenv(_UNIVERSE_DOMAIN_ENV)
93
+ if isinstance(env_universe, str) and len(env_universe) > 0:
94
+ universe = env_universe
95
+ return universe
96
+
97
+
98
+ def _validate_universe(client_universe: str, credentials: ga_credentials.Credentials):
99
+ """Validates that client provided universe and universe embedded in credentials match.
100
+
101
+ Args:
102
+ client_universe (str): The universe domain configured via the client options.
103
+ credentials (ga_credentials.Credentials): The credentials being used in the client.
104
+
105
+ Raises:
106
+ ValueError: when client_universe does not match the universe in credentials.
107
+ """
108
+ if hasattr(credentials, "universe_domain"):
109
+ cred_universe = getattr(credentials, "universe_domain")
110
+ if isinstance(cred_universe, str):
111
+ if client_universe != cred_universe:
112
+ raise ValueError(
113
+ "The configured universe domain "
114
+ f"({client_universe}) does not match the universe domain "
115
+ f"found in the credentials ({cred_universe}). "
116
+ "If you haven't configured the universe domain explicitly, "
117
+ f"`{_DEFAULT_UNIVERSE}` is the default."
118
+ )
119
+
61
120
 
62
121
  def _get_bigquery_host():
63
122
  return os.environ.get(BIGQUERY_EMULATOR_HOST, _DEFAULT_HOST)
@@ -54,7 +54,7 @@ if TYPE_CHECKING: # pragma: NO COVER
54
54
 
55
55
 
56
56
  # The purpose of _TIMEOUT_BUFFER_MILLIS is to allow the server-side timeout to
57
- # happen before the client-side timeout. This is not strictly neccessary, as the
57
+ # happen before the client-side timeout. This is not strictly necessary, as the
58
58
  # client retries client-side timeouts, but the hope by making the server-side
59
59
  # timeout slightly shorter is that it can save the server from some unncessary
60
60
  # processing time.
@@ -958,6 +958,25 @@ def dataframe_to_json_generator(dataframe):
958
958
  # considered a NaN, however.
959
959
  if isinstance(is_nan, bool) and is_nan:
960
960
  continue
961
+
962
+ # Convert numpy types to corresponding Python types.
963
+ # https://stackoverflow.com/a/60441783/101923
964
+ if isinstance(value, numpy.bool_):
965
+ value = bool(value)
966
+ elif isinstance(
967
+ value,
968
+ (
969
+ numpy.int64,
970
+ numpy.int32,
971
+ numpy.int16,
972
+ numpy.int8,
973
+ numpy.uint64,
974
+ numpy.uint32,
975
+ numpy.uint16,
976
+ numpy.uint8,
977
+ ),
978
+ ):
979
+ value = int(value)
961
980
  output[column] = value
962
981
 
963
982
  yield output
@@ -78,7 +78,10 @@ from google.cloud.bigquery._helpers import _str_or_none
78
78
  from google.cloud.bigquery._helpers import _verify_job_config_type
79
79
  from google.cloud.bigquery._helpers import _get_bigquery_host
80
80
  from google.cloud.bigquery._helpers import _DEFAULT_HOST
81
+ from google.cloud.bigquery._helpers import _DEFAULT_HOST_TEMPLATE
81
82
  from google.cloud.bigquery._helpers import _DEFAULT_UNIVERSE
83
+ from google.cloud.bigquery._helpers import _validate_universe
84
+ from google.cloud.bigquery._helpers import _get_client_universe
82
85
  from google.cloud.bigquery._job_helpers import make_job_id as _make_job_id
83
86
  from google.cloud.bigquery.dataset import Dataset
84
87
  from google.cloud.bigquery.dataset import DatasetListItem
@@ -245,22 +248,23 @@ class Client(ClientWithProject):
245
248
  kw_args = {"client_info": client_info}
246
249
  bq_host = _get_bigquery_host()
247
250
  kw_args["api_endpoint"] = bq_host if bq_host != _DEFAULT_HOST else None
248
- if client_options:
249
- if isinstance(client_options, dict):
250
- client_options = google.api_core.client_options.from_dict(
251
- client_options
252
- )
253
- if client_options.api_endpoint:
254
- api_endpoint = client_options.api_endpoint
255
- kw_args["api_endpoint"] = api_endpoint
256
- elif (
257
- hasattr(client_options, "universe_domain")
258
- and client_options.universe_domain
259
- and client_options.universe_domain is not _DEFAULT_UNIVERSE
260
- ):
261
- kw_args["api_endpoint"] = _DEFAULT_HOST.replace(
262
- _DEFAULT_UNIVERSE, client_options.universe_domain
251
+ client_universe = None
252
+ if client_options is None:
253
+ client_options = {}
254
+ if isinstance(client_options, dict):
255
+ client_options = google.api_core.client_options.from_dict(client_options)
256
+ if client_options.api_endpoint:
257
+ api_endpoint = client_options.api_endpoint
258
+ kw_args["api_endpoint"] = api_endpoint
259
+ else:
260
+ client_universe = _get_client_universe(client_options)
261
+ if client_universe != _DEFAULT_UNIVERSE:
262
+ kw_args["api_endpoint"] = _DEFAULT_HOST_TEMPLATE.replace(
263
+ "{UNIVERSE_DOMAIN}", client_universe
263
264
  )
265
+ # Ensure credentials and universe are not in conflict.
266
+ if hasattr(self, "_credentials") and client_universe is not None:
267
+ _validate_universe(client_universe, self._credentials)
264
268
 
265
269
  self._connection = Connection(self, **kw_args)
266
270
  self._location = location
@@ -1716,20 +1720,24 @@ class Client(ClientWithProject):
1716
1720
  :func:`~google.cloud.bigquery.client.Client.cancel_job` instead.
1717
1721
 
1718
1722
  Args:
1719
- job_id: Job or job identifier.
1720
-
1721
- Keyword Arguments:
1722
- project:
1723
+ job_id (Union[ \
1724
+ str, \
1725
+ LoadJob, \
1726
+ CopyJob, \
1727
+ ExtractJob, \
1728
+ QueryJob \
1729
+ ]): Job or job identifier.
1730
+ project (Optional[str]):
1723
1731
  ID of the project which owns the job (defaults to the client's project).
1724
- location:
1732
+ location (Optional[str]):
1725
1733
  Location where the job was run. Ignored if ``job_id`` is a job
1726
1734
  object.
1727
- retry:
1735
+ retry (Optional[google.api_core.retry.Retry]):
1728
1736
  How to retry the RPC.
1729
- timeout:
1737
+ timeout (Optional[float]):
1730
1738
  The number of seconds to wait for the underlying HTTP transport
1731
1739
  before using ``retry``.
1732
- not_found_ok:
1740
+ not_found_ok (Optional[bool]):
1733
1741
  Defaults to ``False``. If ``True``, ignore "not found" errors
1734
1742
  when deleting the job.
1735
1743
  """
@@ -1970,12 +1978,10 @@ class Client(ClientWithProject):
1970
1978
  timeout: TimeoutType = DEFAULT_TIMEOUT,
1971
1979
  ) -> Union[job.LoadJob, job.CopyJob, job.ExtractJob, job.QueryJob]:
1972
1980
  """Create a new job.
1981
+
1973
1982
  Args:
1974
1983
  job_config (dict): configuration job representation returned from the API.
1975
-
1976
- Keyword Arguments:
1977
- retry (Optional[google.api_core.retry.Retry]):
1978
- How to retry the RPC.
1984
+ retry (Optional[google.api_core.retry.Retry]): How to retry the RPC.
1979
1985
  timeout (Optional[float]):
1980
1986
  The number of seconds to wait for the underlying HTTP transport
1981
1987
  before using ``retry``.
@@ -2066,10 +2072,14 @@ class Client(ClientWithProject):
2066
2072
  https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get
2067
2073
 
2068
2074
  Args:
2069
- job_id:
2075
+ job_id (Union[ \
2076
+ str, \
2077
+ job.LoadJob, \
2078
+ job.CopyJob, \
2079
+ job.ExtractJob, \
2080
+ job.QueryJob \
2081
+ ]):
2070
2082
  Job identifier.
2071
-
2072
- Keyword Arguments:
2073
2083
  project (Optional[str]):
2074
2084
  ID of the project which owns the job (defaults to the client's project).
2075
2085
  location (Optional[str]):
@@ -2137,8 +2147,6 @@ class Client(ClientWithProject):
2137
2147
  google.cloud.bigquery.job.ExtractJob, \
2138
2148
  google.cloud.bigquery.job.QueryJob \
2139
2149
  ]): Job identifier.
2140
-
2141
- Keyword Arguments:
2142
2150
  project (Optional[str]):
2143
2151
  ID of the project which owns the job (defaults to the client's project).
2144
2152
  location (Optional[str]):
@@ -2340,8 +2348,6 @@ class Client(ClientWithProject):
2340
2348
  in, this method attempts to create a table reference from a
2341
2349
  string using
2342
2350
  :func:`google.cloud.bigquery.table.TableReference.from_string`.
2343
-
2344
- Keyword Arguments:
2345
2351
  job_id (Optional[str]): Name of the job.
2346
2352
  job_id_prefix (Optional[str]):
2347
2353
  The user-provided prefix for a randomly generated job ID.
@@ -2415,39 +2421,42 @@ class Client(ClientWithProject):
2415
2421
  returns a :class:`~google.cloud.bigquery.job.LoadJob`.
2416
2422
 
2417
2423
  Args:
2418
- file_obj:
2424
+ file_obj (IO[bytes]):
2419
2425
  A file handle opened in binary mode for reading.
2420
- destination:
2426
+ destination (Union[Table, \
2427
+ TableReference, \
2428
+ TableListItem, \
2429
+ str \
2430
+ ]):
2421
2431
  Table into which data is to be loaded. If a string is passed
2422
2432
  in, this method attempts to create a table reference from a
2423
2433
  string using
2424
2434
  :func:`google.cloud.bigquery.table.TableReference.from_string`.
2425
-
2426
- Keyword Arguments:
2427
- rewind:
2435
+ rewind (Optional[bool]):
2428
2436
  If True, seek to the beginning of the file handle before
2429
- reading the file.
2430
- size:
2437
+ reading the file. Defaults to False.
2438
+ size (Optional[int]):
2431
2439
  The number of bytes to read from the file handle. If size is
2432
2440
  ``None`` or large, resumable upload will be used. Otherwise,
2433
2441
  multipart upload will be used.
2434
- num_retries: Number of upload retries. Defaults to 6.
2435
- job_id: Name of the job.
2436
- job_id_prefix:
2442
+ num_retries (Optional[int]): Number of upload retries. Defaults to 6.
2443
+ job_id (Optional[str]): Name of the job.
2444
+ job_id_prefix (Optional[str]):
2437
2445
  The user-provided prefix for a randomly generated job ID.
2438
2446
  This parameter will be ignored if a ``job_id`` is also given.
2439
- location:
2447
+ location (Optional[str]):
2440
2448
  Location where to run the job. Must match the location of the
2441
2449
  destination table.
2442
- project:
2450
+ project (Optional[str]):
2443
2451
  Project ID of the project of where to run the job. Defaults
2444
2452
  to the client's project.
2445
- job_config:
2453
+ job_config (Optional[LoadJobConfig]):
2446
2454
  Extra configuration options for the job.
2447
- timeout:
2455
+ timeout (Optional[float]):
2448
2456
  The number of seconds to wait for the underlying HTTP transport
2449
2457
  before using ``retry``. Depending on the retry strategy, a request
2450
2458
  may be repeated several times using the same timeout each time.
2459
+ Defaults to None.
2451
2460
 
2452
2461
  Can also be passed as a tuple (connect_timeout, read_timeout).
2453
2462
  See :meth:`requests.Session.request` documentation for details.
@@ -2535,9 +2544,13 @@ class Client(ClientWithProject):
2535
2544
  https://github.com/googleapis/python-bigquery/issues/19
2536
2545
 
2537
2546
  Args:
2538
- dataframe:
2547
+ dataframe (pandas.Dataframe):
2539
2548
  A :class:`~pandas.DataFrame` containing the data to load.
2540
- destination:
2549
+ destination (Union[ \
2550
+ Table, \
2551
+ TableReference, \
2552
+ str \
2553
+ ]):
2541
2554
  The destination table to use for loading the data. If it is an
2542
2555
  existing table, the schema of the :class:`~pandas.DataFrame`
2543
2556
  must match the schema of the destination table. If the table
@@ -2547,21 +2560,19 @@ class Client(ClientWithProject):
2547
2560
  If a string is passed in, this method attempts to create a
2548
2561
  table reference from a string using
2549
2562
  :func:`google.cloud.bigquery.table.TableReference.from_string`.
2550
-
2551
- Keyword Arguments:
2552
- num_retries: Number of upload retries.
2553
- job_id: Name of the job.
2554
- job_id_prefix:
2563
+ num_retries (Optional[int]): Number of upload retries. Defaults to 6.
2564
+ job_id (Optional[str]): Name of the job.
2565
+ job_id_prefix (Optional[str]):
2555
2566
  The user-provided prefix for a randomly generated
2556
2567
  job ID. This parameter will be ignored if a ``job_id`` is
2557
2568
  also given.
2558
- location:
2569
+ location (Optional[str]):
2559
2570
  Location where to run the job. Must match the location of the
2560
2571
  destination table.
2561
- project:
2572
+ project (Optional[str]):
2562
2573
  Project ID of the project of where to run the job. Defaults
2563
2574
  to the client's project.
2564
- job_config:
2575
+ job_config (Optional[LoadJobConfig]):
2565
2576
  Extra configuration options for the job.
2566
2577
 
2567
2578
  To override the default pandas data type conversions, supply
@@ -2578,9 +2589,10 @@ class Client(ClientWithProject):
2578
2589
  :attr:`~google.cloud.bigquery.job.SourceFormat.CSV` and
2579
2590
  :attr:`~google.cloud.bigquery.job.SourceFormat.PARQUET` are
2580
2591
  supported.
2581
- parquet_compression:
2592
+ parquet_compression (Optional[str]):
2582
2593
  [Beta] The compression method to use if intermittently
2583
2594
  serializing ``dataframe`` to a parquet file.
2595
+ Defaults to "snappy".
2584
2596
 
2585
2597
  The argument is directly passed as the ``compression``
2586
2598
  argument to the underlying ``pyarrow.parquet.write_table()``
@@ -2591,10 +2603,11 @@ class Client(ClientWithProject):
2591
2603
  passed as the ``compression`` argument to the underlying
2592
2604
  ``DataFrame.to_parquet()`` method.
2593
2605
  https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_parquet.html#pandas.DataFrame.to_parquet
2594
- timeout:
2606
+ timeout (Optional[flaot]):
2595
2607
  The number of seconds to wait for the underlying HTTP transport
2596
2608
  before using ``retry``. Depending on the retry strategy, a request may
2597
2609
  be repeated several times using the same timeout each time.
2610
+ Defaults to None.
2598
2611
 
2599
2612
  Can also be passed as a tuple (connect_timeout, read_timeout).
2600
2613
  See :meth:`requests.Session.request` documentation for details.
@@ -2784,32 +2797,36 @@ class Client(ClientWithProject):
2784
2797
  client = bigquery.Client()
2785
2798
  client.load_table_from_file(data_as_file, ...)
2786
2799
 
2787
- destination:
2800
+ destination (Union[ \
2801
+ Table, \
2802
+ TableReference, \
2803
+ TableListItem, \
2804
+ str \
2805
+ ]):
2788
2806
  Table into which data is to be loaded. If a string is passed
2789
2807
  in, this method attempts to create a table reference from a
2790
2808
  string using
2791
2809
  :func:`google.cloud.bigquery.table.TableReference.from_string`.
2792
-
2793
- Keyword Arguments:
2794
- num_retries: Number of upload retries.
2795
- job_id: Name of the job.
2796
- job_id_prefix:
2810
+ num_retries (Optional[int]): Number of upload retries. Defaults to 6.
2811
+ job_id (Optional[str]): Name of the job.
2812
+ job_id_prefix (Optional[str]):
2797
2813
  The user-provided prefix for a randomly generated job ID.
2798
2814
  This parameter will be ignored if a ``job_id`` is also given.
2799
- location:
2815
+ location (Optional[str]):
2800
2816
  Location where to run the job. Must match the location of the
2801
2817
  destination table.
2802
- project:
2818
+ project (Optional[str]):
2803
2819
  Project ID of the project of where to run the job. Defaults
2804
2820
  to the client's project.
2805
- job_config:
2821
+ job_config (Optional[LoadJobConfig]):
2806
2822
  Extra configuration options for the job. The ``source_format``
2807
2823
  setting is always set to
2808
2824
  :attr:`~google.cloud.bigquery.job.SourceFormat.NEWLINE_DELIMITED_JSON`.
2809
- timeout:
2825
+ timeout (Optional[float]):
2810
2826
  The number of seconds to wait for the underlying HTTP transport
2811
2827
  before using ``retry``. Depending on the retry strategy, a request may
2812
2828
  be repeated several times using the same timeout each time.
2829
+ Defaults to None.
2813
2830
 
2814
2831
  Can also be passed as a tuple (connect_timeout, read_timeout).
2815
2832
  See :meth:`requests.Session.request` documentation for details.
@@ -2885,23 +2902,19 @@ class Client(ClientWithProject):
2885
2902
  """Perform a resumable upload.
2886
2903
 
2887
2904
  Args:
2888
- stream: A bytes IO object open for reading.
2889
-
2890
- metadata: The metadata associated with the upload.
2891
-
2892
- num_retries:
2905
+ stream (IO[bytes]): A bytes IO object open for reading.
2906
+ metadata (Mapping[str, str]): The metadata associated with the upload.
2907
+ num_retries (int):
2893
2908
  Number of upload retries. (Deprecated: This
2894
2909
  argument will be removed in a future release.)
2895
-
2896
- timeout:
2910
+ timeout (Optional[float]):
2897
2911
  The number of seconds to wait for the underlying HTTP transport
2898
2912
  before using ``retry``. Depending on the retry strategy, a request may
2899
2913
  be repeated several times using the same timeout each time.
2900
2914
 
2901
2915
  Can also be passed as a tuple (connect_timeout, read_timeout).
2902
2916
  See :meth:`requests.Session.request` documentation for details.
2903
-
2904
- project:
2917
+ project (Optional[str]):
2905
2918
  Project ID of the project of where to run the upload. Defaults
2906
2919
  to the client's project.
2907
2920
 
@@ -2929,23 +2942,19 @@ class Client(ClientWithProject):
2929
2942
  """Initiate a resumable upload.
2930
2943
 
2931
2944
  Args:
2932
- stream: A bytes IO object open for reading.
2933
-
2934
- metadata: The metadata associated with the upload.
2935
-
2936
- num_retries:
2945
+ stream (IO[bytes]): A bytes IO object open for reading.
2946
+ metadata (Mapping[str, str]): The metadata associated with the upload.
2947
+ num_retries (int):
2937
2948
  Number of upload retries. (Deprecated: This
2938
2949
  argument will be removed in a future release.)
2939
-
2940
- timeout:
2950
+ timeout (Optional[float]):
2941
2951
  The number of seconds to wait for the underlying HTTP transport
2942
2952
  before using ``retry``. Depending on the retry strategy, a request may
2943
2953
  be repeated several times using the same timeout each time.
2944
2954
 
2945
2955
  Can also be passed as a tuple (connect_timeout, read_timeout).
2946
2956
  See :meth:`requests.Session.request` documentation for details.
2947
-
2948
- project:
2957
+ project (Optional[str]):
2949
2958
  Project ID of the project of where to run the upload. Defaults
2950
2959
  to the client's project.
2951
2960
 
@@ -3005,28 +3014,23 @@ class Client(ClientWithProject):
3005
3014
  """Perform a multipart upload.
3006
3015
 
3007
3016
  Args:
3008
- stream: A bytes IO object open for reading.
3009
-
3010
- metadata: The metadata associated with the upload.
3011
-
3012
- size:
3017
+ stream (IO[bytes]): A bytes IO object open for reading.
3018
+ metadata (Mapping[str, str]): The metadata associated with the upload.
3019
+ size (int):
3013
3020
  The number of bytes to be uploaded (which will be read
3014
3021
  from ``stream``). If not provided, the upload will be
3015
3022
  concluded once ``stream`` is exhausted (or :data:`None`).
3016
-
3017
- num_retries:
3023
+ num_retries (int):
3018
3024
  Number of upload retries. (Deprecated: This
3019
3025
  argument will be removed in a future release.)
3020
-
3021
- timeout:
3026
+ timeout (Optional[float]):
3022
3027
  The number of seconds to wait for the underlying HTTP transport
3023
3028
  before using ``retry``. Depending on the retry strategy, a request may
3024
3029
  be repeated several times using the same timeout each time.
3025
3030
 
3026
3031
  Can also be passed as a tuple (connect_timeout, read_timeout).
3027
3032
  See :meth:`requests.Session.request` documentation for details.
3028
-
3029
- project:
3033
+ project (Optional[str]):
3030
3034
  Project ID of the project of where to run the upload. Defaults
3031
3035
  to the client's project.
3032
3036
 
@@ -3118,8 +3122,6 @@ class Client(ClientWithProject):
3118
3122
  str, \
3119
3123
  ]):
3120
3124
  Table into which data is to be copied.
3121
-
3122
- Keyword Arguments:
3123
3125
  job_id (Optional[str]): The ID of the job.
3124
3126
  job_id_prefix (Optional[str]):
3125
3127
  The user-provided prefix for a randomly generated job ID.
@@ -3216,8 +3218,6 @@ class Client(ClientWithProject):
3216
3218
  URIs of Cloud Storage file(s) into which table data is to be
3217
3219
  extracted; in format
3218
3220
  ``gs://<bucket_name>/<object_name_or_glob>``.
3219
-
3220
- Keyword Arguments:
3221
3221
  job_id (Optional[str]): The ID of the job.
3222
3222
  job_id_prefix (Optional[str]):
3223
3223
  The user-provided prefix for a randomly generated job ID.
@@ -3306,8 +3306,6 @@ class Client(ClientWithProject):
3306
3306
  query (str):
3307
3307
  SQL query to be executed. Defaults to the standard SQL
3308
3308
  dialect. Use the ``job_config`` parameter to change dialects.
3309
-
3310
- Keyword Arguments:
3311
3309
  job_config (Optional[google.cloud.bigquery.job.QueryJobConfig]):
3312
3310
  Extra configuration options for the job.
3313
3311
  To override any options that were previously set in
@@ -254,6 +254,7 @@ class StandardSqlTypeNames(str, enum.Enum):
254
254
  JSON = enum.auto()
255
255
  ARRAY = enum.auto()
256
256
  STRUCT = enum.auto()
257
+ RANGE = enum.auto()
257
258
 
258
259
 
259
260
  class EntityTypes(str, enum.Enum):
@@ -292,6 +293,7 @@ class SqlTypeNames(str, enum.Enum):
292
293
  TIME = "TIME"
293
294
  DATETIME = "DATETIME"
294
295
  INTERVAL = "INTERVAL" # NOTE: not available in legacy types
296
+ RANGE = "RANGE" # NOTE: not available in legacy types
295
297
 
296
298
 
297
299
  class WriteDisposition(object):
@@ -2263,6 +2263,11 @@ class QueryPlanEntry(object):
2263
2263
  for step in self._properties.get("steps", [])
2264
2264
  ]
2265
2265
 
2266
+ @property
2267
+ def slot_ms(self):
2268
+ """Optional[int]: Slot-milliseconds used by the stage."""
2269
+ return _helpers._int_or_none(self._properties.get("slotMs"))
2270
+
2266
2271
 
2267
2272
  class TimelineEntry(object):
2268
2273
  """TimelineEntry represents progress of a query job at a particular
@@ -288,7 +288,7 @@ def _handle_error(error, destination_var=None):
288
288
 
289
289
  Args:
290
290
  error (Exception):
291
- An exception that ocurred during the query execution.
291
+ An exception that occurred during the query execution.
292
292
  destination_var (Optional[str]):
293
293
  The name of the IPython session variable to store the query job.
294
294
  """
@@ -90,7 +90,7 @@ def _get_final_span_attributes(attributes=None, client=None, job_ref=None):
90
90
  """Compiles attributes from: client, job_ref, user-provided attributes.
91
91
 
92
92
  Attributes from all of these sources are merged together. Note the
93
- attributes are added sequentially based on perceived order of precendence:
93
+ attributes are added sequentially based on perceived order of precedence:
94
94
  i.e. attributes added last may overwrite attributes added earlier.
95
95
 
96
96
  Args: