cdm_data_loaders.core.settings ¶
Settings classes for data loading and wrangling pipelines.
CdmDataLoadersBase ¶
Bases: BaseSettings
Base for all CDM Data Loaders settings classes.
- Sets up some basic CLI parsing defaults
- Adds a class method to check for conflicting aliases
Source code in src/cdm_data_loaders/core/settings.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
__pydantic_init_subclass__
classmethod
¶
Validate the subclass's cli shortcuts and aliases.
check_aliases
classmethod
¶
Raise SettingsError if the class's CLI argument names or shortcuts are invalid or collide.
pydantic-settings silently drops shortcuts whose target does not match a registered argument name, and silently drops any name already registered by an earlier argument, so both are checked here. Names differing only in '_' vs '-' are treated as the same name.
Source code in src/cdm_data_loaders/core/settings.py
LoggerSettings ¶
Bases: CdmDataLoadersBase
Configuration for a class with a logger config.
Source code in src/cdm_data_loaders/core/settings.py
InputLocalOutputSettings ¶
Bases: LoggerSettings
Configuration for a DLT pipeline with an input directory or URL and a local output directory.
Source code in src/cdm_data_loaders/core/settings.py
CtsSettings ¶
Bases: InputLocalOutputSettings
Configuration for running a basic DLT pipeline.
Source code in src/cdm_data_loaders/core/settings.py
pipeline_dir
property
¶
Custom directory to save pipeline metadata to.
If use_output_dir_for_pipeline_metadata is true, this is <output_dir>/<PIPELINE_DIR_NAME>;
otherwise None, and dlt uses its default.
report_path
property
¶
Path to the report file.
If use_output_dir_for_pipeline_metadata is true, the report is saved in the pipelines dir; Otherwise, it is saved directly to the output directory.
FileFormatIngestSettings ¶
Bases: CtsSettings
Configuration for DLT pipelines that import a particular file format.
Source code in src/cdm_data_loaders/core/settings.py
use_pyarrow
property
¶
Return whether this pipeline yields pyarrow.Table pages instead of row dicts.
XmlIngestSettings ¶
Bases: FileFormatIngestSettings
Configuration for DLT pipelines that import XML files.
Source code in src/cdm_data_loaders/core/settings.py
SingleTableXmlIngestSettings ¶
Bases: XmlIngestSettings, TransformSettingsMixin
Configuration for DLT pipelines that import XML elements into a single target table.
Source code in src/cdm_data_loaders/core/settings.py
default_settings_with_shortcuts ¶
default_settings_with_shortcuts(
*,
cli_prog_name: str | None = None,
cli_shortcuts: (
dict[str, str | list[str]]
| frozendict[str, str | list[str]]
| None
) = None
) -> SettingsConfigDict
Build a SettingsConfigDict with the default settings config and the given CLI shortcuts.
Source code in src/cdm_data_loaders/core/settings.py
select_cli_shortcuts ¶
select_cli_shortcuts(
shortcuts: Mapping[str, str],
*keys: str,
base: Mapping[str, str] = FILE_FORMAT_CLI_SHORTCUTS
) -> dict[str, str]
Merge base shortcuts with the subset of shortcuts matching keys.