Skip to content

Tables

Sync and async table resources: create, list, get, update, and delete.

TablesResource

Bases: BaseResource

Synchronous access to the /tables endpoints.

All methods raise subclasses of :class:~ineepy.exceptions.IneepyError; authentication/permission failures raise :class:~ineepy.exceptions.UnauthorizedError / :class:~ineepy.exceptions.ForbiddenError.

create(table_id, columns, *, sort_by=None, partition_by=None, title='', description=None, tags=None, sensitivity='internal', refresh_frequency='manual', license=None, sources=None, external_sources=None)

Create a new table with the given schema.

Parameters:

Name Type Description Default
table_id str

Table identifier.

required
columns Sequence[ColumnSchema | Mapping[str, Any]]

List of :class:~ineepy.models.ColumnSchema objects, or plain dicts with the same fields, e.g. {'name': 'id', 'data_type': 'int64'}.

required
sort_by Sequence[ColumnSorting | Mapping[str, Any]] | None

Optional sorting specification: a list of :class:~ineepy.models.ColumnSorting objects, or equivalent plain dicts.

None
partition_by Sequence[ColumnPartitioning | Mapping[str, Any]] | None

Optional partitioning specification: a list of :class:~ineepy.models.ColumnPartitioning objects, or equivalent plain dicts.

None
title str

Human-readable title.

''
description str | None

Optional description.

None
tags str | Iterable[str] | None

Tag name, or an iterable of tag names.

None
sensitivity str

Data sensitivity level (default internal).

'internal'
refresh_frequency str

Refresh cadence (default manual).

'manual'
license str | None

Optional license identifier.

None
sources str | Iterable[str] | None

Source table ID, or an iterable of source table IDs (dot-separated) for lineage tracking.

None
external_sources Sequence[ExternalSource | Mapping[str, Any]] | None

External data source references: a list of :class:~ineepy.models.ExternalSource objects, or equivalent plain dicts.

None

Returns:

Name Type Description
Created tuple[TableResponse, str]

class:~ineepy.TableResponse and its ETag.

Raises:

Type Description
ConflictError

Table already exists.

Example::

table, etag = client.tables.create(
    'raw.sales.orders',
    [{'name': 'id', 'data_type': 'int64', 'required': True}],
    title='Orders',
)

delete(table_id)

Delete a table and all its data.

Parameters:

Name Type Description Default
table_id str

Table identifier.

required

Raises:

Type Description
NotFoundError

No table with the given table_id.

get_etag(table_id)

Return the current ETag for a table without fetching its body.

Parameters:

Name Type Description Default
table_id str

Table identifier.

required

Returns:

Type Description
str

ETag string for use in conditional requests.

Raises:

Type Description
NotFoundError

No table with the given table_id.

get_metadata(table_id)

Return a table's metadata and its current ETag.

Parameters:

Name Type Description Default
table_id str

Table identifier.

required

Returns:

Type Description
tuple[TableResponse, str]

Tuple of :class:~ineepy.TableResponse and ETag string.

Raises:

Type Description
NotFoundError

No table with the given table_id.

list(namespace_id, *, limit=None, offset=None, filters=None, order_by=None, prefer='model=table; format=minimal')

List tables in a namespace.

Parameters:

Name Type Description Default
namespace_id str

Namespace identifier (e.g. raw).

required
limit int | None

Maximum number of items to return.

None
offset int | None

Number of items to skip.

None
filters str | Iterable[str] | None

Filter expressions in field:operator:value format (a single string or an iterable of strings).

None
order_by str | Iterable[str] | None

Sort expressions in field:direction format (a single string or an iterable of strings).

None
prefer str

Prefer header value controlling response verbosity: model=table; format=minimal|summary|full. Verified against the server: summary yields :class:~ineepy.models.TableResponseSummary items (id and metadata, no columns); minimal and full both currently yield :class:~ineepy.models.TableResponseMinimal items (id only) — as of this server version, full on the list endpoint does not return column schema and is indistinguishable from minimal. Use :meth:get_metadata for the full column schema.

