import seedcase_sprout.core as sp
print(sp.TableSchemaProperties(primary_key="id"))
TableSchemaProperties(fields=None, fields_match=None, primary_key='id', unique_keys=None, foreign_keys=None, missing_values=None)
🚧 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(
self,
fields: list[FieldProperties] | None = None,
fields_match: FieldsMatchType | None = None,
primary_key: list[str] | str | None = None,
unique_keys: list[list[str]] | None = None,
foreign_keys: list[TableSchemaForeignKeyProperties] | None = None,
missing_values: list[str] | list[MissingValueProperties] | None = 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.
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.
Name | Description |
---|---|
default | Creates a TableSchemaProperties dataclass with default values. |
Creates a TableSchemaProperties
dataclass with default values.
Self
A TableSchemaProperties
dataclass with default values.