diff --git a/client/python/apache_polaris/cli/command/__init__.py b/client/python/apache_polaris/cli/command/__init__.py index c0bb6fb3b5..3cb943840a 100644 --- a/client/python/apache_polaris/cli/command/__init__.py +++ b/client/python/apache_polaris/cli/command/__init__.py @@ -59,6 +59,7 @@ def options_get(key: str, f: Callable[[Any], Any] = lambda x: x) -> Any: region=options_get(Arguments.REGION), tenant_id=options_get(Arguments.TENANT_ID), multi_tenant_app_name=options_get(Arguments.MULTI_TENANT_APP_NAME), + hierarchical=options_get(Arguments.HIERARCHICAL), consent_url=options_get(Arguments.CONSENT_URL), service_account=options_get(Arguments.SERVICE_ACCOUNT), catalog_name=options_get(Arguments.CATALOG), diff --git a/client/python/apache_polaris/cli/command/catalogs.py b/client/python/apache_polaris/cli/command/catalogs.py index a532c2baa0..b16c06f464 100644 --- a/client/python/apache_polaris/cli/command/catalogs.py +++ b/client/python/apache_polaris/cli/command/catalogs.py @@ -79,6 +79,7 @@ class CatalogsCommand(Command): region: str tenant_id: str multi_tenant_app_name: str + hierarchical: bool consent_url: str service_account: str catalog_name: str @@ -235,7 +236,12 @@ def _has_aws_storage_info(self) -> bool: ) def _has_azure_storage_info(self) -> bool: - return bool(self.tenant_id or self.multi_tenant_app_name or self.consent_url) + return bool( + self.tenant_id + or self.multi_tenant_app_name + or self.consent_url + or self.hierarchical + ) def _has_gcs_storage_info(self) -> bool: return bool(self.service_account) @@ -265,6 +271,7 @@ def _build_storage_config_info(self) -> Optional[StorageConfigInfo]: tenant_id=self.tenant_id, multi_tenant_app_name=self.multi_tenant_app_name, consent_url=self.consent_url, + hierarchical=self.hierarchical, ) elif self.storage_type == StorageType.GCS.value: config = GcpStorageConfigInfo( diff --git a/client/python/apache_polaris/cli/constants.py b/client/python/apache_polaris/cli/constants.py index 690e469ddf..5178fc51f3 100644 --- a/client/python/apache_polaris/cli/constants.py +++ b/client/python/apache_polaris/cli/constants.py @@ -144,6 +144,7 @@ class Arguments: USER_ARN = "user_arn" TENANT_ID = "tenant_id" MULTI_TENANT_APP_NAME = "multi_tenant_app_name" + HIERARCHICAL = "hierarchical" CONSENT_URL = "consent_url" SERVICE_ACCOUNT = "service_account" CATALOG_ROLE = "catalog_role" @@ -265,6 +266,7 @@ class Create: MULTI_TENANT_APP_NAME = ( "(Only for Azure) The app name to use when connecting to Azure Storage" ) + HIERARCHICAL = "(Only for Azure) Indicates whether the referenced Azure storage location(s) support hierarchical namespaces" CONSENT_URL = "(Only for Azure) A consent URL granting permissions for the Azure Storage location" SERVICE_ACCOUNT = ( diff --git a/client/python/apache_polaris/cli/options/option_tree.py b/client/python/apache_polaris/cli/options/option_tree.py index c6aa9bf775..a54a4d61d4 100644 --- a/client/python/apache_polaris/cli/options/option_tree.py +++ b/client/python/apache_polaris/cli/options/option_tree.py @@ -263,6 +263,11 @@ def get_tree() -> List[Option]: str, Hints.Catalogs.Create.MULTI_TENANT_APP_NAME, ), + Argument( + Arguments.HIERARCHICAL, + bool, + Hints.Catalogs.Create.HIERARCHICAL, + ), Argument( Arguments.CONSENT_URL, str,