google-cloud-bigquery 3.27.0__tar.gz → 3.28.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 (155) hide show
  1. {google_cloud_bigquery-3.27.0/google_cloud_bigquery.egg-info → google_cloud_bigquery-3.28.0}/PKG-INFO +6 -25
  2. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/_helpers.py +31 -1
  3. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/client.py +62 -56
  4. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/dataset.py +48 -0
  5. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/external_config.py +75 -1
  6. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/schema.py +291 -57
  7. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/table.py +102 -0
  8. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/version.py +1 -1
  9. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0/google_cloud_bigquery.egg-info}/PKG-INFO +6 -25
  10. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google_cloud_bigquery.egg-info/SOURCES.txt +1 -1
  11. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google_cloud_bigquery.egg-info/requires.txt +2 -23
  12. google_cloud_bigquery-3.28.0/pyproject.toml +104 -0
  13. google_cloud_bigquery-3.28.0/setup.py +18 -0
  14. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/test_client.py +88 -2
  15. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/test_load_config.py +24 -5
  16. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test__helpers.py +32 -0
  17. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_client.py +6 -0
  18. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_create_dataset.py +5 -0
  19. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_dataset.py +106 -0
  20. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_external_config.py +89 -0
  21. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_schema.py +312 -12
  22. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_table.py +151 -6
  23. google_cloud_bigquery-3.27.0/google_cloud_bigquery.egg-info/not-zip-safe +0 -1
  24. google_cloud_bigquery-3.27.0/setup.py +0 -142
  25. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/LICENSE +0 -0
  26. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/MANIFEST.in +0 -0
  27. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/README.rst +0 -0
  28. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/__init__.py +0 -0
  29. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/_http.py +0 -0
  30. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/_job_helpers.py +0 -0
  31. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/_pandas_helpers.py +0 -0
  32. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/_pyarrow_helpers.py +0 -0
  33. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/_tqdm_helpers.py +0 -0
  34. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/_versions_helpers.py +0 -0
  35. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/dbapi/__init__.py +0 -0
  36. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/dbapi/_helpers.py +0 -0
  37. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/dbapi/connection.py +0 -0
  38. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/dbapi/cursor.py +0 -0
  39. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/dbapi/exceptions.py +0 -0
  40. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/dbapi/types.py +0 -0
  41. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/encryption_configuration.py +0 -0
  42. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/enums.py +0 -0
  43. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/exceptions.py +0 -0
  44. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/format_options.py +0 -0
  45. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/iam.py +0 -0
  46. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/job/__init__.py +0 -0
  47. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/job/base.py +0 -0
  48. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/job/copy_.py +0 -0
  49. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/job/extract.py +0 -0
  50. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/job/load.py +0 -0
  51. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/job/query.py +0 -0
  52. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/magics/__init__.py +0 -0
  53. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/magics/line_arg_parser/__init__.py +0 -0
  54. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/magics/line_arg_parser/exceptions.py +0 -0
  55. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/magics/line_arg_parser/lexer.py +0 -0
  56. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/magics/line_arg_parser/parser.py +0 -0
  57. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/magics/line_arg_parser/visitors.py +0 -0
  58. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/magics/magics.py +0 -0
  59. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/model.py +0 -0
  60. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/opentelemetry_tracing.py +0 -0
  61. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/py.typed +0 -0
  62. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/query.py +0 -0
  63. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/retry.py +0 -0
  64. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/routine/__init__.py +0 -0
  65. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/routine/routine.py +0 -0
  66. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery/standard_sql.py +0 -0
  67. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery_v2/__init__.py +0 -0
  68. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery_v2/types/__init__.py +0 -0
  69. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery_v2/types/encryption_config.py +0 -0
  70. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery_v2/types/model.py +0 -0
  71. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery_v2/types/model_reference.py +0 -0
  72. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery_v2/types/standard_sql.py +0 -0
  73. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google/cloud/bigquery_v2/types/table_reference.py +0 -0
  74. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google_cloud_bigquery.egg-info/dependency_links.txt +0 -0
  75. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/google_cloud_bigquery.egg-info/top_level.txt +0 -0
  76. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/setup.cfg +0 -0
  77. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/__init__.py +0 -0
  78. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/characters.json +0 -0
  79. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/characters.jsonl +0 -0
  80. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/colors.avro +0 -0
  81. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/numeric_38_12.parquet +0 -0
  82. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/people.csv +0 -0
  83. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/scalars.csv +0 -0
  84. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/scalars.jsonl +0 -0
  85. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/scalars_extreme.jsonl +0 -0
  86. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/scalars_schema.json +0 -0
  87. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/scalars_schema_csv.json +0 -0
  88. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/data/schema.json +0 -0
  89. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/scrub_datasets.py +0 -0
  90. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/__init__.py +0 -0
  91. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/conftest.py +0 -0
  92. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/helpers.py +0 -0
  93. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/test_arrow.py +0 -0
  94. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/test_job_retry.py +0 -0
  95. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/test_list_rows.py +0 -0
  96. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/test_magics.py +0 -0
  97. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/test_pandas.py +0 -0
  98. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/test_query.py +0 -0
  99. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/system/test_structs.py +0 -0
  100. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/__init__.py +0 -0
  101. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/_helpers/__init__.py +0 -0
  102. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/_helpers/test_from_json.py +0 -0
  103. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/conftest.py +0 -0
  104. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/helpers.py +0 -0
  105. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/__init__.py +0 -0
  106. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/helpers.py +0 -0
  107. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/test_base.py +0 -0
  108. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/test_copy.py +0 -0
  109. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/test_extract.py +0 -0
  110. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/test_load.py +0 -0
  111. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/test_query.py +0 -0
  112. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/test_query_config.py +0 -0
  113. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/test_query_pandas.py +0 -0
  114. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/job/test_query_stats.py +0 -0
  115. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/line_arg_parser/__init__.py +0 -0
  116. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/line_arg_parser/test_lexer.py +0 -0
  117. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/line_arg_parser/test_parser.py +0 -0
  118. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/line_arg_parser/test_visitors.py +0 -0
  119. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/model/__init__.py +0 -0
  120. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/model/test_model.py +0 -0
  121. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/model/test_model_reference.py +0 -0
  122. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/routine/__init__.py +0 -0
  123. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/routine/test_remote_function_options.py +0 -0
  124. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/routine/test_routine.py +0 -0
  125. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/routine/test_routine_argument.py +0 -0
  126. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/routine/test_routine_reference.py +0 -0
  127. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test__http.py +0 -0
  128. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test__job_helpers.py +0 -0
  129. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test__pandas_helpers.py +0 -0
  130. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test__pyarrow_helpers.py +0 -0
  131. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test__versions_helpers.py +0 -0
  132. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_dbapi__helpers.py +0 -0
  133. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_dbapi_connection.py +0 -0
  134. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_dbapi_cursor.py +0 -0
  135. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_dbapi_types.py +0 -0
  136. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_delete_dataset.py +0 -0
  137. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_encryption_configuration.py +0 -0
  138. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_format_options.py +0 -0
  139. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_job_retry.py +0 -0
  140. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_legacy_types.py +0 -0
  141. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_list_datasets.py +0 -0
  142. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_list_jobs.py +0 -0
  143. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_list_models.py +0 -0
  144. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_list_projects.py +0 -0
  145. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_list_routines.py +0 -0
  146. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_list_tables.py +0 -0
  147. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_magics.py +0 -0
  148. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_opentelemetry_tracing.py +0 -0
  149. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_packaging.py +0 -0
  150. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_query.py +0 -0
  151. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_retry.py +0 -0
  152. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_signature_compatibility.py +0 -0
  153. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_standard_sql_types.py +0 -0
  154. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_table_arrow.py +0 -0
  155. {google_cloud_bigquery-3.27.0 → google_cloud_bigquery-3.28.0}/tests/unit/test_table_pandas.py +0 -0
