Loading Job Configuration
LoadingJobConfig
Bases: BaseConfig
Configuration for a loading job consisting of multiple files.
loading_job_name = Field(description='The name of the loading job.')
class-attribute
instance-attribute
files = Field(description='A list of files included in the loading job.')
class-attribute
instance-attribute
validate_file_aliases()
Ensure that all file_alias values are unique.
Returns:
-
LoadingJobConfig
–The validated loading job configuration.
Raises:
-
ValueError
–If duplicate file_alias values are found.
FileConfig
Bases: BaseConfig
Configuration for a single file used in a loading job.
file_alias = Field(description='An alias for the file, used as a reference.')
class-attribute
instance-attribute
file_path = Field(default=None, description='The path to the file on disk.')
class-attribute
instance-attribute
csv_parsing_options = Field(default_factory=CsvParsingOptions, description='Options for parsing the CSV file.')
class-attribute
instance-attribute
node_mappings = Field(default=[], description='Node mappings defined for this file.')
class-attribute
instance-attribute
edge_mappings = Field(default=[], description='Edge mappings defined for this file.')
class-attribute
instance-attribute
validate_mappings()
Ensure that at least one mapping (node or edge) exists.
Returns:
-
FileConfig
–The validated file configuration.
Raises:
-
ValueError
–If no node or edge mappings are provided.
CsvParsingOptions
Bases: BaseConfig
Configuration options for CSV parsing.
separator = Field(default=',', description='The separator used in the CSV file.')
class-attribute
instance-attribute
header = Field(default=True, description='Whether the CSV file contains a header row.')
class-attribute
instance-attribute
EOL = Field(default='\\n', description='The end-of-line character in the CSV file.')
class-attribute
instance-attribute
quote = Field(default=QuoteType.DOUBLE, description='The type of quote used in the CSV file.')
class-attribute
instance-attribute
NodeMappingConfig
Bases: BaseConfig
Configuration for mapping node attributes from a file to the target schema.
target_name = Field(description='The name of the target node type.')
class-attribute
instance-attribute
attribute_column_mappings = Field(default={}, description='Mapping file columns to node attributes.')
class-attribute
instance-attribute
EdgeMappingConfig
Bases: BaseConfig
Configuration for mapping edge attributes from a file to the target schema.