utils module

EDITING_CODE_DROPDOWN(aio_id)
class EditorSettings(*, starting_table, form_data_table, form_list, refnr_col, form_name_col, ident_col, field_value_col, field_name_col, period_col, mapping_table='mapping_variabelnavn', mapping_match_column='variabel', mapping_result_column='feltsti', table_selector_id=None, form_selector_id=None)

Bases: BaseModel

Configuration model defining schema, table, and column mappings for the editor.

Parameters:
  • starting_table (str)

  • form_data_table (str)

  • form_list (list[str])

  • refnr_col (str)

  • form_name_col (str)

  • ident_col (str)

  • field_value_col (str)

  • field_name_col (str)

  • period_col (str)

  • mapping_table (str)

  • mapping_match_column (str)

  • mapping_result_column (str)

  • table_selector_id (str | None)

  • form_selector_id (str | None)

starting_table

Initial database table to load.

Type:

str

form_data_table

Target table holding actual questionnaire form responses.

Type:

str

form_list

List of allowed form/questionnaire identifiers.

Type:

list[str]

refnr_col

Column name representing submission reference numbers.

Type:

str

form_name_col

Column representing form name (e.g. “skjema”).

Type:

str

ident_col

Column name representing respondent identifiers (e.g. “ident”).

Type:

str

field_value_col

Column containing form field values (e.g. “verdi”).

Type:

str

field_name_col

Column containing form field name paths (e.g. “feltsti”).

Type:

str

period_col

Column representing statistical period (e.g. “iso_periode”).

Type:

str

mapping_table

Table used for mapping variables. Defaults to “mapping_variabelnavn”.

Type:

str

mapping_match_column

Match column in mapping table. Defaults to “variabel”.

Type:

str

mapping_result_column

Result column in mapping table. Defaults to “feltsti”.

Type:

str

table_selector_id

Custom Dash ID for the table dropdown selector.

Type:

str | None

form_selector_id

Custom Dash ID for the form dropdown selector.

Type:

str | None

field_name_col: str
field_value_col: str
form_data_table: str
form_list: list[str]
form_name_col: str
form_selector_id: str | None
ident_col: str
mapping_match_column: str
mapping_result_column: str
mapping_table: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

period_col: str
refnr_col: str
starting_table: str
table_selector_id: str | None