Skip to content

HydroServer Data Model Data Dictionary

This document describes the Django model fields that back HydroServer's core data model.

Attribute names below use the persisted model field names in snake_case. Foreign keys are shown as the stored *_id values. The API uses camelCase aliases.

M = Mandatory O = Optional

Datastream

A Datastream groups a collection of Observations measuring the same ObservedProperty and produced by the same Sensor. Each instance of a Datastream represents the properties for a time series of Observations.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Datastream.UUID
MnameA text name for the Datastream.String
MdescriptionA text description for the Datastream.Text
Msensor_idA foreign key identifier for the Sensor or method used to create the Datastream.UUID
Mthing_idA foreign key identifier for the Thing on which or at which the Datastream was created.UUID
Mobserved_property_idA foreign key identifier for the ObservedProperty associated with the Datastream.UUID
Munit_idA foreign key identifier for the Unit used for Observations within the Datastream.UUID
Mprocessing_level_idA foreign key identifier indicating the ProcessingLevel for the Datastream.UUID
Mobservation_typeThe type of Observation recorded in the Datastream.String
Mresult_typeThe type of result represented by the Datastream.String
OstatusA text value indicating the status of the Datastream.String
Oobserved_areaThe spatial extent associated with the Datastream. This field exists in the database but is currently unused.String
Msampled_mediumThe environmental medium sampled by the Datastream.String
Ovalue_countThe number of Observations within the Datastream.Integer
Mno_data_valueA numeric value used to indicate the absence of data.Float
Ointended_time_spacingA numeric value indicating the intended spacing between Observations.Float
Ointended_time_spacing_unitA string indicating the unit for intended_time_spacing.String
Maggregation_statisticA text string indicating the aggregation statistic for the Datastream.String
Mtime_aggregation_intervalA numeric value indicating the time interval over which recorded Observations were aggregated.Float
Mtime_aggregation_interval_unitA string indicating the unit for time_aggregation_interval.String
Ophenomenon_begin_timeThe time at which the activity began that results in the Datastream's Observations.Datetime
Ophenomenon_end_timeThe time at which the activity ended that results in the Datastream's Observations.Datetime
Oresult_begin_timeThe timestamp of the first Observation in the Datastream. This field remains in the model but is currently unused.Datetime
Oresult_end_timeThe timestamp of the last Observation in the Datastream. This field remains in the model but is currently unused.Datetime
Mis_privateAn access control flag indicating whether the Datastream metadata and data are private by default.Boolean
Mis_visibleAn access control flag indicating whether the Datastream should be shown in normal data-discovery responses.Boolean

Location

The Location entity stores the location of a Thing. In the context of Things that are monitoring sites, this is the physical location of the monitoring site.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Location.UUID
Mthing_idA foreign key identifier for the Thing to which the Location belongs.UUID
MnameA text string name for the Location.String
MdescriptionA text string description for the Location.Text
Mencoding_typeThe encoding type of the Location, usually application/vnd.geo+json.String
MlatitudeThe latitude of the Location using WGS84 coordinates.Decimal
MlongitudeThe longitude of the Location using WGS84 coordinates.Decimal
Oelevation_mThe elevation of the Location in meters.Decimal
Oelevation_datumA text string indicating the elevation datum used for the Location.String
Oadmin_area_1A text string indicating the first-level administrative area for the Location.String
Oadmin_area_2A text string indicating the second-level administrative area for the Location.String
OcountryA two-character ISO country code for the Location.String

NOTE: The database allows a Thing to have multiple Location rows, but the current Data Management API treats location as a single nested object on a Thing.

Observation

An Observation is the act of measuring or otherwise determining the value of a property, including its numeric result and the date/time at which it was observed.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Observation.UUID
Mdatastream_idA foreign key identifier for the Datastream to which the Observation belongs.UUID
Mphenomenon_timeA datetime value indicating the time instant when the Observation happened.Datetime
MresultThe numeric value of the Observation.Float
Oresult_timeThe time that the Observation's result was generated, if different from phenomenon_time.Datetime
Oquality_codeA text code indicating the quality of the Observation.String
Oresult_qualifiersA many-to-many relationship to ResultQualifier. This is stored in a join table, not as an array column on Observation.Many-to-many