@@ -1,12 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-cloud-bigquery
3
- Version: 3.27.0
3
+ Version: 3.28.0
4
4
  Summary: Google BigQuery API client library
5
- Home-page: https://github.com/googleapis/python-bigquery
6
- Author: Google LLC
7
- Author-email: googleapis-packages@google.com
5
+ Author-email: Google LLC <googleapis-packages@google.com>
8
6
  License: Apache 2.0
9
- Platform: Posix; MacOS X; Windows
7
+ Project-URL: Repository, https://github.com/googleapis/python-bigquery
10
8
  Classifier: Development Status :: 5 - Production/Stable
11
9
  Classifier: Intended Audience :: Developers
12
10
  Classifier: License :: OSI Approved :: Apache Software License
@@ -21,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.12
21
19
  Classifier: Operating System :: OS Independent
22
20
  Classifier: Topic :: Internet
23
21
  Requires-Python: >=3.7
22
+ Description-Content-Type: text/x-rst
24
23
  License-File: LICENSE
25
24
  Requires-Dist: google-api-core[grpc]<3.0.0dev,>=2.11.1
26
25
  Requires-Dist: google-auth<3.0.0dev,>=2.14.1
@@ -43,7 +42,7 @@ Provides-Extra: ipywidgets
43
42
  Requires-Dist: ipywidgets>=7.7.0; extra == "ipywidgets"
