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 one-to-one foreign key identifier for the Workspace being transferred. Each Workspace may have at most one pending transfer.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 one-to-one foreign key identifier for the Workspace to be deleted. Each Workspace may have at most one pending delete confirmation.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: *, view, create, edit, or delete.String
Mresource_typeThe resource type to which the Permission applies. One of *, APIKey, Role, Collaborator, Thing, Datastream, Observation, Sensor, ObservedProperty, ProcessingLevel, Unit, ResultQualifier, ETL, DataProduct, or DataMonitoring.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).

Orchestration

HydroServer's orchestration layer defines a base Task model that is extended by domain-specific task subclasses in the ETL, Data Products, and Data Monitoring apps. Each domain task is a multi-table-inheritance child of the base Task: its primary key is the inherited task_ptr_id (the parent Task's UUID), and the row in the subclass table joins with the row in the orchestration task table.

Task

A Task defines an automated HydroServer workflow. It holds the schedule and run state shared by every task subtype. Each concrete task subclass — EtlTask, DataProductTask, and MonitoringTask — extends this model through multi-table inheritance.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Task. Domain task subclasses share this identifier.UUID
MnameA descriptive name for the Task.String
OdescriptionA text description for the Task.Text
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
Onext_run_atThe datetime when the Task is expected to run next.Datetime

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: PENDING, STARTED, SUCCESS, or FAILURE.String
OmessageA text string describing the outcome or error message for the run.Text
Mstarted_atThe datetime when the TaskRun started. Automatically populated on creation.Datetime
Ofinished_atThe datetime when the TaskRun finished.Datetime
OresultA JSON object storing execution result details.JSON

ETL

The ETL app models the configuration used to extract data from an external source and load it into HydroServer Datastreams.

DataConnection

A DataConnection describes a single external data source: where to fetch payloads, how to authenticate, and how to interpret the timestamps in the response. A DataConnection is shared across one or more EtlTask instances and one optional notification configuration.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the DataConnection.UUID
MnameA descriptive name for the DataConnection.String
OdescriptionA text description for the DataConnection.Text
Mworkspace_idA foreign key identifier for the Workspace that owns the DataConnection.UUID
Msource_urlThe URL template fetched by the extractor. May contain placeholder variables resolved at run time.Text
Oauth_header_nameThe name of an HTTP header used to authenticate against the source URL (e.g. Authorization).String
Oauth_header_valueThe value sent with the auth header, such as an API token. Stored as plain text.Text
Mtimestamp_keyThe field name or column key that identifies the timestamp in the source payload.String
Otimestamp_formatAn optional format string used to parse non-ISO timestamps from the source payload.String
Otimezone_typeThe kind of timezone interpretation applied to the timestamps: utc, offset, or iana.String
OtimezoneThe timezone value (an IANA name or an offset) used when timezone_type is offset or iana.String

PlaceholderVariable

A PlaceholderVariable defines a named substitution that is resolved into the DataConnection's source_url at run time.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the PlaceholderVariable.UUID
Mdata_connection_idA foreign key identifier for the DataConnection to which the placeholder belongs.UUID
MnameThe placeholder name as it appears in the source_url template.String
Mvariable_typeThe type of value substituted at run time: run_time, latest_observation_timestamp, or per_task.String
Otimestamp_formatAn optional format string used to render the substituted value when the value is a timestamp.String

Payload

A Payload describes how the response body returned by the extractor should be parsed. Each DataConnection has at most one Payload row.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Payload.UUID
Mdata_connection_idA one-to-one foreign key identifier for the DataConnection to which the Payload belongs.UUID
Mpayload_typeThe payload encoding: CSV or JSON.String
Oheader_rowFor CSV payloads, the row index containing column headers.Integer
Odata_start_rowFor CSV payloads, the row index where data begins.Integer
OdelimiterFor CSV payloads, the field delimiter: ,, \t, ;, |, or .String
OjmespathFor JSON payloads, a JMESPath expression used to select observation records out of the response body.Text

DataConnectionNotification

A DataConnectionNotification records the configuration for the periodic data freshness notification associated with a DataConnection.

RequiredAttributeDefinitionData Type
Mdata_connection_idThe primary key for the DataConnectionNotification — a one-to-one foreign key to DataConnection. Each DataConnection has at most one notification row.UUID
Operiodic_task_idA one-to-one identifier for the associated scheduler record in django_celery_beat.BigInteger

DataConnectionNotificationRecipient

A notification email recipient associated with a DataConnectionNotification.

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

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

EtlTask

An EtlTask extends Task with the ETL-specific configuration that links the run to a DataConnection and any runtime overrides used by the extractor, transformer, and loader.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the EtlTask. Inherited from the parent Task row as task_ptr_id.UUID
Mdata_connection_idA foreign key identifier for the DataConnection used by the EtlTask.UUID
Mtask_variablesA JSON object storing runtime variables substituted into the DataConnection placeholders for this Task.JSON

EtlMapping

