Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/python/apache_polaris/cli/command/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
9 changes: 8 additions & 1 deletion client/python/apache_polaris/cli/command/catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions client/python/apache_polaris/cli/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 = (
Expand Down
5 changes: 5 additions & 0 deletions client/python/apache_polaris/cli/options/option_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down