44
43
  Requires-Dist: ipykernel>=6.0.0; extra == "ipywidgets"
45
44
  Provides-Extra: geopandas
46
- Requires-Dist: geopandas<1.0dev,>=0.9.0; extra == "geopandas"
45
+ Requires-Dist: geopandas<2.0dev,>=0.9.0; extra == "geopandas"
47
46
  Requires-Dist: Shapely<3.0.0dev,>=1.8.4; extra == "geopandas"
48
47
  Provides-Extra: ipython
49
48
  Requires-Dist: bigquery-magics>=0.1.0; extra == "ipython"
@@ -57,25 +56,7 @@ Provides-Extra: bigquery-v2
57
56
  Requires-Dist: proto-plus<2.0.0dev,>=1.22.3; extra == "bigquery-v2"
58
57
  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"
59
58
  Provides-Extra: all
60
- Requires-Dist: google-cloud-bigquery-storage<3.0.0dev,>=2.6.0; extra == "all"
61
- Requires-Dist: grpcio<2.0dev,>=1.47.0; extra == "all"
62
- Requires-Dist: grpcio<2.0dev,>=1.49.1; python_version >= "3.11" and extra == "all"
63
- Requires-Dist: pyarrow>=3.0.0; extra == "all"
64
- Requires-Dist: pandas>=1.1.0; extra == "all"
65
- Requires-Dist: pyarrow>=3.0.0; extra == "all"
66
- Requires-Dist: db-dtypes<2.0.0dev,>=0.3.0; extra == "all"
67
- Requires-Dist: importlib_metadata>=1.0.0; python_version < "3.8" and extra == "all"
68
- Requires-Dist: ipywidgets>=7.7.0; extra == "all"
69
- Requires-Dist: ipykernel>=6.0.0; extra == "all"
70
- Requires-Dist: geopandas<1.0dev,>=0.9.0; extra == "all"
71
- Requires-Dist: Shapely<3.0.0dev,>=1.8.4; extra == "all"
72
- Requires-Dist: bigquery-magics>=0.1.0; extra == "all"
73
- Requires-Dist: tqdm<5.0.0dev,>=4.7.4; extra == "all"
74
- Requires-Dist: opentelemetry-api>=1.1.0; extra == "all"
75
- Requires-Dist: opentelemetry-sdk>=1.1.0; extra == "all"
76
- Requires-Dist: opentelemetry-instrumentation>=0.20b0; extra == "all"
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"
59
+ Requires-Dist: google-cloud-bigquery[bigquery_v2,bqstorage,geopandas,ipython,ipywidgets,opentelemetry,pandas,tqdm]; extra == "all"
79
60
 