'model=table; format=minimal'

Returns:

Type Description
TablesListResponse

class:~ineepy.TablesListResponse containing metadata and a

TablesListResponse

list of items whose shape depends on prefer (see above).

update_metadata(table_id, etag=None, *, title=None, description=None, tags=None, sensitivity=None, refresh_frequency=None, license=None, sources=None, external_sources=None)

Patch a table's metadata fields.

Only the fields you pass are modified; omitted fields keep their current values.

Parameters:

Name Type Description Default
table_id str

Table identifier.

required
etag str | None

ETag for optimistic locking. When None, the current ETag is fetched automatically via :meth:get_etag.

None
title str | None

Human-readable title.

None
description str | None

Optional description.

None
tags str | Iterable[str] | None

Tag name, or an iterable of tag names.

None
sensitivity str | None

Data sensitivity level.

None
refresh_frequency str | None

Refresh cadence.

None
license str | None

Optional license identifier.

None
sources str | Iterable[str] | None

Source table ID, or an iterable of source table IDs (dot-separated) for lineage tracking.

None
external_sources Sequence[ExternalSource | Mapping[str, Any]] | None

External data source references: a list of :class:~ineepy.models.ExternalSource objects, or equivalent plain dicts.

None

Returns:

Name Type Description
Updated tuple[TableResponse, str]

class:~ineepy.TableResponse and new ETag.

Raises:

Type Description
NotFoundError

No table with the given table_id.

PreconditionFailedError

ETag mismatch.

update_schema(table_id, columns, etag=None)

Replace a table's column schema.

Columns absent from columns will be dropped (data deleted). Rename, type changes, and reordering are not supported.

Parameters:

Name Type Description Default
table_id str

Table identifier.

required
columns Sequence[ColumnSchema | Mapping[str, Any]]

New column schema specification: a list of :class:~ineepy.models.ColumnSchema objects, or plain dicts with the same fields.

required
etag str | None

ETag for optimistic locking. When None, the current ETag is fetched automatically via :meth:get_etag.

None

Returns:

Name Type Description
Updated tuple[TableResponse, str]

class:~ineepy.TableResponse and new ETag.

Raises:

Type Description
NotFoundError

No table with the given table_id.

PreconditionFailedError

ETag mismatch.

AsyncTablesResource

Bases: AsyncBaseResource

Async access to the /tables endpoints.

All methods raise subclasses of :class:~ineepy.exceptions.IneepyError; authentication/permission failures raise :class:~ineepy.exceptions.UnauthorizedError / :class:~ineepy.exceptions.ForbiddenError.

create(table_id, columns, *, sort_by=None, partition_by=None, title='', description=None, tags=None, sensitivity='internal', refresh_frequency='manual', license=None, sources=None, external_sources=None) async

Create a new table with the given schema.

See :meth:TablesResource.create for full documentation.

delete(table_id) async

Delete a table and all its data.

See :meth:TablesResource.delete for full documentation.

get_etag(table_id) async

Return the current ETag for a table without fetching its body.

See :meth:TablesResource.get_etag for full documentation.

get_metadata(table_id) async

Return a table's metadata and its current ETag.

See :meth:TablesResource.get_metadata for full documentation.

list(namespace_id, *, limit=None, offset=None, filters=None, order_by=None, prefer='model=table; format=minimal') async

List tables in a namespace.

See :meth:TablesResource.list for full documentation.

update_metadata(table_id, etag=None, *, title=None, description=None, tags=None, sensitivity=None, refresh_frequency=None, license=None, sources=None, external_sources=None) async

Patch a table's metadata fields.

See :meth:TablesResource.update_metadata for full documentation.

update_schema(table_id, columns, etag=None) async

Replace a table's column schema.

See :meth:TablesResource.update_schema for full documentation.