Reference¶
ssb_poc_statlog_model package¶
ssb_poc_statlog_model.change_data_log module¶
- class ChangeDataLog(**data)¶
Bases:
StatlogBaseModelData model for data change log in a statistical production process.
- Parameters:
statistics_name (str)
data_source (list[str])
data_target (str)
data_period (str)
variable_name (str | None)
change_event (ChangeEvent)
change_event_reason (ChangeEventReason | None)
change_datetime (AwareDatetime)
changed_by (str)
data_change_type (DataChangeType | None)
change_comment (str | None)
change_details (ChangeDetails | ChangeDetails1)
- change_comment: str | None¶
- change_datetime: AwareDatetime¶
- change_details: ChangeDetails | ChangeDetails1¶
- change_event: ChangeEvent¶
- change_event_reason: ChangeEventReason | None¶
- changed_by: str¶
- data_change_type: DataChangeType | None¶
- data_period: str¶
- data_source: list[str]¶
- data_target: str¶
- model_config: ClassVar[ConfigDict] = {'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- statistics_name: str¶
- variable_name: str | None¶
- class ChangeDetails(**data)¶
Bases:
StatlogBaseModelDetailed information about the change. Either a unit-id, old and new value if one row (unit) was affected, or number of rows affected if the process changed multiple rows (units).
- Parameters:
detail_type (Literal['rows'])
rows_affected (int)
variable_name (str | None)
- detail_type: Literal['rows']¶
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- rows_affected: int¶
- variable_name: str | None¶
- class ChangeDetails1(**data)¶
Bases:
StatlogBaseModelDetailed information about the change. Either a unit-id, old and new value if one row (unit) was affected, or number of rows affected if the process changed multiple rows (units).
- Parameters:
detail_type (Literal['unit'])
unit_id (list[UnitIdItem])
old_value (list[OldValueItem] | None)
new_value (list[NewValueItem] | None)
- detail_type: Literal['unit']¶
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- new_value: list[NewValueItem] | None¶
- old_value: list[OldValueItem] | None¶
- unit_id: list[UnitIdItem]¶
- class ChangeEvent(*values)¶
Bases:
str,EnumHow the event was triggered: Automatically changed (A), Manually changed (M), Manually approved with no change (MNC), Not reviewed (NOT).
- A = 'A'¶
- M = 'M'¶
- MNC = 'MNC'¶
- NOT = 'NOT'¶
- class ChangeEventReason(*values)¶
Bases:
str,EnumReason for change or approval: Other source (OTHER_SOURCE), Statistical review (REVIEW), Information from the data provider/registry owner (OWNER), Small/marginal unit (MARGINAL_UNIT), Data duplicate (DUPLICATE), Other reason (OTHER).
- DUPLICATE = 'DUPLICATE'¶
- MARGINAL_UNIT = 'MARGINAL_UNIT'¶
- OTHER = 'OTHER'¶
- OTHER_SOURCE = 'OTHER_SOURCE'¶
- OWNER = 'OWNER'¶
- REVIEW = 'REVIEW'¶
- class DataChangeType(*values)¶
Bases:
str,EnumData change type: Updated value (UPD), created new unit/row (NEW), or deleted unit/row (DEL).
- DEL = 'DEL'¶
- NEW = 'NEW'¶
- UPD = 'UPD'¶
- class NewValueItem(**data)¶
Bases:
StatlogBaseModel- Parameters:
variable_name (str)
value (str)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- value: str¶
- variable_name: str¶
- class OldValueItem(**data)¶
Bases:
StatlogBaseModel- Parameters:
variable_name (str)
value (str)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- value: str¶
- variable_name: str¶
- class UnitIdItem(**data)¶
Bases:
StatlogBaseModel- Parameters:
unit_id_variable (str)
unit_id_value (str)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- unit_id_value: str¶
- unit_id_variable: str¶
ssb_poc_statlog_model.quality_control_description module¶
- class QualityControlDescription(**data)¶
Bases:
StatlogBaseModelModel for description of quality controls used in a statistical production.
- Parameters:
quality_control_id (str)
quality_control_description (str)
quality_control_type (QualityControlType)
variables (list[Variable])
- model_config: ClassVar[ConfigDict] = {'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- quality_control_description: str¶
- quality_control_id: str¶
- quality_control_type: QualityControlType¶
- variables: list[Variable]¶
- class QualityControlType(*values)¶
Bases:
str,EnumQuality control type: hard (H), soft (S), informative (I).
- H = 'H'¶
- I = 'I'¶
- S = 'S'¶
- class Variable(**data)¶
Bases:
StatlogBaseModel- Parameters:
variable_description (str | None)
- model_config: ClassVar[ConfigDict] = {'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- variable_description: str | None¶
ssb_poc_statlog_model.quality_control_result module¶
- class QualityControlResult(**data)¶
Bases:
StatlogBaseModelSchema for statistics quality control result.
- Parameters:
statistics_name (str)
quality_control_id (str)
data_location (list[str])
data_period (str)
quality_control_datetime (AwareDatetime)
quality_control_results (QualityControlResults)
quality_result_comment (str | None)
quality_control_run_exception (str | None)
- data_location: list[str]¶
- data_period: str¶
- model_config: ClassVar[ConfigDict] = {'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- quality_control_datetime: AwareDatetime¶
- quality_control_id: str¶
- quality_control_results: QualityControlResults¶
- quality_control_run_exception: str | None¶
- quality_result_comment: str | None¶
- statistics_name: str¶