5.3.1.9.1.4.3. cli.cmd_etl.cmds.convert_helper.validate_converter_config
- cli.cmd_etl.cmds.convert_helper.validate_converter_config(config: dict) None
Validate the conversion configuration dictionary.
Validations performed:
input_format must be a member of InputFormats.
output_format must be a member of OutputFormats.
If input_format equals the literal string “DTA”, then “skip_footer”
must be an integer.
On validation failure:
Prints a descriptive error message via recho.
Exits the process with sys.exit(1).
- Parameters:
config –
Dict with required keys:
”input_format”: InputFormats member (or “DTA” string for the specific check).
”output_format”: OutputFormats member.
”skip_footer”: Required for DTA if using the string “DTA”; should be int.
”skip”: Required for GRAPHTEC; should be int.
Notes
The current implementation mixes Enum and string checks:
Membership checks use Enum members.
An additional type check for “skip_footer” is triggered only when input_format is the literal “DTA” string.
An additional type check for “skip” is triggered only when input_format is the literal “GRAPHTEC” string.