Dimension Mappings

DimensionMappingBaseModel

dsgrid.config.dimension_mapping_base.DimensionMappingBaseModel

Base class for mapping dimensions

Fields

Name

Type

Default

Description

id

int | None

None

Registry database ID

version

str | None

None

Version, generated by dsgrid

mapping_type

DimensionMappingType

"many_to_one_aggregation"

Type/purpose of the dimension mapping

archetype

DimensionMappingArchetype | None

None

Dimension mapping archetype, determined based on mapping_type

from_dimension

DimensionReferenceModel

(required)

From dimension

to_dimension

DimensionReferenceModel

(required)

To dimension

from_fraction_tolerance

float

1e-06

Tolerance to apply when checking from_fraction column sums

to_fraction_tolerance

float

1e-06

Tolerance to apply when checking to_fraction column sums

description

str | None

None

Description of dimension mapping

mapping_id

str | None

None

Unique dimension mapping identifier, generated by dsgrid

Validators

Name

Applies To

Description

check_archetype

check_archetype

No description


DimensionMappingReferenceModel

dsgrid.config.dimension_mapping_base.DimensionMappingReferenceModel

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.

Fields

Name

Type

Default

Description

from_dimension_type

DimensionType

(required)

Dimension Type

to_dimension_type

DimensionType

(required)

Dimension Type

mapping_id

str

(required)

Unique ID of the dimension mapping

version

str

(required)

Version of the dimension

Validators

Name

Applies To

Description

handle_legacy_fields

*(model)*

No description