NOTE: quality_code is persisted in the database, but the current Data Management API does not include it in the main observation schema. The API also uses resultQualifierCodes rather than exposing the join table directly.

ObservedProperty

An ObservedProperty specifies the phenomenon of an Observation, such as flow, temperature, pH, or dissolved oxygen concentration.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the ObservedProperty.UUID
Oworkspace_idA foreign key identifier for the Workspace that owns the ObservedProperty. If omitted, the ObservedProperty is shared system-wide.UUID
MnameA descriptive name for the ObservedProperty.String
MdefinitionA text definition of the ObservedProperty or a URL pointing to a controlled definition.Text
MdescriptionA text description of the ObservedProperty.Text
Mobserved_property_typeThe type of ObservedProperty.String
McodeA brief text code identifying the ObservedProperty.String

Organization

An Organization is a body of people having a particular purpose, such as a business, agency, research group, or laboratory.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Organization.BigInteger
McodeA brief text code or abbreviation for the Organization.String
MnameA descriptive name for the Organization.String
OdescriptionA text description of the Organization.Text
OlinkA URL pointing to a website for the Organization.URL
Morganization_typeA text string indicating the type of Organization.String

User

Individual users who own workspaces, collaborate on data management, or manage account information in HydroServer.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the User.BigInteger
MusernameThe Django username field. HydroServer keeps this synchronized to the user's email address.String
MpasswordThe stored password hash.String
Olast_loginThe datetime when the User last logged in.Datetime
Mis_superuserA boolean value indicating whether the User bypasses explicit permission assignments.Boolean
Ofirst_nameThe User's first name.String
Omiddle_nameThe User's middle name.String
Olast_nameThe User's last name.String
MemailThe User's contact email address.String
Mis_staffA boolean value indicating whether the User can access the Django admin site.Boolean
Mis_activeA boolean value indicating whether the account is active.Boolean
Mdate_joinedThe datetime when the User account was created.Datetime
OphoneThe User's contact phone number.String
OaddressThe User's physical mailing address.String
OlinkA URL pointing to a website for the User.URL
Muser_typeA text string indicating the type of User.String
Oorganization_idA one-to-one identifier for the Organization with which the User is affiliated. Each User may be affiliated with at most one Organization, and each Organization may be affiliated with at most one User.BigInteger
Mis_ownership_allowedA boolean value indicating whether the User may own workspaces.Boolean

NOTE: groups and user_permissions are also persisted through Django auth many-to-many join tables, but they are not columns on the User row itself.

ProcessingLevel

The degree of quality control or processing to which a Datastream has been subjected.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the ProcessingLevel.UUID
Oworkspace_idA foreign key identifier for the Workspace that owns the ProcessingLevel. If omitted, the ProcessingLevel is shared system-wide.UUID
McodeA brief text code identifying the ProcessingLevel.String
OdefinitionA text definition of the ProcessingLevel.Text
OexplanationA longer text explanation of the ProcessingLevel.Text

ResultQualifier

Data qualifying comments added to individual data values to qualify their interpretation or use.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the ResultQualifier.UUID
Oworkspace_idA foreign key identifier for the Workspace that owns the ResultQualifier. If omitted, the ResultQualifier is shared system-wide.UUID
McodeA brief text code identifying the ResultQualifier.String
MdescriptionA longer text description or explanation of the ResultQualifier.Text

NOTE: The database enforces a unique constraint on (code, workspace_id), including the system-wide NULL workspace scope.

Sensor