An EtlMapping associates a source identifier produced by the DataConnection with the target Datastream into which the values should be loaded. The previous TaskMapping / TaskMappingPath pair has been collapsed into this single model.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the EtlMapping.UUID
Metl_task_idA foreign key identifier for the EtlTask to which the mapping belongs.UUID
Msource_identifierA text identifier representing an incoming source field or column.String
Mtarget_datastream_idA foreign key identifier for the Datastream that receives the mapped values.UUID

Data Products

The Data Products app models derived Datastreams produced by transformations such as rating curves, expressions, and time-series aggregations.

DataProductTask

A DataProductTask extends Task with the data-product context — the Thing under which the derived Datastreams are organized.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the DataProductTask. Inherited from the parent Task row as task_ptr_id.UUID
Mthing_idA foreign key identifier for the Thing that owns the derived Datastreams produced by this task.UUID

DataProductTransformation

A DataProductTransformation describes how a single derived (output) Datastream is computed from one or more input Datastreams.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the DataProductTransformation.UUID
Mtask_idA foreign key identifier for the DataProductTask to which the transformation belongs.UUID
Moutput_datastream_idA one-to-one foreign key identifier for the Datastream that receives the transformation output.UUID
Mtransformation_typeThe type of transformation: rating_curve, expression, composite_expression, or aggregation.String
Orating_curve_idA foreign key identifier for the RatingCurve used when transformation_type is rating_curve.UUID
OformulaAn expression string used when transformation_type is expression or composite_expression.Text
Ooutput_interval_unitsThe interval unit for aggregation outputs: minutes, hours, days, weeks, or months.String
Ooutput_intervalThe positive interval count corresponding to output_interval_units.Integer
Otimezone_typeFor interval-aligned aggregations, the timezone interpretation: utc, offset, or iana.String
OtimezoneThe timezone value (an IANA name or an offset) used when timezone_type is offset or iana.String
Oaggregation_methodFor aggregation transformations, the aggregation function: mean, sum, min, max, first, or last.String
Omax_gap_interval_unitsFor aggregation transformations, the unit of the maximum allowed gap within a window.String
Omax_gap_intervalFor aggregation transformations, the positive count of max_gap_interval_units allowed within a window before the bin is dropped.Integer
Omin_valuesFor aggregation transformations, the minimum number of input observations required per window.Integer

DataProductTransformationInput

A DataProductTransformationInput records a single input Datastream consumed by a DataProductTransformation, optionally bound to a named variable in the formula.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the DataProductTransformationInput.UUID
Mtransformation_idA foreign key identifier for the DataProductTransformation that consumes the input.UUID
Mdatastream_idA foreign key identifier for the input Datastream.UUID
Ovariable_nameThe variable name used in the transformation formula to reference this input.String

NOTE: The database enforces a unique constraint on (transformation_id, variable_name) when variable_name is not null.

RatingCurve

A RatingCurve defines a mapping from input values to output values, used by rating_curve transformations to convert one Datastream (e.g. stage) to another (e.g. discharge).

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the RatingCurve.UUID
Mthing_idA foreign key identifier for the Thing to which the RatingCurve belongs.UUID
MnameA descriptive name for the RatingCurve.String
OdescriptionA text description for the RatingCurve.Text
Mfitting_methodThe method used to fit the curve: linear or power_law.String

RatingCurvePoint

A RatingCurvePoint defines a single (input, output) sample used to fit a RatingCurve.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the RatingCurvePoint.UUID
Mrating_curve_idA foreign key identifier for the RatingCurve to which the point belongs.UUID
Minput_valueThe input value of the point (e.g. stage).Float
Moutput_valueThe output value of the point (e.g. discharge).Float

Data Monitoring

The Data Monitoring app models scheduled checks that evaluate Datastreams against quality-control rules and notify recipients when rules are violated.

MonitoringTask

A MonitoringTask extends Task with the data-monitoring context — the Thing whose Datastreams are evaluated.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the MonitoringTask. Inherited from the parent Task row as task_ptr_id.UUID
Mthing_idA foreign key identifier for the Thing whose Datastreams are monitored by this task.UUID

MonitoringRule

A MonitoringRule defines a single quality-control check applied to a Datastream by a MonitoringTask.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the MonitoringRule.UUID
Mtask_idA foreign key identifier for the MonitoringTask to which the rule belongs.UUID
Mdatastream_idA foreign key identifier for the Datastream evaluated by the rule.UUID
Mrule_typeThe type of rule: range, rate_of_change, persistence, or missing_data.String
Olast_checked_atThe datetime when the rule was last evaluated.Datetime
Omin_valueFor range rules, the lower bound of the allowed range.Float
Omax_valueFor range rules, the upper bound of the allowed range.Float
Owindow_intervalFor window-based rules, the positive number of window_interval_units evaluated by the rule.Integer
Owindow_interval_unitsFor window-based rules, the unit of the evaluation window: minutes, hours, or days.String

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

MonitoringNotificationRecipient

A notification email recipient associated with a MonitoringTask.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the MonitoringNotificationRecipient.UUID
Mtask_idA foreign key identifier for the MonitoringTask.UUID
MemailAn email address that receives notifications for the MonitoringTask.Email

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

Reference Data

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