Dataset Config¶
- pydantic model dsgrid.config.dataset_config.DatasetConfigModel[source]¶
Represents dataset 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.
- Fields:
- Validators:
check_time_zone
»all fields
handle_legacy_fields
»all fields
- field data_classification: DataClassificationType [Required]¶
Data security classification (e.g., low, moderate, high)
- Validated by:
- field data_schema: StandardDataSchemaModel | OneTableDataSchemaModel [Required]¶
Schema (table layouts) used for writing out the dataset
- Validated by:
- field data_source: str [Required]¶
Data source name, e.g. ‘ComStock’.
- Validated by:
- field dataset_id: str [Required]¶
Unique dataset identifier.
- Validated by:
- field dataset_qualifier_metadata: QuantityModel | GrowthRateModel = QuantityModel(dataset_qualifier_type=<DatasetQualifierType.QUANTITY: 'quantity'>)¶
Additional metadata to include related to the dataset_qualifier
- Validated by:
- field dataset_type: InputDatasetType [Required]¶
Input dataset type.
- Validated by:
- field dataset_version: str | None = None¶
The version of the dataset.
- Validated by:
- field description: str [Required]¶
A detailed description of the dataset.
- Validated by:
- field dimension_references: list[DimensionReferenceModel] = []¶
List of registered dimension references that make up the dimensions of dataset.
- Validated by:
- field dimensions: Annotated[list[DimensionModel | DateTimeDimensionModel | AnnualTimeDimensionModel | RepresentativePeriodTimeDimensionModel | IndexTimeDimensionModel | NoOpTimeDimensionModel], BeforeValidator(func=handle_dimension_union, json_schema_input_type=PydanticUndefined)] = []¶
List of dimensions that make up the dimensions of dataset. They will be automatically registered during dataset registration and then converted to dimension_references.
- Constraints:
func = <function handle_dimension_union at 0x7ff78447bf60>
json_schema_input_type = PydanticUndefined
- Validated by:
- field enable_unit_conversion: bool = True¶
If the dataset uses its dimension mapping for the metric dimension to also perform unit conversion, then this value should be false.
- Validated by:
- field id: str | None = None (alias '_id')¶
Registry database ID
- Validated by:
- field key: str | None = None (alias '_key')¶
Registry database key
- Validated by:
- field origin_contributors: list[str] = []¶
List of origin data contributor’s first and last names e.g., [“Harry Potter”, “Ronald Weasley”]
- Validated by:
- field origin_creator: str [Required]¶
Origin data creator’s name (first and last)
- Validated by:
- field origin_date: str [Required]¶
Date the source data was generated
- Validated by:
- field origin_organization: str [Required]¶
Origin organization name, e.g., NREL
- Validated by:
- field origin_project: str [Required]¶
Origin project name
- Validated by:
- field origin_version: str [Required]¶
Version of the origin data
- Validated by:
- field rev: str | None = None (alias '_rev')¶
Registry database revision
- Validated by:
- field sector_description: str | None = None¶
Sectoral description (e.g., residential, commercial, industrial, transportation, electricity)
- Validated by:
- field source: str [Required]¶
Source of the data (text description or link)
- Validated by:
- field tags: list[str] = []¶
List of data tags
- Validated by:
- field trivial_dimensions: list[DimensionType] = []¶
List of trivial dimensions (i.e., 1-element dimensions) that do not exist in the load_data_lookup. List the dimensions by dimension type.
- Validated by:
- field use_project_geography_time_zone: bool = False¶
If true, time zones will be applied from the project’s geography dimension. If false, the dataset’s geography dimension records must provide a time zone column.
- Validated by:
- field user_defined_metadata: dict[str, Any] = {}¶
Additional user defined metadata fields
- Validated by:
- field version: str | None = None¶
Version, generated by dsgrid
- Validated by:
- validator check_dataset_id » dataset_id[source]¶
Check dataset ID validity
- validator check_files » dimensions[source]¶
Validate dimension files are unique across all dimensions
- validator check_names » dimensions[source]¶
Validate dimension names are unique across all dimensions.
- validator check_time_not_trivial » trivial_dimensions[source]¶