A Sensor is an instrument, method, or procedure used to produce Observations for a Datastream.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Sensor.UUID
Oworkspace_idA foreign key identifier for the Workspace that owns the Sensor. If omitted, the Sensor is shared system-wide.UUID
MnameA descriptive name for the Sensor.String
MdescriptionA longer text description of the Sensor.Text
Mencoding_typeA string indicating how the Sensor information is encoded.String
Omethod_codeA brief text code identifying the Sensor or method.String
Mmethod_typeA text string indicating the type of Sensor or method.String
Omethod_linkA URL pointing to documentation that defines or describes the Sensor or method.String
OmanufacturerThe name of the Sensor manufacturer.String
Osensor_modelThe name of the Sensor model.String
Osensor_model_linkA URL pointing to documentation for the Sensor model.String

NOTE: HydroServer uses the Sensor entity for both physical instruments and derived methods or procedures, such as transformations or rating-curve-derived values.

Thing

A Thing is an object of the physical world or information world that is capable of being identified and integrated into communication networks. In the context of HydroServer, a Thing is typically a monitoring station or site.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Thing.UUID
Mworkspace_idA foreign key identifier for the Workspace that owns the Thing.UUID
MnameA text string giving a name for the Thing.String
MdescriptionA text string giving a description for the Thing.Text
Msampling_feature_typeA text string specifying the type of sampling feature.String
Msampling_feature_codeA text string specifying a shortened code identifying the Thing.String
Msite_typeA text string specifying the type of site represented by the Thing.String
Mis_privateAn access control flag indicating whether the Thing is discoverable and whether its metadata is publicly available.Boolean
Odata_disclaimerA text string displayed with the Thing's data to specify any disclaimer.Text

ThingTag

A key-value tag associated with a Thing.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the ThingTag.BigInteger
Mthing_idA foreign key identifier for the Thing to which the tag belongs.UUID
MkeyThe tag key.String
MvalueThe tag value.String

ThingFileAttachment

A file attached to a Thing, such as a site photo, document, or supporting artifact.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the ThingFileAttachment.BigInteger
Mthing_idA foreign key identifier for the Thing to which the file attachment belongs.UUID
MnameThe name of the attached file.String
OdescriptionA text description of the attached file.Text
Mfile_attachmentThe stored file object for the attachment.File
Mfile_attachment_typeA text string identifying the type of file attachment.String

NOTE: The database enforces a unique constraint on (thing_id, name).

Unit

The unit of measure associated with the Observations within a Datastream.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Unit.UUID
Oworkspace_idA foreign key identifier for the Workspace that owns the Unit. If omitted, the Unit is shared system-wide.UUID
MnameA descriptive name for the Unit.String
MsymbolAn abbreviation or symbol used for the Unit.String
MdefinitionA URL or text definition for the Unit.Text
Munit_typeThe type of Unit.String

Workspace

A Workspace is the ownership and access-control boundary for most HydroServer-managed resources.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Workspace.UUID
MnameA descriptive name for the Workspace.String
Mowner_idA foreign key identifier for the User who owns the Workspace.BigInteger
Mis_privateAn access control flag indicating whether the Workspace is private.Boolean

NOTE: The database enforces a unique constraint on (name, owner_id).

WorkspaceTransferConfirmation

A pending transfer record used when ownership of a Workspace is being transferred to another User.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the WorkspaceTransferConfirmation.BigInteger
Mworkspace_idA foreign key identifier for the Workspace being transferred.UUID
Mnew_owner_idA foreign key identifier for the new owner.BigInteger
MinitiatedThe datetime when the transfer was initiated.Datetime

WorkspaceDeleteConfirmation

A pending confirmation record used when a Workspace deletion has been initiated.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the WorkspaceDeleteConfirmation.BigInteger
Mworkspace_idA foreign key identifier for the Workspace to be deleted.UUID
MinitiatedThe datetime when deletion confirmation was initiated.Datetime

Role

