Warning

🚧 Sprout is still in active development and evolving quickly, so the documentation and functionality may not work as described and could undergo substantial changes 🚧

core.TableSchemaProperties

core.TableSchemaProperties(
    self,
    fields=None,
    fields_match=None,
    primary_key=None,
    unique_keys=None,
    foreign_keys=None,
    missing_values=None,
)

A table schema for a data resource.

Table schema is a simple language- and implementation-agnostic way to declare a schema for tabular data. Table schema is well suited for use cases around handling and validating tabular data in text formats such as CSV, but its utility extends well beyond this core usage, towards a range of applications where data benefits from a portable schema format.

Attributes

fields : list[FieldProperties] | None

Specifies the fields in this table schema.

fields_match : FieldsMatchType | None

Specifies how fields in the table schema match the fields in the data source.

primary_key : list[str] | str | None

A primary key is a field name or an array of field names, whose values must uniquely identify each row in the table.

unique_keys : list[list[str]] | None

A field or a set of fields that are required to have unique logical values in each row in the table.

foreign_keys : list[TableSchemaForeignKeyProperties] | None

A reference where values in a field (or fields) on the table (resource) described by this table schema connect to values in a field (or fields) on this or a separate table (resource).

missing_values : list[str] | list[MissingValueProperties] | None

Values that, when encountered in the source, should be considered as not present.

Methods

Name Description
default Creates an instance with default values.

default

core.TableSchemaProperties.default()

Creates an instance with default values.

Returns

: Self

A TableSchemaProperties object with default values