| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,8 +16,8 @@ version: v0.19.0 | |||
| 16 | 16 | repo: googleapis/google-cloud-python | |
| 17 | 17 | sources: | |
| 18 | 18 | googleapis: | |
| 19 | - commit: d8daa97972d091191898915589335cef66fcdc8a | ||
| 20 | - sha256: 7dbdf2b1b667fe57128d41c77e530a2541767772cfe3487713f29b7b25d9f5ad | ||
| 19 | + commit: f93e046328794785ad89869f00c0358dfcff2c35 | ||
| 20 | + sha256: 415249f584d57e5a2298c36ae9ff71563403112dee04ac961023a1b0098404d2 | ||
| 21 | 21 | default: | |
| 22 | 22 | output: packages | |
| 23 | 23 | tag_format: '{name}-v{version}' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -65,34 +65,15 @@ | |||
| 65 | 65 | ||
| 66 | 66 | ||
| 67 | 67 | class IcebergCatalogServiceAsyncClient: | |
| 68 | - """Iceberg Catalog Service API: this implements the open-source Iceberg | ||
| 69 | - REST Catalog API. See the API definition here: | ||
| 70 | - https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml | ||
| 71 | - | ||
| 72 | - The API is defined as OpenAPI 3.1.1 spec. | ||
| 73 | - | ||
| 74 | - Currently we only support the following methods: | ||
| 75 | - | ||
| 76 | - - GetConfig/GetIcebergCatalogConfig | ||
| 77 | - - ListIcebergNamespaces | ||
| 78 | - - CheckIcebergNamespaceExists | ||
| 79 | - - GetIcebergNamespace | ||
| 80 | - - CreateIcebergNamespace (only supports single level) | ||
| 81 | - - DeleteIcebergNamespace | ||
| 82 | - - UpdateIcebergNamespace properties | ||
| 83 | - - ListTableIdentifiers | ||
| 84 | - - CreateIcebergTable | ||
| 85 | - - DeleteIcebergTable | ||
| 86 | - - GetIcebergTable | ||
| 87 | - - UpdateIcebergTable (CommitTable) | ||
| 88 | - - LoadIcebergTableCredentials | ||
| 89 | - - RegisterTable | ||
| 90 | - | ||
| 91 | - Users are required to provided the ``X-Goog-User-Project`` header | ||
| 92 | - with the project id or number which can be different from the bucket | ||
| 93 | - project id. That project will be charged for the API calls and the | ||
| 94 | - calling user must have access to that project. The caller must have | ||
| 95 | - ``serviceusage.services.use`` permission on the project. | ||
| 68 | + """Lakehouse runtime catalog supports the following catalog | ||
| 69 | + management methods: | ||
| 70 | + | ||
| 71 | + - GetIcebergCatalog | ||
| 72 | + - ListIcebergCatalogs | ||
| 73 | + - DeleteIcebergCatalog | ||
| 74 | + - UpdateIcebergCatalog | ||
| 75 | + - CreateIcebergCatalog | ||
| 76 | + - FailoverIcebergCatalog | ||
| 96 | 77 | """ | |
| 97 | 78 | ||
| 98 | 79 | _client: IcebergCatalogServiceClient | |
@@ -106,6 +87,10 @@ class IcebergCatalogServiceAsyncClient: | |||
| 106 | 87 | ||
| 107 | 88 | catalog_path = staticmethod(IcebergCatalogServiceClient.catalog_path) | |
| 108 | 89 | parse_catalog_path = staticmethod(IcebergCatalogServiceClient.parse_catalog_path) | |
| 90 | + secret_path = staticmethod(IcebergCatalogServiceClient.secret_path) | ||
| 91 | + parse_secret_path = staticmethod(IcebergCatalogServiceClient.parse_secret_path) | ||
| 92 | + service_path = staticmethod(IcebergCatalogServiceClient.service_path) | ||
| 93 | + parse_service_path = staticmethod(IcebergCatalogServiceClient.parse_service_path) | ||
| 109 | 94 | common_billing_account_path = staticmethod( | |
| 110 | 95 | IcebergCatalogServiceClient.common_billing_account_path | |
| 111 | 96 | ) | |
@@ -599,7 +584,7 @@ async def sample_update_iceberg_catalog(): | |||
| 599 | 584 | ||
| 600 | 585 | # Initialize request argument(s) | |
| 601 | 586 | iceberg_catalog = biglake_v1.IcebergCatalog() | |
| 602 | - iceberg_catalog.catalog_type = "CATALOG_TYPE_GCS_BUCKET" | ||
| 587 | + iceberg_catalog.catalog_type = "CATALOG_TYPE_FEDERATED" | ||
| 603 | 588 | ||
| 604 | 589 | request = biglake_v1.UpdateIcebergCatalogRequest( | |
| 605 | 590 | iceberg_catalog=iceberg_catalog, | |
@@ -701,12 +686,12 @@ async def create_iceberg_catalog( | |||
| 701 | 686 | parent: Optional[str] = None, | |
| 702 | 687 | iceberg_catalog: Optional[iceberg_rest_catalog.IcebergCatalog] = None, | |
| 703 | 688 | iceberg_catalog_id: Optional[str] = None, | |
| 689 | + primary_location: Optional[str] = None, | ||
| 704 | 690 | retry: OptionalRetry = gapic_v1.method.DEFAULT, | |
| 705 | 691 | timeout: Union[float, object] = gapic_v1.method.DEFAULT, | |
| 706 | 692 | metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), | |
| 707 | 693 | ) -> iceberg_rest_catalog.IcebergCatalog: | |
| 708 | - r"""Creates the Iceberg REST Catalog. Currently only supports Google | ||
| 709 | - Cloud Storage Bucket catalogs. Google Cloud Storage Bucket | ||
| 694 | + r"""Creates the Iceberg REST Catalog. Google Cloud Storage Bucket | ||
| 710 | 695 | catalog id is the bucket for which the catalog is created (e.g. | |
| 711 | 696 | ``my-catalog`` for ``gs://my-catalog``). | |
| 712 | 697 | ||
@@ -730,7 +715,7 @@ async def sample_create_iceberg_catalog(): | |||
| 730 | 715 | ||
| 731 | 716 | # Initialize request argument(s) | |
| 732 | 717 | iceberg_catalog = biglake_v1.IcebergCatalog() | |
| 733 | - iceberg_catalog.catalog_type = "CATALOG_TYPE_GCS_BUCKET" | ||
| 718 | + iceberg_catalog.catalog_type = "CATALOG_TYPE_FEDERATED" | ||
| 734 | 719 | ||
| 735 | 720 | request = biglake_v1.CreateIcebergCatalogRequest( | |
| 736 | 721 | parent="parent_value", | |
@@ -770,6 +755,27 @@ async def sample_create_iceberg_catalog(): | |||
| 770 | 755 | This corresponds to the ``iceberg_catalog_id`` field | |
| 771 | 756 | on the ``request`` instance; if ``request`` is provided, this | |
| 772 | 757 | should not be set. | |
| 758 | + primary_location (:class:`str`): | ||
| 759 | + Optional. The primary location where the catalog | ||
| 760 | + metadata will be stored. | ||
| 761 | + | ||
| 762 | + For Google Cloud Storage bucket catalogs and BigLake | ||
| 763 | + catalogs, if this is not specified, then the region is | ||
| 764 | + inferred from the bucket's region (``default_location`` | ||
| 765 | + bucket for BigLake catalogs). If specified, the region | ||
| 766 | + must be in jurisdiction (near the ``default_location`` | ||
| 767 | + bucket's region and the ``restricted_locations`` | ||
| 768 | + buckets' regions for BigLake catalogs). | ||
| 769 | + | ||
| 770 | + For federated catalogs, this must be specified and be a | ||
| 771 | + Lakehouse-supported location | ||
| 772 | + (https://docs.cloud.google.com/lakehouse/docs/locations). | ||
| 773 | + It should be close to the remote catalog's location for | ||
| 774 | + the best performance and cost. | ||
| 775 | + | ||
| 776 | + This corresponds to the ``primary_location`` field | ||
| 777 | + on the ``request`` instance; if ``request`` is provided, this | ||
| 778 | + should not be set. | ||
| 773 | 779 | retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, | |
| 774 | 780 | should be retried. | |
| 775 | 781 | timeout (float): The timeout for this request. | |
@@ -785,7 +791,12 @@ async def sample_create_iceberg_catalog(): | |||
| 785 | 791 | # Create or coerce a protobuf request object. | |
| 786 | 792 | # - Quick check: If we got a request object, we should *not* have | |
| 787 | 793 | # gotten any keyword arguments that map to the request. | |
| 788 | - flattened_params = [parent, iceberg_catalog, iceberg_catalog_id] | ||
| 794 | + flattened_params = [ | ||
| 795 | + parent, | ||
| 796 | + iceberg_catalog, | ||
| 797 | + iceberg_catalog_id, | ||
| 798 | + primary_location, | ||
| 799 | + ] | ||
| 789 | 800 | has_flattened_params = ( | |
| 790 | 801 | len([param for param in flattened_params if param is not None]) > 0 | |
| 791 | 802 | ) | |
@@ -808,6 +819,8 @@ async def sample_create_iceberg_catalog(): | |||
| 808 | 819 | request.iceberg_catalog = iceberg_catalog | |
| 809 | 820 | if iceberg_catalog_id is not None: | |
| 810 | 821 | request.iceberg_catalog_id = iceberg_catalog_id | |
| 822 | + if primary_location is not None: | ||
| 823 | + request.primary_location = primary_location | ||
| 811 | 824 | ||
| 812 | 825 | # Wrap the RPC method; this adds retry and timeout information, | |
| 813 | 826 | # and friendly error handling. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -109,34 +109,15 @@ def get_transport_class( | |||
| 109 | 109 | ||
| 110 | 110 | ||
| 111 | 111 | class IcebergCatalogServiceClient(metaclass=IcebergCatalogServiceClientMeta): | |
| 112 | - """Iceberg Catalog Service API: this implements the open-source Iceberg | ||
| 113 | - REST Catalog API. See the API definition here: | ||
| 114 | - https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml | ||
| 115 | - | ||
| 116 | - The API is defined as OpenAPI 3.1.1 spec. | ||
| 117 | - | ||
| 118 | - Currently we only support the following methods: | ||
| 119 | - | ||
| 120 | - - GetConfig/GetIcebergCatalogConfig | ||
| 121 | - - ListIcebergNamespaces | ||
| 122 | - - CheckIcebergNamespaceExists | ||
| 123 | - - GetIcebergNamespace | ||
| 124 | - - CreateIcebergNamespace (only supports single level) | ||
| 125 | - - DeleteIcebergNamespace | ||
| 126 | - - UpdateIcebergNamespace properties | ||
| 127 | - - ListTableIdentifiers | ||
| 128 | - - CreateIcebergTable | ||
| 129 | - - DeleteIcebergTable | ||
| 130 | - - GetIcebergTable | ||
| 131 | - - UpdateIcebergTable (CommitTable) | ||
| 132 | - - LoadIcebergTableCredentials | ||
| 133 | - - RegisterTable | ||
| 134 | - | ||
| 135 | - Users are required to provided the ``X-Goog-User-Project`` header | ||
| 136 | - with the project id or number which can be different from the bucket | ||
| 137 | - project id. That project will be charged for the API calls and the | ||
| 138 | - calling user must have access to that project. The caller must have | ||
| 139 | - ``serviceusage.services.use`` permission on the project. | ||
| 112 | + """Lakehouse runtime catalog supports the following catalog | ||
| 113 | + management methods: | ||
| 114 | + | ||
| 115 | + - GetIcebergCatalog | ||
| 116 | + - ListIcebergCatalogs | ||
| 117 | + - DeleteIcebergCatalog | ||
| 118 | + - UpdateIcebergCatalog | ||
| 119 | + - CreateIcebergCatalog | ||
| 120 | + - FailoverIcebergCatalog | ||
| 140 | 121 | """ | |
| 141 | 122 | ||
| 142 | 123 | @staticmethod | |
@@ -274,6 +255,47 @@ def parse_catalog_path(path: str) -> Dict[str, str]: | |||
| 274 | 255 | m = re.match(r"^projects/(?P<project>.+?)/catalogs/(?P<catalog>.+?)$", path) | |
| 275 | 256 | return m.groupdict() if m else {} | |
| 276 | 257 | ||
| 258 | + @staticmethod | ||
| 259 | + def secret_path( | ||
| 260 | + project: str, | ||
| 261 | + secret: str, | ||
| 262 | + ) -> str: | ||
| 263 | + """Returns a fully-qualified secret string.""" | ||
| 264 | + return "projects/{project}/secrets/{secret}".format( | ||
| 265 | + project=project, | ||
| 266 | + secret=secret, | ||
| 267 | + ) | ||
| 268 | + | ||
| 269 | + @staticmethod | ||
| 270 | + def parse_secret_path(path: str) -> Dict[str, str]: | ||
| 271 | + """Parses a secret path into its component segments.""" | ||
| 272 | + m = re.match(r"^projects/(?P<project>.+?)/secrets/(?P<secret>.+?)$", path) | ||
| 273 | + return m.groupdict() if m else {} | ||
| 274 | + | ||
| 275 | + @staticmethod | ||
| 276 | + def service_path( | ||
| 277 | + project: str, | ||
| 278 | + location: str, | ||
| 279 | + namespace: str, | ||
| 280 | + service: str, | ||
| 281 | + ) -> str: | ||
| 282 | + """Returns a fully-qualified service string.""" | ||
| 283 | + return "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}".format( | ||
| 284 | + project=project, | ||
| 285 | + location=location, | ||
| 286 | + namespace=namespace, | ||
| 287 | + service=service, | ||
| 288 | + ) | ||
| 289 | + | ||
| 290 | + @staticmethod | ||
| 291 | + def parse_service_path(path: str) -> Dict[str, str]: | ||
| 292 | + """Parses a service path into its component segments.""" | ||
| 293 | + m = re.match( | ||
| 294 | + r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/namespaces/(?P<namespace>.+?)/services/(?P<service>.+?)$", | ||
| 295 | + path, | ||
| 296 | + ) | ||
| 297 | + return m.groupdict() if m else {} | ||
| 298 | + | ||
| 277 | 299 | @staticmethod | |
| 278 | 300 | def common_billing_account_path( | |
| 279 | 301 | billing_account: str, | |
@@ -1021,7 +1043,7 @@ def sample_update_iceberg_catalog(): | |||
| 1021 | 1043 | ||
| 1022 | 1044 | # Initialize request argument(s) | |
| 1023 | 1045 | iceberg_catalog = biglake_v1.IcebergCatalog() | |
| 1024 | - iceberg_catalog.catalog_type = "CATALOG_TYPE_GCS_BUCKET" | ||
| 1046 | + iceberg_catalog.catalog_type = "CATALOG_TYPE_FEDERATED" | ||
| 1025 | 1047 | ||
| 1026 | 1048 | request = biglake_v1.UpdateIcebergCatalogRequest( | |
| 1027 | 1049 | iceberg_catalog=iceberg_catalog, | |
@@ -1120,12 +1142,12 @@ def create_iceberg_catalog( | |||
| 1120 | 1142 | parent: Optional[str] = None, | |
| 1121 | 1143 | iceberg_catalog: Optional[iceberg_rest_catalog.IcebergCatalog] = None, | |
| 1122 | 1144 | iceberg_catalog_id: Optional[str] = None, | |
| 1145 | + primary_location: Optional[str] = None, | ||
| 1123 | 1146 | retry: OptionalRetry = gapic_v1.method.DEFAULT, | |
| 1124 | 1147 | timeout: Union[float, object] = gapic_v1.method.DEFAULT, | |
| 1125 | 1148 | metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), | |
| 1126 | 1149 | ) -> iceberg_rest_catalog.IcebergCatalog: | |
| 1127 | - r"""Creates the Iceberg REST Catalog. Currently only supports Google | ||
| 1128 | - Cloud Storage Bucket catalogs. Google Cloud Storage Bucket | ||
| 1150 | + r"""Creates the Iceberg REST Catalog. Google Cloud Storage Bucket | ||
| 1129 | 1151 | catalog id is the bucket for which the catalog is created (e.g. | |
| 1130 | 1152 | ``my-catalog`` for ``gs://my-catalog``). | |
| 1131 | 1153 | ||
@@ -1149,7 +1171,7 @@ def sample_create_iceberg_catalog(): | |||
| 1149 | 1171 | ||
| 1150 | 1172 | # Initialize request argument(s) | |
| 1151 | 1173 | iceberg_catalog = biglake_v1.IcebergCatalog() | |
| 1152 | - iceberg_catalog.catalog_type = "CATALOG_TYPE_GCS_BUCKET" | ||
| 1174 | + iceberg_catalog.catalog_type = "CATALOG_TYPE_FEDERATED" | ||
| 1153 | 1175 | ||
| 1154 | 1176 | request = biglake_v1.CreateIcebergCatalogRequest( | |
| 1155 | 1177 | parent="parent_value", | |
@@ -1189,6 +1211,27 @@ def sample_create_iceberg_catalog(): | |||
| 1189 | 1211 | This corresponds to the ``iceberg_catalog_id`` field | |
| 1190 | 1212 | on the ``request`` instance; if ``request`` is provided, this | |
| 1191 | 1213 | should not be set. | |
| 1214 | + primary_location (str): | ||
| 1215 | + Optional. The primary location where the catalog | ||
| 1216 | + metadata will be stored. | ||
| 1217 | + | ||
| 1218 | + For Google Cloud Storage bucket catalogs and BigLake | ||
| 1219 | + catalogs, if this is not specified, then the region is | ||
| 1220 | + inferred from the bucket's region (``default_location`` | ||
| 1221 | + bucket for BigLake catalogs). If specified, the region | ||
| 1222 | + must be in jurisdiction (near the ``default_location`` | ||
| 1223 | + bucket's region and the ``restricted_locations`` | ||
| 1224 | + buckets' regions for BigLake catalogs). | ||
| 1225 | + | ||
| 1226 | + For federated catalogs, this must be specified and be a | ||
| 1227 | + Lakehouse-supported location | ||
| 1228 | + (https://docs.cloud.google.com/lakehouse/docs/locations). | ||
| 1229 | + It should be close to the remote catalog's location for | ||
| 1230 | + the best performance and cost. | ||
| 1231 | + | ||
| 1232 | + This corresponds to the ``primary_location`` field | ||
| 1233 | + on the ``request`` instance; if ``request`` is provided, this | ||
| 1234 | + should not be set. | ||
| 1192 | 1235 | retry (google.api_core.retry.Retry): Designation of what errors, if any, | |
| 1193 | 1236 | should be retried. | |
| 1194 | 1237 | timeout (float): The timeout for this request. | |
@@ -1204,7 +1247,12 @@ def sample_create_iceberg_catalog(): | |||
| 1204 | 1247 | # Create or coerce a protobuf request object. | |
| 1205 | 1248 | # - Quick check: If we got a request object, we should *not* have | |
| 1206 | 1249 | # gotten any keyword arguments that map to the request. | |
| 1207 | - flattened_params = [parent, iceberg_catalog, iceberg_catalog_id] | ||
| 1250 | + flattened_params = [ | ||
| 1251 | + parent, | ||
| 1252 | + iceberg_catalog, | ||
| 1253 | + iceberg_catalog_id, | ||
| 1254 | + primary_location, | ||
| 1255 | + ] | ||
| 1208 | 1256 | has_flattened_params = ( | |
| 1209 | 1257 | len([param for param in flattened_params if param is not None]) > 0 | |
| 1210 | 1258 | ) | |
@@ -1226,6 +1274,8 @@ def sample_create_iceberg_catalog(): | |||
| 1226 | 1274 | request.iceberg_catalog = iceberg_catalog | |
| 1227 | 1275 | if iceberg_catalog_id is not None: | |
| 1228 | 1276 | request.iceberg_catalog_id = iceberg_catalog_id | |
| 1277 | + if primary_location is not None: | ||
| 1278 | + request.primary_location = primary_location | ||
| 1229 | 1279 | ||
| 1230 | 1280 | # Wrap the RPC method; this adds retry and timeout information, | |
| 1231 | 1281 | # and friendly error handling. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -110,34 +110,15 @@ def intercept_unary_unary(self, continuation, client_call_details, request): | |||
| 110 | 110 | class IcebergCatalogServiceGrpcTransport(IcebergCatalogServiceTransport): | |
| 111 | 111 | """gRPC backend transport for IcebergCatalogService. | |
| 112 | 112 | ||
| 113 | - Iceberg Catalog Service API: this implements the open-source Iceberg | ||
| 114 | - REST Catalog API. See the API definition here: | ||
| 115 | - https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml | ||
| 116 | - | ||
| 117 | - The API is defined as OpenAPI 3.1.1 spec. | ||
| 118 | - | ||
| 119 | - Currently we only support the following methods: | ||
| 120 | - | ||
| 121 | - - GetConfig/GetIcebergCatalogConfig | ||
| 122 | - - ListIcebergNamespaces | ||
| 123 | - - CheckIcebergNamespaceExists | ||
| 124 | - - GetIcebergNamespace | ||
| 125 | - - CreateIcebergNamespace (only supports single level) | ||
| 126 | - - DeleteIcebergNamespace | ||
| 127 | - - UpdateIcebergNamespace properties | ||
| 128 | - - ListTableIdentifiers | ||
| 129 | - - CreateIcebergTable | ||
| 130 | - - DeleteIcebergTable | ||
| 131 | - - GetIcebergTable | ||
| 132 | - - UpdateIcebergTable (CommitTable) | ||
| 133 | - - LoadIcebergTableCredentials | ||
| 134 | - - RegisterTable | ||
| 135 | - | ||
| 136 | - Users are required to provided the ``X-Goog-User-Project`` header | ||
| 137 | - with the project id or number which can be different from the bucket | ||
| 138 | - project id. That project will be charged for the API calls and the | ||
| 139 | - calling user must have access to that project. The caller must have | ||
| 140 | - ``serviceusage.services.use`` permission on the project. | ||
| 113 | + Lakehouse runtime catalog supports the following catalog | ||
| 114 | + management methods: | ||
| 115 | + | ||
| 116 | + - GetIcebergCatalog | ||
| 117 | + - ListIcebergCatalogs | ||
| 118 | + - DeleteIcebergCatalog | ||
| 119 | + - UpdateIcebergCatalog | ||
| 120 | + - CreateIcebergCatalog | ||
| 121 | + - FailoverIcebergCatalog | ||
| 141 | 122 | ||
| 142 | 123 | This class defines the same methods as the primary client, so the | |
| 143 | 124 | primary client can load the underlying transport implementation | |
@@ -450,8 +431,7 @@ def create_iceberg_catalog( | |||
| 450 | 431 | ]: | |
| 451 | 432 | r"""Return a callable for the create iceberg catalog method over gRPC. | |
| 452 | 433 | ||
| 453 | - Creates the Iceberg REST Catalog. Currently only supports Google | ||
| 454 | - Cloud Storage Bucket catalogs. Google Cloud Storage Bucket | ||
| 434 | + Creates the Iceberg REST Catalog. Google Cloud Storage Bucket | ||
| 455 | 435 | catalog id is the bucket for which the catalog is created (e.g. | |
| 456 | 436 | ``my-catalog`` for ``gs://my-catalog``). | |
| 457 | 437 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments