bauplan.schema module¶
- class bauplan.schema.APIMetadata(*, error: str | None, pagination_token: str | None, request_id: str | None, request_ts: int | None, request_ms: int | None)¶
Bases:
_BauplanData
- error : str | None¶
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'error': FieldInfo(annotation=Union[str, NoneType], required=True), 'pagination_token': FieldInfo(annotation=Union[str, NoneType], required=True), 'request_id': FieldInfo(annotation=Union[str, NoneType], required=True), 'request_ms': FieldInfo(annotation=Union[int, NoneType], required=True), 'request_ts': FieldInfo(annotation=Union[int, NoneType], required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- pagination_token : str | None¶
- request_id : str | None¶
- request_ms : int | None¶
- request_ts : int | None¶
- class bauplan.schema.APIResponse(*, data: Any, metadata: APIMetadata)¶
Bases:
_BauplanData
- data : Any¶
- metadata : APIMetadata¶
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'data': FieldInfo(annotation=Any, required=True), 'metadata': FieldInfo(annotation=APIMetadata, required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
-
class bauplan.schema.Branch(*, name: str, hash: str, metadata: RefMetadata | None =
None
)¶ Bases:
Ref
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'hash': FieldInfo(annotation=str, required=True), 'metadata': FieldInfo(annotation=Union[RefMetadata, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
- class bauplan.schema.Entry(*, name: str, namespace: str, kind: str)¶
Bases:
_BauplanData
- property fqn : str¶
- kind : str¶
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'kind': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'namespace': FieldInfo(annotation=str, required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name : str¶
- namespace : str¶
- class bauplan.schema.Namespace(*, name: str)¶
Bases:
_BauplanData
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'name': FieldInfo(annotation=str, required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name : str¶
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
- class bauplan.schema.PartitionField(*, name: str, transform: str)¶
Bases:
_BauplanData
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'name': FieldInfo(annotation=str, required=True), 'transform': FieldInfo(annotation=str, required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name : str¶
- transform : str¶
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
-
class bauplan.schema.Ref(*, name: str, hash: str, metadata: RefMetadata | None =
None
)¶ Bases:
_BauplanData
A branch or a tag
- hash : str¶
- metadata : RefMetadata | None¶
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'hash': FieldInfo(annotation=str, required=True), 'metadata': FieldInfo(annotation=Union[RefMetadata, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name : str¶
- class bauplan.schema.RefMetadata(*, message: str, committer: str, authors: list[str], commit_time: str, author_time: str, parent_commit_hashes: list[str], num_commits_ahead: int | None, num_commits_behind: int | None, common_ancestor_hash: str | None, num_total_commits: int)¶
Bases:
_BauplanData
Some metadata about a reference.
- author_time : str¶
- authors : list[str]¶
- commit_time : str¶
- committer : str¶
- common_ancestor_hash : str | None¶
-
classmethod from_dict(metadata: dict | None =
None
) RefMetadata | None ¶ Convert a dictionary of reference metadata to a DataCatalogRefMetadata object.
- message : str¶
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'author_time': FieldInfo(annotation=str, required=True), 'authors': FieldInfo(annotation=list[str], required=True), 'commit_time': FieldInfo(annotation=str, required=True), 'committer': FieldInfo(annotation=str, required=True), 'common_ancestor_hash': FieldInfo(annotation=Union[str, NoneType], required=True), 'message': FieldInfo(annotation=str, required=True), 'num_commits_ahead': FieldInfo(annotation=Union[int, NoneType], required=True), 'num_commits_behind': FieldInfo(annotation=Union[int, NoneType], required=True), 'num_total_commits': FieldInfo(annotation=int, required=True), 'parent_commit_hashes': FieldInfo(annotation=list[str], required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- num_commits_ahead : int | None¶
- num_commits_behind : int | None¶
- num_total_commits : int¶
- parent_commit_hashes : list[str]¶
-
class bauplan.schema.Table(*, name: str, namespace: str, kind: str =
'TABLE'
)¶ Bases:
Entry
- kind : str¶
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'kind': FieldInfo(annotation=str, required=False, default='TABLE'), 'name': FieldInfo(annotation=str, required=True), 'namespace': FieldInfo(annotation=str, required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class bauplan.schema.TableField(*, id: int, name: str, required: bool, type: str)¶
Bases:
_BauplanData
- id : int¶
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'id': FieldInfo(annotation=int, required=True), 'name': FieldInfo(annotation=str, required=True), 'required': FieldInfo(annotation=bool, required=True), 'type': FieldInfo(annotation=str, required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name : str¶
- required : bool¶
- type : str¶
-
class bauplan.schema.TableWithMetadata(*, name: str, namespace: str, kind: str =
'TABLE'
, id: str, records: int | None, size: int | None, last_updated_ms: int, fields: list[TableField], snapshots: int | None, partitions: list[PartitionField], metadata_location: str, current_snapshot_id: int | None, current_schema_id: int | None, raw: dict | None)¶ Bases:
Table
- current_schema_id : int | None¶
- current_snapshot_id : int | None¶
- fields : List[TableField]¶
- id : str¶
- last_updated_ms : int¶
- metadata_location : str¶
-
model_computed_fields : ClassVar[Dict[str, ComputedFieldInfo]] =
{}
¶ A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
-
model_config : ClassVar[ConfigDict] =
{}
¶ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
model_fields : ClassVar[Dict[str, FieldInfo]] =
{'current_schema_id': FieldInfo(annotation=Union[int, NoneType], required=True), 'current_snapshot_id': FieldInfo(annotation=Union[int, NoneType], required=True), 'fields': FieldInfo(annotation=List[TableField], required=True), 'id': FieldInfo(annotation=str, required=True), 'kind': FieldInfo(annotation=str, required=False, default='TABLE'), 'last_updated_ms': FieldInfo(annotation=int, required=True), 'metadata_location': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'namespace': FieldInfo(annotation=str, required=True), 'partitions': FieldInfo(annotation=List[PartitionField], required=True), 'raw': FieldInfo(annotation=Union[Dict, NoneType], required=True), 'records': FieldInfo(annotation=Union[int, NoneType], required=True), 'size': FieldInfo(annotation=Union[int, NoneType], required=True), 'snapshots': FieldInfo(annotation=Union[int, NoneType], required=True)}
¶ Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- partitions : List[PartitionField]¶
- raw : Dict | None¶
- records : int | None¶
- size : int | None¶
- snapshots : int | None¶