Skip to content

Re-add missing parameters to create_table python API #1778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 2, 2025
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
8 changes: 6 additions & 2 deletions client/python/docs/IcebergCatalogAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **create_table**
> LoadTableResult create_table(create_table_request, x_iceberg_access_delegation=x_iceberg_access_delegation)
> LoadTableResult create_table(prefix, namespace, create_table_request, x_iceberg_access_delegation=x_iceberg_access_delegation)

Create a table in the given namespace

Expand Down Expand Up @@ -368,12 +368,14 @@ configuration = polaris.catalog.Configuration(
with polaris.catalog.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = polaris.catalog.IcebergCatalogAPI(api_client)
prefix = 'prefix_example' # str | An optional prefix in the path
namespace = 'accounting' # str | A namespace identifier as a single string. Multipart namespace parts should be separated by the unit separator (`0x1F`) byte.
create_table_request = polaris.catalog.CreateTableRequest() # CreateTableRequest |
x_iceberg_access_delegation = 'vended-credentials,remote-signing' # str | Optional signal to the server that the client supports delegated access via a comma-separated list of access mechanisms. The server may choose to supply access via any or none of the requested mechanisms. Specific properties and handling for `vended-credentials` is documented in the `LoadTableResult` schema section of this spec document. The protocol and specification for `remote-signing` is documented in the `s3-signer-open-api.yaml` OpenApi spec in the `aws` module. (optional)

try:
# Create a table in the given namespace
api_response = api_instance.create_table(create_table_request, x_iceberg_access_delegation=x_iceberg_access_delegation)
api_response = api_instance.create_table(prefix, namespace, create_table_request, x_iceberg_access_delegation=x_iceberg_access_delegation)
print("The response of IcebergCatalogAPI->create_table:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -387,6 +389,8 @@ with polaris.catalog.ApiClient(configuration) as api_client:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**prefix** | **str**| An optional prefix in the path |
**namespace** | **str**| A namespace identifier as a single string. Multipart namespace parts should be separated by the unit separator (`0x1F`) byte. |
**create_table_request** | [**CreateTableRequest**](CreateTableRequest.md)| |
**x_iceberg_access_delegation** | **str**| Optional signal to the server that the client supports delegated access via a comma-separated list of access mechanisms. The server may choose to supply access via any or none of the requested mechanisms. Specific properties and handling for `vended-credentials` is documented in the `LoadTableResult` schema section of this spec document. The protocol and specification for `remote-signing` is documented in the `s3-signer-open-api.yaml` OpenApi spec in the `aws` module. | [optional]

Expand Down
30 changes: 30 additions & 0 deletions client/python/polaris/catalog/api/iceberg_catalog_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,8 @@ def _create_namespace_serialize(
@validate_call
def create_table(
self,
prefix: Annotated[StrictStr, Field(description="An optional prefix in the path")],
namespace: Annotated[StrictStr, Field(description="A namespace identifier as a single string. Multipart namespace parts should be separated by the unit separator (`0x1F`) byte.")],
create_table_request: CreateTableRequest,
x_iceberg_access_delegation: Annotated[Optional[StrictStr], Field(description="Optional signal to the server that the client supports delegated access via a comma-separated list of access mechanisms. The server may choose to supply access via any or none of the requested mechanisms. Specific properties and handling for `vended-credentials` is documented in the `LoadTableResult` schema section of this spec document. The protocol and specification for `remote-signing` is documented in the `s3-signer-open-api.yaml` OpenApi spec in the `aws` module. ")] = None,
_request_timeout: Union[
Expand All @@ -1059,6 +1061,10 @@ def create_table(

Create a table or start a create transaction, like atomic CTAS. If `stage-create` is false, the table is created immediately. If `stage-create` is true, the table is not created, but table metadata is initialized and returned. The service should prepare as needed for a commit to the table commit endpoint to complete the create transaction. The client uses the returned metadata to begin a transaction. To commit the transaction, the client sends all create and subsequent changes to the table commit route. Changes from the table create operation include changes like AddSchemaUpdate and SetCurrentSchemaUpdate that set the initial table state.

:param prefix: An optional prefix in the path (required)
:type prefix: str
:param namespace: A namespace identifier as a single string. Multipart namespace parts should be separated by the unit separator (`0x1F`) byte. (required)
:type namespace: str
:param create_table_request: (required)
:type create_table_request: CreateTableRequest
:param x_iceberg_access_delegation: Optional signal to the server that the client supports delegated access via a comma-separated list of access mechanisms. The server may choose to supply access via any or none of the requested mechanisms. Specific properties and handling for `vended-credentials` is documented in the `LoadTableResult` schema section of this spec document. The protocol and specification for `remote-signing` is documented in the `s3-signer-open-api.yaml` OpenApi spec in the `aws` module.
Expand Down Expand Up @@ -1086,6 +1092,8 @@ def create_table(
""" # noqa: E501

_param = self._create_table_serialize(
prefix=prefix,
namespace=namespace,
create_table_request=create_table_request,
x_iceberg_access_delegation=x_iceberg_access_delegation,
_request_auth=_request_auth,
Expand Down Expand Up @@ -1119,6 +1127,8 @@ def create_table(
@validate_call
def create_table_with_http_info(
self,
prefix: Annotated[StrictStr, Field(description="An optional prefix in the path")],
namespace: Annotated[StrictStr, Field(description="A namespace identifier as a single string. Multipart namespace parts should be separated by the unit separator (`0x1F`) byte.")],
create_table_request: CreateTableRequest,
x_iceberg_access_delegation: Annotated[Optional[StrictStr], Field(description="Optional signal to the server that the client supports delegated access via a comma-separated list of access mechanisms. The server may choose to supply access via any or none of the requested mechanisms. Specific properties and handling for `vended-credentials` is documented in the `LoadTableResult` schema section of this spec document. The protocol and specification for `remote-signing` is documented in the `s3-signer-open-api.yaml` OpenApi spec in the `aws` module. ")] = None,
_request_timeout: Union[
Expand All @@ -1138,6 +1148,10 @@ def create_table_with_http_info(

Create a table or start a create transaction, like atomic CTAS. If `stage-create` is false, the table is created immediately. If `stage-create` is true, the table is not created, but table metadata is initialized and returned. The service should prepare as needed for a commit to the table commit endpoint to complete the create transaction. The client uses the returned metadata to begin a transaction. To commit the transaction, the client sends all create and subsequent changes to the table commit route. Changes from the table create operation include changes like AddSchemaUpdate and SetCurrentSchemaUpdate that set the initial table state.

:param prefix: An optional prefix in the path (required)
:type prefix: str
:param namespace: A namespace identifier as a single string. Multipart namespace parts should be separated by the unit separator (`0x1F`) byte. (required)
:type namespace: str
:param create_table_request: (required)
:type create_table_request: CreateTableRequest
:param x_iceberg_access_delegation: Optional signal to the server that the client supports delegated access via a comma-separated list of access mechanisms. The server may choose to supply access via any or none of the requested mechanisms. Specific properties and handling for `vended-credentials` is documented in the `LoadTableResult` schema section of this spec document. The protocol and specification for `remote-signing` is documented in the `s3-signer-open-api.yaml` OpenApi spec in the `aws` module.
Expand Down Expand Up @@ -1165,6 +1179,8 @@ def create_table_with_http_info(
""" # noqa: E501

_param = self._create_table_serialize(
prefix=prefix,
namespace=namespace,
create_table_request=create_table_request,
x_iceberg_access_delegation=x_iceberg_access_delegation,
_request_auth=_request_auth,
Expand Down Expand Up @@ -1198,6 +1214,8 @@ def create_table_with_http_info(
@validate_call
def create_table_without_preload_content(
self,
prefix: Annotated[StrictStr, Field(description="An optional prefix in the path")],
namespace: Annotated[StrictStr, Field(description="A namespace identifier as a single string. Multipart namespace parts should be separated by the unit separator (`0x1F`) byte.")],
create_table_request: CreateTableRequest,
x_iceberg_access_delegation: Annotated[Optional[StrictStr], Field(description="Optional signal to the server that the client supports delegated access via a comma-separated list of access mechanisms. The server may choose to supply access via any or none of the requested mechanisms. Specific properties and handling for `vended-credentials` is documented in the `LoadTableResult` schema section of this spec document. The protocol and specification for `remote-signing` is documented in the `s3-signer-open-api.yaml` OpenApi spec in the `aws` module. ")] = None,
_request_timeout: Union[
Expand All @@ -1217,6 +1235,10 @@ def create_table_without_preload_content(

Create a table or start a create transaction, like atomic CTAS. If `stage-create` is false, the table is created immediately. If `stage-create` is true, the table is not created, but table metadata is initialized and returned. The service should prepare as needed for a commit to the table commit endpoint to complete the create transaction. The client uses the returned metadata to begin a transaction. To commit the transaction, the client sends all create and subsequent changes to the table commit route. Changes from the table create operation include changes like AddSchemaUpdate and SetCurrentSchemaUpdate that set the initial table state.

:param prefix: An optional prefix in the path (required)
:type prefix: str
:param namespace: A namespace identifier as a single string. Multipart namespace parts should be separated by the unit separator (`0x1F`) byte. (required)
:type namespace: str
:param create_table_request: (required)
:type create_table_request: CreateTableRequest
:param x_iceberg_access_delegation: Optional signal to the server that the client supports delegated access via a comma-separated list of access mechanisms. The server may choose to supply access via any or none of the requested mechanisms. Specific properties and handling for `vended-credentials` is documented in the `LoadTableResult` schema section of this spec document. The protocol and specification for `remote-signing` is documented in the `s3-signer-open-api.yaml` OpenApi spec in the `aws` module.
Expand Down Expand Up @@ -1244,6 +1266,8 @@ def create_table_without_preload_content(
""" # noqa: E501

_param = self._create_table_serialize(
prefix=prefix,
namespace=namespace,
create_table_request=create_table_request,
x_iceberg_access_delegation=x_iceberg_access_delegation,
_request_auth=_request_auth,
Expand Down Expand Up @@ -1272,6 +1296,8 @@ def create_table_without_preload_content(

def _create_table_serialize(
self,
prefix,
namespace,
create_table_request,
x_iceberg_access_delegation,
_request_auth,
Expand All @@ -1293,6 +1319,10 @@ def _create_table_serialize(
_body_params: Optional[bytes] = None

# process the path parameters
if prefix is not None:
_path_params['prefix'] = prefix
if namespace is not None:
_path_params['namespace'] = namespace
# process the query parameters
# process the header parameters
if x_iceberg_access_delegation is not None:
Expand Down
2 changes: 2 additions & 0 deletions spec/generated/bundled-polaris-catalog-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ paths:
If `stage-create` is true, the table is not created, but table metadata is initialized and returned. The service should prepare as needed for a commit to the table commit endpoint to complete the create transaction. The client uses the returned metadata to begin a transaction. To commit the transaction, the client sends all create and subsequent changes to the table commit route. Changes from the table create operation include changes like AddSchemaUpdate and SetCurrentSchemaUpdate that set the initial table state.
operationId: createTable
parameters:
- $ref: '#/components/parameters/prefix'
- $ref: '#/components/parameters/namespace'
- $ref: '#/components/parameters/data-access'
requestBody:
required: true
Expand Down
2 changes: 2 additions & 0 deletions spec/iceberg-rest-catalog-open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ paths:
table state.
operationId: createTable
parameters:
- $ref: '#/components/parameters/prefix'
- $ref: '#/components/parameters/namespace'
- $ref: '#/components/parameters/data-access'
requestBody:
required: true
Expand Down
Loading