A Role is a named collection of permissions that can be assigned to collaborators or API keys.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Role.UUID
Oworkspace_idA foreign key identifier for the Workspace that owns the Role. If omitted, the Role is shared system-wide.UUID
MnameA descriptive name for the Role.String
OdescriptionA text description of the Role.Text
Mis_user_roleA boolean value indicating whether the Role may be assigned to a User collaborator.Boolean
Mis_apikey_roleA boolean value indicating whether the Role may be assigned to an API key.Boolean

Permission

A Permission associates a Role with an allowed action on a resource type.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Permission.BigInteger
Mrole_idA foreign key identifier for the Role to which the Permission belongs.UUID
Mpermission_typeThe permitted action, such as view, create, edit, delete, or *.String
Mresource_typeThe resource type to which the Permission applies.String

Collaborator

A Collaborator associates a User with a Workspace through a Role.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Collaborator.BigInteger
Mworkspace_idA foreign key identifier for the Workspace.UUID
Muser_idA foreign key identifier for the collaborating User.BigInteger
Mrole_idA foreign key identifier for the Role assigned to the Collaborator.UUID

NOTE: The database enforces a unique constraint on (user_id, workspace_id).

APIKey

An APIKey grants non-interactive access to a Workspace using an assigned Role.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the APIKey.UUID
Mworkspace_idA foreign key identifier for the Workspace to which the API key belongs.UUID
Mrole_idA foreign key identifier for the Role assigned to the API key.UUID
MnameA descriptive name for the API key.String
OdescriptionA text description of the API key.Text
Mcreated_atThe datetime when the API key was created.Datetime
Oexpires_atThe datetime when the API key expires.Datetime
Olast_usedThe datetime when the API key was last used.Datetime
Mis_activeA boolean value indicating whether the API key is active.Boolean
Mhashed_keyThe stored hashed representation of the API key secret.String

DatastreamTag

A key-value tag associated with a Datastream.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the DatastreamTag.BigInteger
Mdatastream_idA foreign key identifier for the Datastream to which the tag belongs.UUID
MkeyThe tag key.String
MvalueThe tag value.String

DatastreamFileAttachment

A file attached to a Datastream.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the DatastreamFileAttachment.BigInteger
Mdatastream_idA foreign key identifier for the Datastream to which the file attachment belongs.UUID
MnameThe name of the attached file.String
OdescriptionA text description of the attached file.Text
Mfile_attachmentThe stored file object for the attachment.File
Mfile_attachment_typeA text string identifying the type of file attachment.String

NOTE: The database enforces a unique constraint on (datastream_id, name).

OrchestrationSystem

An OrchestrationSystem identifies the engine or environment used to run automated HydroServer tasks.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the OrchestrationSystem.UUID
Oworkspace_idA foreign key identifier for the Workspace that owns the OrchestrationSystem. If omitted, the OrchestrationSystem is shared system-wide.UUID
MnameA descriptive name for the OrchestrationSystem.String
Morchestration_system_typeA text string indicating the type of orchestration system.String

DataConnection

A DataConnection stores the extraction, transformation, and loading configuration used by HydroServer ETL tasks.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the DataConnection.UUID
MnameA descriptive name for the DataConnection.String
Mdata_connection_typeA text string indicating the type of DataConnection.String
Oworkspace_idA foreign key identifier for the Workspace that owns the DataConnection. If omitted, the DataConnection is shared system-wide.UUID
Oextractor_typeThe type of extractor configured for the DataConnection.String
Mextractor_settingsA JSON object storing extractor configuration settings.JSON
Otransformer_typeThe type of transformer configured for the DataConnection.String
Mtransformer_settingsA JSON object storing transformer configuration settings.JSON
Oloader_typeThe type of loader configured for the DataConnection.String
Mloader_settingsA JSON object storing loader configuration settings.JSON

DataConnectionNotificationRecipient

A notification email recipient associated with a DataConnection.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the DataConnectionNotificationRecipient.BigInteger
Mdata_connection_idA foreign key identifier for the DataConnection.UUID
MemailAn email address that receives notifications for the DataConnection.Email

NOTE: The database enforces a unique constraint on (data_connection_id, email).

