Skip to content

Commit 4b9ce05

Browse files
committed
Adds support for creating a GlueCatalog with own client
1 parent bb45d1e commit 4b9ce05

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

pyiceberg/catalog/glue.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,17 @@ def add_glue_catalog_id(params: Dict[str, str], **kwargs: Any) -> None:
303303

304304

305305
class GlueCatalog(MetastoreCatalog):
306-
def __init__(self, name: str, **properties: Any):
306+
glue: GlueClient
307+
308+
def __init__(self, name: str, client: GlueClient | None = None, **properties: Any):
307309
super().__init__(name, **properties)
308310

309311
retry_mode_prop_value = get_first_property_value(properties, GLUE_RETRY_MODE)
310312

313+
if client:
314+
self.glue = client
315+
return
316+
311317
session = boto3.Session(
312318
profile_name=properties.get(GLUE_PROFILE_NAME),
313319
region_name=get_first_property_value(properties, GLUE_REGION, AWS_REGION),

0 commit comments

Comments
 (0)