Skip to content

common

etl_craft.cli.commands.common

What every command that reads craft-connector.yml does first.

Command dataclass

One subcommand: its name, its one-line help, its options and what it does.

configure adds the command's own options to its parser. run receives the parsed arguments, including the global config, log_level and log_format, and returns the exit code. It reports failures by raising an EtlCraftError, which the command line turns into an error: line and that error's exit code.

load_command_config

load_command_config(args: Namespace) -> ConnectorConfig

Find and load craft-connector.yml: --config, $ETL_CRAFT_CONFIG, or a search.

connect_engine_db

connect_engine_db(config: ConnectorConfig) -> Engine

Build the Engine DB engine and check it, and its schema, can be used.

configure_run_selector

configure_run_selector(parser: ArgumentParser) -> None

Add mutually exclusive identities for a pipeline's run.

configure_output

configure_output(parser: ArgumentParser) -> None

Offer one schema-versioned operation document instead of text output.

command_context

command_context(args: Namespace) -> Iterator[OperationContext]

Load command resources and dispose them after the service operation.