Task

A Task defines an automated HydroServer workflow, including the associated DataConnection, orchestration target, schedule, and runtime variables.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Task.UUID
MnameA descriptive name for the Task.String
Mtask_typeA text string indicating the Task type. The database stores this as a free-form string with a default of ETL; it does not enforce an enum.String
Mworkspace_idA foreign key identifier for the Workspace that owns the Task.UUID
Odata_connection_idA foreign key identifier for the DataConnection used by the Task.UUID
Morchestration_system_idA foreign key identifier for the OrchestrationSystem used by the Task.UUID
Operiodic_task_idA one-to-one identifier for the associated scheduler record in django_celery_beat. Each Task maps to at most one periodic task record.BigInteger
MpausedA boolean value indicating whether the Task is paused.Boolean
Onext_run_atThe datetime when the Task is expected to run next.Datetime
Mextractor_variablesA JSON object storing runtime variables for the extractor.JSON
Mtransformer_variablesA JSON object storing runtime variables for the transformer.JSON
Mloader_variablesA JSON object storing runtime variables for the loader.JSON

TaskMapping

A TaskMapping associates an incoming source identifier with one or more target mapping paths.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the TaskMapping.UUID
Mtask_idA foreign key identifier for the Task to which the mapping belongs.UUID
Msource_identifierA text identifier representing an incoming source field or path.String

TaskMappingPath

A TaskMappingPath maps a source identifier to a target identifier and any configured transformations.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the TaskMappingPath.UUID
Mtask_mapping_idA foreign key identifier for the TaskMapping to which the path belongs.UUID
Mtarget_identifierA text identifier representing the destination field or path.String
Mdata_transformationsA JSON array of transformation definitions applied along the mapping path.JSON

TaskRun

A TaskRun stores the execution history for a Task.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the TaskRun.UUID
Mtask_idA foreign key identifier for the Task to which the run belongs.UUID
MstatusA text string indicating the run status.String
Mstarted_atThe datetime when the TaskRun started.Datetime
Ofinished_atThe datetime when the TaskRun finished.Datetime
OresultA JSON object storing execution result details.JSON

Controlled Vocabulary Tables

HydroServer also includes simple lookup tables that primarily store controlled vocabulary terms used by the main entities.

TableAttributesData Type
UserTypeid, name, publicBigInteger, String, Boolean
OrganizationTypeid, name, publicBigInteger, String, Boolean
SiteTypeid, nameBigInteger, String
SamplingFeatureTypeid, nameBigInteger, String
FileAttachmentTypeid, nameBigInteger, String
VariableTypeid, nameBigInteger, String
SensorEncodingTypeid, nameBigInteger, String
MethodTypeid, nameBigInteger, String
UnitTypeid, nameBigInteger, String
DatastreamAggregationid, nameBigInteger, String
DatastreamStatusid, nameBigInteger, String
SampledMediumid, nameBigInteger, String

SensorThings Conceptual Entities

The current HydroServer SensorThings implementation still exposes SensorThings concepts that are not represented as first-class HydroServer database tables.

FeatureOfInterest

HydroServer currently derives FeatureOfInterest behavior from the Thing and Location context used by SensorThings responses rather than storing FeatureOfInterest as a first-class HydroServer model.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the FeatureOfInterest in SensorThings responses.UUID
MnameA text string giving the name of the feature.String
MdescriptionA text string providing a description of the feature.String
MencodingA text string describing the encoding in which the feature is expressed.String
MfeatureA GeoJSON encoding of the geometry of the feature.Object

HistoricalLocation

HydroServer currently exposes HistoricalLocation through SensorThings but does not store it as a first-class HydroServer model in the main domain packages.

RequiredAttributeDefinitionData Type
Mthing_idA foreign key identifier for the Thing for which the HistoricalLocation is specified.UUID
MtimeThe time when the Thing is known to be at the Location.Datetime
Mlocation_idA foreign key identifier for the Location.UUID