80
61
  Python Client for Google BigQuery
81
62
  =================================
@@ -22,7 +22,7 @@ import math
22
22
  import re
23
23
  import os
24
24
  import warnings
25
- from typing import Optional, Union
25
+ from typing import Optional, Union, Any, Tuple, Type
26
26
 
27
27
  from dateutil import relativedelta
28
28
  from google.cloud._helpers import UTC # type: ignore
@@ -1004,3 +1004,33 @@ def _verify_job_config_type(job_config, expected_type, param_name="job_config"):
1004
1004
  job_config=job_config,
1005
1005
  )
1006
1006
  )
1007
+
1008
+
1009
+ def _isinstance_or_raise(
1010
+ value: Any,
1011
+ dtype: Union[Type, Tuple[Type, ...]],
1012
+ none_allowed: Optional[bool] = False,
1013
+ ) -> Any:
1014
+ """Determine whether a value type matches a given datatype or None.
1015
+ Args:
1016
+ value (Any): Value to be checked.
1017
+ dtype (type): Expected data type or tuple of data types.
1018
+ none_allowed Optional(bool): whether value is allowed to be None. Default
1019
+ is False.
1020
+ Returns:
1021
+ Any: Returns the input value if the type check is successful.
1022
+ Raises:
1023
+ TypeError: If the input value's type does not match the expected data type(s).
1024
+ """
1025
+ if none_allowed and value is None:
1026
+ return value
1027
+
1028
+ if isinstance(value, dtype):
1029
+ return value
1030
+
1031
+ or_none = ""
1032
+ if none_allowed:
1033
+ or_none = " (or None)"
1034
+
1035
+ msg = f"Pass {value} as a '{dtype}'{or_none}. Got {type(value)}."
1036
+ raise TypeError(msg)
@@ -44,6 +44,8 @@ from typing import (
44
44
  import uuid
45
45
  import warnings
46
46
 
47
+ import requests
48
+
47
49
  from google import resumable_media # type: ignore
48
50
  from google.resumable_media.requests import MultipartUpload # type: ignore
49
51
  from google.resumable_media.requests import ResumableUpload
@@ -65,6 +67,7 @@ except ImportError:
65
67
  DEFAULT_BQSTORAGE_CLIENT_INFO = None # type: ignore
66
68
 
67
69
 
70
+ from google.auth.credentials import Credentials
68
71
  from google.cloud.bigquery._http import Connection
69
72
  from google.cloud.bigquery import _job_helpers
70
73
  from google.cloud.bigquery import _pandas_helpers
@@ -126,6 +129,7 @@ pandas = (
126
129
  _versions_helpers.PANDAS_VERSIONS.try_import()
127
130
  ) # mypy check fails because pandas import is outside module, there are type: ignore comments related to this
128
131
 
132
+
129
133
  ResumableTimeoutType = Union[
130
134
  None, float, Tuple[float, float]
131
135
  ] # for resumable media methods
@@ -133,8 +137,6 @@ ResumableTimeoutType = Union[
133
137
  if typing.TYPE_CHECKING: # pragma: NO COVER
134
138
  # os.PathLike is only subscriptable in Python 3.9+, thus shielding with a condition.
135
139
  PathType = Union[str, bytes, os.PathLike[str], os.PathLike[bytes]]
136
- import requests # required by api-core
137
-
138
140
  _DEFAULT_CHUNKSIZE = 100 * 1024 * 1024 # 100 MB
139
141
  _MAX_MULTIPART_SIZE = 5 * 1024 * 1024
140
142
  _DEFAULT_NUM_RETRIES = 6
@@ -231,15 +233,23 @@ class Client(ClientWithProject):
231
233
 
232
234
  def __init__(
233
235
  self,
234
- project=None,
235
- credentials=None,
236
- _http=None,
237
- location=None,
238
- default_query_job_config=None,
239
- default_load_job_config=None,
240
- client_info=None,
241
- client_options=None,
236
+ project: Optional[str] = None,
237
+ credentials: Optional[Credentials] = None,
238
+ _http: Optional[requests.Session] = None,
239
+ location: Optional[str] = None,
240
+ default_query_job_config: Optional[QueryJobConfig] = None,
241
+ default_load_job_config: Optional[LoadJobConfig] = None,
242
+ client_info: Optional[google.api_core.client_info.ClientInfo] = None,
243
+ client_options: Optional[
244
+ Union[google.api_core.client_options.ClientOptions, Dict[str, Any]]
245
+ ] = None,
242
246
  ) -> None:
247
+ if client_options is None:
248
+ client_options = {}
249
+ if isinstance(client_options, dict):
250
+ client_options = google.api_core.client_options.from_dict(client_options)
251
+ # assert isinstance(client_options, google.api_core.client_options.ClientOptions)
252
+
243
253
  super(Client, self).__init__(
244
254
  project=project,
245
255
  credentials=credentials,
@@ -247,14 +257,10 @@ class Client(ClientWithProject):
247
257
  _http=_http,
248
258
  )
249
259
 
250
- kw_args = {"client_info": client_info}
260
+ kw_args: Dict[str, Any] = {"client_info": client_info}
251
261
  bq_host = _get_bigquery_host()
252
262
  kw_args["api_endpoint"] = bq_host if bq_host != _DEFAULT_HOST else None
253
263
  client_universe = None
254
- if client_options is None:
255
- client_options = {}
256
- if isinstance(client_options, dict):
257
- client_options = google.api_core.client_options.from_dict(client_options)
258
264
  if client_options.api_endpoint:
259
265
  api_endpoint = client_options.api_endpoint
260
266
  kw_args["api_endpoint"] = api_endpoint
@@ -1184,6 +1190,19 @@ class Client(ClientWithProject):
1184
1190
  must be provided. If a field is listed in ``fields`` and is ``None`` in
1185
1191
  ``dataset``, it will be deleted.
1186
1192
 
1193
+ For example, to update the default expiration times, specify
1194
+ both properties in the ``fields`` argument:
1195
+
1196
+ .. code-block:: python
1197
+
1198
+ bigquery_client.update_dataset(
1199
+ dataset,
1200
+ [
1201
+ "default_partition_expiration_ms",
1202
+ "default_table_expiration_ms",
1203
+ ]
1204
+ )
1205
+
1187
1206
  If ``dataset.etag`` is not ``None``, the update will only
1188
1207
  succeed if the dataset on the server has the same ETag. Thus
1189
1208
  reading a dataset with ``get_dataset``, changing its fields,
@@ -1198,19 +1217,6 @@ class Client(ClientWithProject):
1198
1217
  The properties of ``dataset`` to change. These are strings
1199
1218
  corresponding to the properties of
1200
1219
  :class:`~google.cloud.bigquery.dataset.Dataset`.
1201
-
1202
- For example, to update the default expiration times, specify
1203
- both properties in the ``fields`` argument:
1204
-
1205
- .. code-block:: python
1206
-
1207
- bigquery_client.update_dataset(
1208
- dataset,
1209
- [
1210
- "default_partition_expiration_ms",
1211
- "default_table_expiration_ms",
1212
- ]
1213
- )
1214
1220
  retry (Optional[google.api_core.retry.Retry]):
1215
1221
  How to retry the RPC.
1216
1222
  timeout (Optional[float]):
@@ -1254,6 +1260,15 @@ class Client(ClientWithProject):
1254
1260
  must be provided. If a field is listed in ``fields`` and is ``None``
1255
1261
  in ``model``, the field value will be deleted.
1256
1262
 
1263
+ For example, to update the descriptive properties of the model,
1264
+ specify them in the ``fields`` argument:
1265
+
1266
+ .. code-block:: python
1267
+
1268
+ bigquery_client.update_model(
1269
+ model, ["description", "friendly_name"]
1270
+ )
1271
+
1257
1272
  If ``model.etag`` is not ``None``, the update will only succeed if
1258
1273
  the model on the server has the same ETag. Thus reading a model with
1259
1274
  ``get_model``, changing its fields, and then passing it to
@@ -1266,15 +1281,6 @@ class Client(ClientWithProject):
1266
1281
  The properties of ``model`` to change. These are strings
1267
1282
  corresponding to the properties of
1268
1283
  :class:`~google.cloud.bigquery.model.Model`.
1269
-
1270
- For example, to update the descriptive properties of the model,
1271
- specify them in the ``fields`` argument:
1272
-
1273
- .. code-block:: python
1274
-
1275
- bigquery_client.update_model(
1276
- model, ["description", "friendly_name"]
1277
- )
1278
1284
  retry (Optional[google.api_core.retry.Retry]):
1279
1285
  A description of how to retry the API call.
1280
1286
  timeout (Optional[float]):
@@ -1318,6 +1324,15 @@ class Client(ClientWithProject):
1318
1324
  must be provided. If a field is listed in ``fields`` and is ``None``
1319
1325
  in ``routine``, the field value will be deleted.
1320
1326
 
1327
+ For example, to update the description property of the routine,
1328
+ specify it in the ``fields`` argument:
1329
+
1330
+ .. code-block:: python
1331
+
1332
+ bigquery_client.update_routine(
1333
+ routine, ["description"]
1334
+ )
1335
+
1321
1336
  .. warning::
1322
1337
  During beta, partial updates are not supported. You must provide
1323
1338
  all fields in the resource.
@@ -1336,15 +1351,6 @@ class Client(ClientWithProject):
1336
1351
  fields (Sequence[str]):
1337
1352
  The fields of ``routine`` to change, spelled as the
1338
1353
  :class:`~google.cloud.bigquery.routine.Routine` properties.
1339
-
1340
- For example, to update the description property of the routine,
1341
- specify it in the ``fields`` argument:
1342
-
1343
- .. code-block:: python
1344
-
1345
- bigquery_client.update_routine(
1346
- routine, ["description"]
1347
- )
1348
1354
  retry (Optional[google.api_core.retry.Retry]):
1349
1355
  A description of how to retry the API call.
1350
1356
  timeout (Optional[float]):
@@ -1392,6 +1398,16 @@ class Client(ClientWithProject):
1392
1398
  must be provided. If a field is listed in ``fields`` and is ``None``
1393
1399
  in ``table``, the field value will be deleted.
1394
1400
 
1401
+ For example, to update the descriptive properties of the table,
1402
+ specify them in the ``fields`` argument:
1403
+
1404
+ .. code-block:: python
1405
+
1406
+ bigquery_client.update_table(
1407
+ table,
1408
+ ["description", "friendly_name"]
1409
+ )
1410
+
1395
1411
  If ``table.etag`` is not ``None``, the update will only succeed if
1396
1412
  the table on the server has the same ETag. Thus reading a table with
1397
1413
  ``get_table``, changing its fields, and then passing it to
@@ -1403,16 +1419,6 @@ class Client(ClientWithProject):
1403
1419
  fields (Sequence[str]):
1404
1420
  The fields of ``table`` to change, spelled as the
1405
1421
  :class:`~google.cloud.bigquery.table.Table` properties.
1406
-
1407
- For example, to update the descriptive properties of the table,
1408
- specify them in the ``fields`` argument:
1409
-
1410
- .. code-block:: python
1411
-
1412
- bigquery_client.update_table(
1413
- table,
1414
- ["description", "friendly_name"]
1415
- )
1416
1422
  retry (Optional[google.api_core.retry.Retry]):
1417
1423
  A description of how to retry the API call.
1418
1424
  timeout (Optional[float]):
@@ -27,6 +27,7 @@ from google.cloud.bigquery.model import ModelReference
27
27
  from google.cloud.bigquery.routine import Routine, RoutineReference
28
28
  from google.cloud.bigquery.table import Table, TableReference
29
29
  from google.cloud.bigquery.encryption_configuration import EncryptionConfiguration
30
+ from google.cloud.bigquery import external_config
30
31
 
31
32
  from typing import Optional, List, Dict, Any, Union
32
33
 
@@ -530,6 +531,8 @@ class Dataset(object):
530
531
  "storage_billing_model": "storageBillingModel",
531
532
  "max_time_travel_hours": "maxTimeTravelHours",
532
533
  "default_rounding_mode": "defaultRoundingMode",
534
+ "resource_tags": "resourceTags",
535
+ "external_catalog_dataset_options": "externalCatalogDatasetOptions",
533
536
  }
534
537
 
535
538
  def __init__(self, dataset_ref) -> None:
@@ -801,6 +804,28 @@ class Dataset(object):
801
804
  raise ValueError("Pass a dict")
802
805
  self._properties["labels"] = value
803
806
 
807
+ @property
808
+ def resource_tags(self):
809
+ """Dict[str, str]: Resource tags of the dataset.
810
+
811
+ Optional. The tags attached to this dataset. Tag keys are globally
812
+ unique. Tag key is expected to be in the namespaced format, for
813
+ example "123456789012/environment" where 123456789012 is
814
+ the ID of the parent organization or project resource for this tag
815
+ key. Tag value is expected to be the short name, for example
816
+ "Production".
817
+
818
+ Raises:
819
+ ValueError: for invalid value types.
820
+ """
821
+ return self._properties.setdefault("resourceTags", {})
822
+
823
+ @resource_tags.setter
824
+ def resource_tags(self, value):
825
+ if not isinstance(value, dict) and value is not None:
826
+ raise ValueError("Pass a dict")
827
+ self._properties["resourceTags"] = value
828
+
804
829
  @property
805
830
  def default_encryption_configuration(self):
806
831
  """google.cloud.bigquery.encryption_configuration.EncryptionConfiguration: Custom
@@ -875,6 +900,29 @@ class Dataset(object):
875
900
  )
876
901
  self._properties["storageBillingModel"] = value
877
902
 
903
+ @property
904
+ def external_catalog_dataset_options(self):
905
+ """Options defining open source compatible datasets living in the
906
+ BigQuery catalog. Contains metadata of open source database, schema
907
+ or namespace represented by the current dataset."""
908
+
909
+ prop = _helpers._get_sub_prop(
910
+ self._properties, ["externalCatalogDatasetOptions"]
911
+ )
912
+
913
+ if prop is not None:
914
+ prop = external_config.ExternalCatalogDatasetOptions.from_api_repr(prop)
915
+ return prop
916
+
917
+ @external_catalog_dataset_options.setter
918
+ def external_catalog_dataset_options(self, value):
919
+ value = _helpers._isinstance_or_raise(
920
+ value, external_config.ExternalCatalogDatasetOptions, none_allowed=True
921
+ )
922
+ self._properties[
923
+ self._PROPERTY_TO_API_FIELD["external_catalog_dataset_options"]
924
+ ] = (value.to_api_repr() if value is not None else None)
925
+
878
926
  @classmethod
879
927
  def from_string(cls, full_dataset_id: str) -> "Dataset":
880
928
  """Construct a dataset from fully-qualified dataset ID.
@@ -18,7 +18,7 @@
18
18
  Job.configuration.query.tableDefinitions.
19
19
  """
20
20
 
21
- from __future__ import absolute_import
21
+ from __future__ import absolute_import, annotations
22
22
 
23
23
  import base64
24
24
  import copy
@@ -28,6 +28,7 @@ from google.cloud.bigquery._helpers import _to_bytes
28
28
  from google.cloud.bigquery._helpers import _bytes_to_json
29
29
  from google.cloud.bigquery._helpers import _int_or_none
30
30
  from google.cloud.bigquery._helpers import _str_or_none
31
+ from google.cloud.bigquery import _helpers
31
32
  from google.cloud.bigquery.format_options import AvroOptions, ParquetOptions
32
33
  from google.cloud.bigquery.schema import SchemaField
33
34
 
@@ -1003,3 +1004,76 @@ class ExternalConfig(object):
1003
1004
  config = cls(resource["sourceFormat"])
1004
1005
  config._properties = copy.deepcopy(resource)
1005
1006
  return config
1007
+
1008
+
1009
+ class ExternalCatalogDatasetOptions:
1010
+ """Options defining open source compatible datasets living in the BigQuery catalog.
1011
+ Contains metadata of open source database, schema or namespace represented
1012
+ by the current dataset.
1013
+
1014
+ Args:
1015
+ default_storage_location_uri (Optional[str]): The storage location URI for all
1016
+ tables in the dataset. Equivalent to hive metastore's database
1017
+ locationUri. Maximum length of 1024 characters. (str)
1018
+ parameters (Optional[dict[str, Any]]): A map of key value pairs defining the parameters
1019
+ and properties of the open source schema. Maximum size of 2Mib.
1020
+ """
1021
+
1022
+ def __init__(
1023
+ self,
1024
+ default_storage_location_uri: Optional[str] = None,
1025
+ parameters: Optional[Dict[str, Any]] = None,
1026
+ ):
1027
+ self._properties: Dict[str, Any] = {}
1028
+ self.default_storage_location_uri = default_storage_location_uri
1029
+ self.parameters = parameters
1030
+
1031
+ @property
1032
+ def default_storage_location_uri(self) -> Optional[str]:
1033
+ """Optional. The storage location URI for all tables in the dataset.
1034
+ Equivalent to hive metastore's database locationUri. Maximum length of
1035
+ 1024 characters."""
1036
+
1037
+ return self._properties.get("defaultStorageLocationUri")
1038
+
1039
+ @default_storage_location_uri.setter
1040
+ def default_storage_location_uri(self, value: Optional[str]):
1041
+ value = _helpers._isinstance_or_raise(value, str, none_allowed=True)
1042
+ self._properties["defaultStorageLocationUri"] = value
1043
+
1044
+ @property
1045
+ def parameters(self) -> Optional[Dict[str, Any]]:
1046
+ """Optional. A map of key value pairs defining the parameters and
1047
+ properties of the open source schema. Maximum size of 2Mib."""
1048
+
1049
+ return self._properties.get("parameters")
1050
+
1051
+ @parameters.setter
1052
+ def parameters(self, value: Optional[Dict[str, Any]]):
1053
+ value = _helpers._isinstance_or_raise(value, dict, none_allowed=True)
1054
+ self._properties["parameters"] = value
1055
+
1056
+ def to_api_repr(self) -> dict:
1057
+ """Build an API representation of this object.
1058
+
1059
+ Returns:
1060
+ Dict[str, Any]:
1061
+ A dictionary in the format used by the BigQuery API.
1062
+ """
1063
+ return self._properties
1064
+
1065
+ @classmethod
1066
+ def from_api_repr(cls, api_repr: dict) -> ExternalCatalogDatasetOptions:
1067
+ """Factory: constructs an instance of the class (cls)
1068
+ given its API representation.
1069
+
1070
+ Args:
1071
+ api_repr (Dict[str, Any]):
1072
+ API representation of the object to be instantiated.
1073
+
1074
+ Returns:
1075
+ An instance of the class initialized with data from 'resource'.
1076
+ """
1077
+ config = cls()
1078
+ config._properties = api_repr
1079
+ return config