You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "talatuyarer (via GitHub)" <gi...@apache.org> on 2025/08/04 19:39:10 UTC
Re: [PR] Added BigQuery Metastore Catalog [iceberg-python]
talatuyarer commented on code in PR #2068:
URL: https://github.com/apache/iceberg-python/pull/2068#discussion_r2252418744
##########
pyiceberg/catalog/bigquery_metastore.py:
##########
@@ -0,0 +1,419 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import json
+from typing import TYPE_CHECKING, Any, List, Optional, Set, Tuple, Union
+
+from google.api_core.exceptions import NotFound
+from google.cloud.bigquery import Client, Dataset, DatasetReference, TableReference
+from google.cloud.bigquery import Table as BQTable
+from google.cloud.bigquery.external_config import ExternalCatalogDatasetOptions, ExternalCatalogTableOptions
+from google.cloud.bigquery.schema import SerDeInfo, StorageDescriptor
+from google.cloud.exceptions import Conflict
+from google.oauth2 import service_account
+
+from pyiceberg.catalog import WAREHOUSE_LOCATION, MetastoreCatalog, PropertiesUpdateSummary
+from pyiceberg.exceptions import NamespaceAlreadyExistsError, NoSuchNamespaceError, NoSuchTableError, TableAlreadyExistsError
+from pyiceberg.io import load_file_io
+from pyiceberg.partitioning import UNPARTITIONED_PARTITION_SPEC, PartitionSpec
+from pyiceberg.schema import Schema
+from pyiceberg.serializers import FromInputFile
+from pyiceberg.table import CommitTableResponse, Table
+from pyiceberg.table.locations import load_location_provider
+from pyiceberg.table.metadata import TableMetadata, new_table_metadata
+from pyiceberg.table.snapshots import TOTAL_DATA_FILES, TOTAL_FILE_SIZE, TOTAL_RECORDS
+from pyiceberg.table.sorting import UNSORTED_SORT_ORDER, SortOrder
+from pyiceberg.table.update import TableRequirement, TableUpdate
+from pyiceberg.typedef import EMPTY_DICT, Identifier, Properties
+from pyiceberg.utils.config import Config
+
+if TYPE_CHECKING:
+ import pyarrow as pa
+
+GCP_PROJECT_ID = "gcp.project-id"
+GCP_LOCATION = "gcp.location"
+GCP_CREDENTIALS_LOCATION = "gcp.credentials-location"
+GCP_CREDENTIALS_INFO = "gcp.credentials-info"
+
+METADATA_LOCATION_PROP = "metadata_location"
+PREVIOUS_METADATA_LOCATION_PROP = "previous_metadata_location"
+TABLE_TYPE_PROP = "table_type"
+ICEBERG_TABLE_TYPE_VALUE = "ICEBERG"
+
+HIVE_SERIALIZATION_LIBRARY = "org.apache.iceberg.mr.hive.HiveIcebergSerDe"
Review Comment:
@rambleraptor Could you remove all HIVE related code. I dont think you need these.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org