@@ -132,7 +132,6 @@ def create_table(
132132
133133 dataset_name , table_name = self .identifier_to_database_and_table (identifier )
134134
135- dataset_ref = DatasetReference (project = self .project_id , dataset_id = dataset_name )
136135 location = self ._resolve_table_location (location , dataset_name , table_name )
137136 provider = load_location_provider (table_location = location , table_properties = properties )
138137 metadata_location = provider .new_table_metadata_file_location ()
@@ -172,9 +171,7 @@ def create_namespace(self, namespace: str | Identifier, properties: Properties =
172171 try :
173172 dataset_ref = DatasetReference (project = self .project_id , dataset_id = database_name )
174173 dataset = Dataset (dataset_ref = dataset_ref )
175- dataset .external_catalog_dataset_options = self ._create_external_catalog_dataset_options (
176- self ._get_default_warehouse_location_for_dataset (database_name ), properties , dataset_ref
177- )
174+ dataset .external_catalog_dataset_options = self ._create_external_catalog_dataset_options (properties , dataset_ref )
178175 self .client .create_dataset (dataset )
179176 except Conflict as e :
180177 raise NamespaceAlreadyExistsError ("Namespace {database_name} already exists" ) from e
@@ -195,7 +192,6 @@ def load_table(self, identifier: str | Identifier) -> Table:
195192 Raises:
196193 NoSuchTableError: If a table with the name does not exist, or the identifier is invalid.
197194 """
198- database_name , table_name = self .identifier_to_database_and_table (identifier , NoSuchTableError )
199195 dataset_name , table_name = self .identifier_to_database_and_table (identifier , NoSuchTableError )
200196
201197 try :
@@ -363,7 +359,7 @@ def _create_external_catalog_table_options(self, location: str, parameters: dict
363359 )
364360
365361 def _create_external_catalog_dataset_options (
366- self , default_storage_location : str , metadataParameters : dict [str , Any ], dataset_ref : DatasetReference
362+ self , metadataParameters : dict [str , Any ], dataset_ref : DatasetReference
367363 ) -> ExternalCatalogDatasetOptions :
368364 return ExternalCatalogDatasetOptions (
369365 default_storage_location_uri = self ._get_default_warehouse_location_for_dataset (dataset_ref .dataset_id ),
0 commit comments