Dimension Mapping Config¶
Registered Dimension Mappings¶
- pydantic model dsgrid.config.mapping_tables.MappingTableModel[source]¶
Attributes for a dimension mapping table
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- Validators:
- field file_hash: str | None = None¶
Hash of the contents of the file, computed by dsgrid.
- Validated by:
- field filename: str | None = None (alias 'file')¶
Filename containing association table records. Only assigned for user input and output purposes. The registry database stores records in the mapping JSON document.
- Validated by:
- field records: list = []¶
dimension mapping records in filename that get loaded at runtime
- Validated by:
- classmethod from_pre_registered_model(model: DimensionMappingPreRegisteredBaseModel, from_dimension, to_dimension)[source]¶
- pydantic model dsgrid.config.mapping_tables.MappingTableRecordModel[source]¶
Represents one record in dimension mapping record files. Maps one dimension to another.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- Validators:
- field from_fraction: float = 1.0¶
Fraction of from_id to map to to_id
- field from_id: str [Required]¶
Source mapping
- Validated by:
- field to_id: str | None = None¶
Destination mapping
- Validated by:
- pydantic model dsgrid.config.dimension_mapping_base.DimensionMappingBaseModel[source]¶
Base class for mapping dimensions
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- Validators:
- field archetype: DimensionMappingArchetype | None = None¶
Dimension mapping archetype, determined based on mapping_type
- Validated by:
- field description: str [Required]¶
Description of dimension mapping
- field from_dimension: DimensionReferenceModel [Required]¶
From dimension
- field from_fraction_tolerance: float = 1e-06¶
Tolerance to apply when checking from_fraction column sums
- field mapping_id: str | None = None¶
Unique dimension mapping identifier, generated by dsgrid
- field mapping_type: DimensionMappingType = 'many_to_one_aggregation'¶
Type/purpose of the dimension mapping
- field to_dimension: DimensionReferenceModel [Required]¶
To dimension
- field to_fraction_tolerance: float = 1e-06¶
Tolerance to apply when checking to_fraction column sums
Dimension Mapping Reference¶
- pydantic model dsgrid.config.dimension_mapping_base.DimensionMappingReferenceModel[source]¶
Reference to a dimension mapping stored in the registry.
The DimensionMappingReferenceModel is utilized by the project configuration (project.json5) as well as by the dimension mapping reference configuration (dimension_mapping_references.json5) that may be required when submitting a dataset to a project.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- field from_dimension_type: DimensionType [Required]¶
Dimension Type
- field mapping_id: str [Required]¶
Unique ID of the dimension mapping
- field required_for_validation: bool = True¶
Set to False if a given dimension association is NOT required for input dataset validation; default is True
- field to_dimension_type: DimensionType [Required]¶
Dimension Type
- field version: str [Required]¶
Version of the dimension
- pydantic model dsgrid.config.dimension_mapping_base.DimensionMappingReferenceListModel[source]¶
List of dimension mapping references used by the dimensions_mappings.json5 config
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field references: list[DimensionMappingReferenceModel] [Required]¶
List of dimension mapping references
- pydantic model dsgrid.config.dimension_mappings_config.DimensionMappingsConfigModel[source]¶
Represents dimension mapping model configurations
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field mappings: list[MappingTableModel] [Required]¶
dimension mappings between and within projects and datasets
- pydantic model dsgrid.config.mapping_tables.DatasetBaseToProjectMappingTableModel[source]¶
Attributes for a dimension mapping table to map soon-to-be-registered dataset base dimensions to a project’s dimensions. This will be converted to a MappingTableModel as soon as the dimensions are registered.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- field filename: str [Required] (alias 'file')¶
Filename containing association table records.
- pydantic model dsgrid.config.mapping_tables.DatasetBaseToProjectMappingTableListModel[source]¶
Represents the config file passed to register-and-submit-dataset command.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field mappings: list[DatasetBaseToProjectMappingTableModel] [Required]¶
- pydantic model dsgrid.config.dimension_mapping_base.DimensionMappingDatasetToProjectBaseModel[source]¶
Base class for mapping soon-to-be registered dimensions for a dataset. Used when automatically registering mappings while submitting a dataset to a project.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field dimension_type: DimensionType [Required]¶
Dimension types that will be mapped
Unregistered Dimension Mappings¶
- pydantic model dsgrid.config.mapping_tables.MappingTableByNameModel[source]¶
Attributes for a dimension mapping table for soon-to-be registered dimensions by name. This will be converted to a MappingTableModel as soon as the dimensions are registered.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- field filename: str [Required] (alias 'file')¶
Filename containing association table records.
- pydantic model dsgrid.config.dimension_mapping_base.DimensionMappingPreRegisteredBaseModel[source]¶
Base class for mapping soon-to-be registered dimensions. As soon as the dimensions are registered this will be converted to a DimensionMappingBaseModel and then registered.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- field archetype: DimensionMappingArchetype | None = None¶
Dimension mapping archetype, determined based on mapping_type
- field description: str [Required]¶
Description of dimension mapping
- field from_fraction_tolerance: float = 1e-06¶
Tolerance value to apply to the from_fraction column
- field mapping_type: DimensionMappingType = 'many_to_one_aggregation'¶
Type/purpose of the dimension mapping
- field to_fraction_tolerance: float = 1e-06¶
Tolerance value to apply to the to_fraction column
- pydantic model dsgrid.config.dimensions.DimensionReferenceByNameModel[source]¶
Reference to a dimension that has yet to be registered.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field dimension_type: DimensionType [Required] (alias 'type')¶
Type of the dimension
- field name: str [Required]¶
Dimension name