Dimension Mappings¶
DimensionMappingBaseModel¶
dsgrid.config.dimension_mapping_base.DimensionMappingBaseModel
Base class for mapping dimensions
Fields¶
Name |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Registry database ID |
|
|
|
Version, generated by dsgrid |
|
|
Type/purpose of the dimension mapping |
|
|
DimensionMappingArchetype | None |
|
Dimension mapping archetype, determined based on mapping_type |
|
(required) |
From dimension |
|
|
(required) |
To dimension |
|
|
|
|
Tolerance to apply when checking from_fraction column sums |
|
|
|
Tolerance to apply when checking to_fraction column sums |
|
|
|
Description of dimension mapping |
|
|
|
Unique dimension mapping identifier, generated by dsgrid |
Validators¶
Name |
Applies To |
Description |
|---|---|---|
|
|
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 |
|---|---|---|---|
|
(required) |
Dimension Type |
|
|
(required) |
Dimension Type |
|
|
|
(required) |
Unique ID of the dimension mapping |
|
|
(required) |
Version of the dimension |
Validators¶
Name |
Applies To |
Description |
|---|---|---|
|
|
No description |
DatasetBaseToProjectMappingTableListModel¶
dsgrid.config.mapping_tables.DatasetBaseToProjectMappingTableListModel
Represents the config file passed to register-and-submit-dataset command.
Fields¶
Name |
Type |
Default |
Description |
|---|---|---|---|
|
(required) |
DatasetBaseToProjectMappingTableModel¶
dsgrid.config.mapping_tables.DatasetBaseToProjectMappingTableModel
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.
Fields¶
Name |
Type |
Default |
Description |
|---|---|---|---|
|
|
Type/purpose of the dimension mapping |
|
|
DimensionMappingArchetype | None |
|
Dimension mapping archetype, determined based on mapping_type |
|
|
|
Description of dimension mapping |
|
|
|
Tolerance value to apply to the from_fraction column |
|
|
|
Tolerance value to apply to the to_fraction column |
|
|
|
Name of the base dimension for which the mapping is being registered. This is required in cases where the project has multiple base dimensions of the same type. If None, there must only be one base dimension of this type in the project. |
|
(required) |
Dimension types that will be mapped |
|
|
|
(required) |
Filename containing association table records. |
DimensionMappingReferenceListModel¶
dsgrid.config.dimension_mapping_base.DimensionMappingReferenceListModel
List of dimension mapping references used by the dimensions_mappings.json5 config
Fields¶
Name |
Type |
Default |
Description |
|---|---|---|---|
|
(required) |
List of dimension mapping references |
DimensionMappingsConfigModel¶
dsgrid.config.dimension_mappings_config.DimensionMappingsConfigModel
Represents dimension mapping model configurations
Fields¶
Name |
Type |
Default |
Description |
|---|---|---|---|
|
list[MappingTableModel] |
(required) |
dimension mappings between and within projects and datasets |
MappingTableModel¶
dsgrid.config.mapping_tables.MappingTableModel
Attributes for a dimension mapping table
Fields¶
Name |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Registry database ID |
|
|
|
Version, generated by dsgrid |
|
|
Type/purpose of the dimension mapping |
|
|
DimensionMappingArchetype | None |
|
Dimension mapping archetype, determined based on mapping_type |
|
(required) |
From dimension |
|
|
(required) |
To dimension |
|
|
|
|
Tolerance to apply when checking from_fraction column sums |
|
|
|
Tolerance to apply when checking to_fraction column sums |
|
|
|
Description of dimension mapping |
|
|
|
Unique dimension mapping identifier, generated by dsgrid |
|
|
|
Filename containing association table records. Only assigned for user input and output purposes. The registry database stores records in the mapping JSON document. |
|
|
|
Hash of the contents of the file, computed by dsgrid. |
|
|
|
dimension mapping records in filename that get loaded at runtime |
Validators¶
Name |
Applies To |
Description |
|---|---|---|
|
|
No description |
|
|
Validate record file |
|
|
Compute file hash. |
|
|
Add records from the file. |