singer_sdk.InlineMapper
- class singer_sdk.InlineMapper
Bases:
PluginBase
,SingerReader
Abstract base class for inline mappers.
- __init__(config: Optional[Union[dict, PurePath, str, List[Union[PurePath, str]]]] = None, parse_env_config: bool = False, validate_config: bool = True) None
Create the tap or target.
- Parameters
config – May be one or more paths, either as str or PurePath objects, or it can be a predetermined config dict.
parse_env_config – True to parse settings from env vars.
validate_config – True to require validation of config settings.
- Raises
ValueError – If config is not a dict or path string.
- classmethod append_builtin_config(config_jsonschema: dict) None
Appends built-in config to config_jsonschema if not already set.
To customize or disable this behavior, developers may either override this class method or override the capabilities property to disabled any unwanted built-in capabilities.
For all except very advanced use cases, we recommend leaving these implementations “as-is”, since this provides the most choice to users and is the most “future proof” in terms of taking advantage of built-in capabilities which may be added in the future.
- Parameters
config_jsonschema – [description]
- cli = <Command cli>
- property config: Mapping[str, Any]
Get config.
- Returns
A frozen (read-only) config dictionary map.
- listen(file_input: IO[str] | None = None) None
Read from input until all messages are processed.
- Parameters
file_input – Readable stream of messages. Defaults to standard in.
This method is internal to the SDK and should not need to be overridden.
- abstract map_activate_version_message(message_dict: dict) Iterable[Message]
Map a version message to zero or more new messages.
- Parameters
message_dict – An ACTIVATE_VERSION message JSON dictionary.
- map_batch_message(message_dict: dict) Iterable[Message]
Map a batch message to zero or more new messages.
- Parameters
message_dict – A BATCH message JSON dictionary.
- Raises
NotImplementedError – if not implemented by subclass.
- abstract map_record_message(message_dict: dict) Iterable[Message]
Map a record message to zero or more new messages.
- Parameters
message_dict – A RECORD message JSON dictionary.
- abstract map_schema_message(message_dict: dict) Iterable[Message]
Map a schema message to zero or more new messages.
- Parameters
message_dict – A SCHEMA message JSON dictionary.
- abstract map_state_message(message_dict: dict) Iterable[Message]
Map a state message to zero or more new messages.
- Parameters
message_dict – A STATE message JSON dictionary.
- classmethod print_about(format: Optional[str] = None) None
Print capabilities and other tap metadata.
- Parameters
format – Render option for the plugin information.
- classmethod print_version(print_fn: ~typing.Callable[[~typing.Any], None] = <built-in function print>) None
Print help text for the tap.
- Parameters
print_fn – A function to use to display the plugin version. Defaults to print.
- property state: dict
Get state.
- Raises
NotImplementedError – If the derived plugin doesn’t override this method.