BatchTableOperations Class

Table metadata operations on a BatchRequest.

Mirrors client.tables exactly: same method names, same signatures. All methods return None; results arrive via BatchResult.

Note

tables.delete, tables.add_columns, and tables.remove_columns

require a metadata lookup (GET EntityDefinitions) at

execute time to resolve the table's MetadataId.

This lookup is transparent to the caller.

Note

tables.add_columns and tables.remove_columns each produce one

batch item per column, so they contribute multiple entries to

responses.

Do not instantiate directly; use batch.tables.

Constructor

BatchTableOperations(batch: _BatchContext)

Parameters

Name Description
batch
Required

Methods

add_columns

Add column-create operations to the batch (one per column).

The table's MetadataId is resolved at execute time. Each column produces one entry in responses.

create

Add a table-create operation to the batch.

Note

The pre-existence check performed by client.tables.create is skipped

in batch mode. If the table already exists the server returns an error

in the corresponding BatchItemResponse.

create_lookup_field

Add a lookup field creation to the batch (convenience wrapper for create_one_to_many_relationship).

create_many_to_many_relationship

Add a many-to-many relationship creation to the batch.

create_one_to_many_relationship

Add a one-to-many relationship creation to the batch.

delete

Add a table-delete operation to the batch.

The table's MetadataId is resolved via a GET request at execute time.

delete_relationship

Add a relationship-delete operation to the batch.

get

Add a table-metadata-get operation to the batch.

The response will be in BatchItemResponse.data after execute.

get_relationship

Add a relationship-metadata-get operation to the batch.

The response will be in BatchItemResponse.data after execute.

list

Add a list-all-tables operation to the batch.

Mirrors client.tables.list(). Supply an optional OData $filter expression to further narrow the results (combined with IsPrivate eq false using and). select projects specific property names via $select.

The response will be in BatchItemResponse.data after execute.

remove_columns

Add column-delete operations to the batch (one per column).

The table's MetadataId and each column's MetadataId are resolved at execute time. Each column produces one entry in responses.

add_columns

Add column-create operations to the batch (one per column).

The table's MetadataId is resolved at execute time. Each column produces one entry in responses.

add_columns(table: str, columns: Dict[str, Any]) -> None

Parameters

Name Description
table
Required
str

Schema name of the target table.

columns
Required

Mapping of column schema names to type strings or Enum subclasses.

create

Add a table-create operation to the batch.

Note

The pre-existence check performed by client.tables.create is skipped

in batch mode. If the table already exists the server returns an error

in the corresponding BatchItemResponse.

create(table: str, columns: Dict[str, Any], *, solution: str | None = None, primary_column: str | None = None, display_name: str | None = None) -> None

Parameters

Name Description
table
Required
str

Schema name of the new table (e.g. "new_Product").

columns
Required

Mapping of column schema names to type strings or Enum subclasses.

solution
Required
str or None

Optional solution unique name.

primary_column
Required
str or None

Optional primary column schema name.

display_name
Required
str or None

Human-readable display name for the table. When omitted, defaults to the table schema name.

Keyword-Only Parameters

Name Description
solution
Default value: None
primary_column
Default value: None
display_name
Default value: None

create_lookup_field

Add a lookup field creation to the batch (convenience wrapper for create_one_to_many_relationship).

create_lookup_field(referencing_table: str, lookup_field_name: str, referenced_table: str, *, display_name: str | None = None, description: str | None = None, required: bool = False, cascade_delete: str = 'RemoveLink', solution: str | None = None, language_code: int = 1033) -> None

Parameters

Name Description
referencing_table
Required
str

Logical name of the child (many) table.

lookup_field_name
Required
str

Schema name for the lookup field.

referenced_table
Required
str

Logical name of the parent (one) table.

display_name
Required
str or None

Display name for the lookup field.

description
Required
str or None

Optional description.

required
Required

Whether the lookup is required.

cascade_delete
Required
str

Delete cascade behaviour.

solution
Required
str or None

Optional solution unique name.

language_code
Required
int

Language code for labels (default 1033).

Keyword-Only Parameters

Name Description
display_name
Default value: None
description
Default value: None
required
Default value: False
cascade_delete
Default value: RemoveLink
solution
Default value: None
language_code
Default value: 1033

create_many_to_many_relationship

Add a many-to-many relationship creation to the batch.

create_many_to_many_relationship(relationship: ManyToManyRelationshipMetadata, *, solution: str | None = None) -> None

Parameters

Name Description
relationship
Required

Relationship metadata.

solution
Required
str or None

Optional solution unique name.

Keyword-Only Parameters

Name Description
solution
Default value: None

create_one_to_many_relationship

Add a one-to-many relationship creation to the batch.

create_one_to_many_relationship(lookup: LookupAttributeMetadata, relationship: OneToManyRelationshipMetadata, *, solution: str | None = None) -> None

Parameters

Name Description
lookup
Required

Lookup attribute metadata.

relationship
Required

Relationship metadata.

solution
Required
str or None

Optional solution unique name.

Keyword-Only Parameters

Name Description
solution
Default value: None

delete

Add a table-delete operation to the batch.

The table's MetadataId is resolved via a GET request at execute time.

delete(table: str) -> None

Parameters

Name Description
table
Required
str

Schema name of the table to delete.

delete_relationship

Add a relationship-delete operation to the batch.

delete_relationship(relationship_id: str) -> None

Parameters

Name Description
relationship_id
Required
str

GUID of the relationship metadata to delete.

get

Add a table-metadata-get operation to the batch.

The response will be in BatchItemResponse.data after execute.

get(table: str) -> None

Parameters

Name Description
table
Required
str

Schema name of the table.

get_relationship

Add a relationship-metadata-get operation to the batch.

The response will be in BatchItemResponse.data after execute.

get_relationship(schema_name: str) -> None

Parameters

Name Description
schema_name
Required
str

Schema name of the relationship.

list

Add a list-all-tables operation to the batch.

Mirrors client.tables.list(). Supply an optional OData $filter expression to further narrow the results (combined with IsPrivate eq false using and). select projects specific property names via $select.

The response will be in BatchItemResponse.data after execute.

list(*, filter: str | None = None, select: List[str] | None = None) -> None

Parameters

Name Description
filter
Required
str or None

Additional OData $filter expression.

select
Required
list[str] or None

List of property names for $select.

Keyword-Only Parameters

Name Description
filter
Default value: None
select
Default value: None

remove_columns

Add column-delete operations to the batch (one per column).

The table's MetadataId and each column's MetadataId are resolved at execute time. Each column produces one entry in responses.

remove_columns(table: str, columns: str | List[str]) -> None

Parameters

Name Description
table
Required
str

Schema name of the target table.

columns
Required
str or list[str]

Column schema name or list of column schema names to remove.