Skip to content

Looking for the HydroServer v1 docs?

These docs now cover HydroServer v2. The v1 docs have moved to hydroserver.org/v1 and are still available. View the v1 version of this page.

HydroServer Data Model Data Dictionary ​

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

Attribute names below use camelCase, matching the API and the data model diagrams. Foreign keys are shown as *Id attributes. In the database, each attribute is stored under its snake_case equivalent (for example, monitoringSiteId is the monitoring_site_id column).

M = Mandatory O = Optional

Metadata field conventions ​

Method, ObservedProperty, ProcessingLevel, Unit, and ResultQualifier share these conventions:

FieldMeaningRequirement
nameThe label every frontend displays to identify the item.Required; at most 255 characters.
descriptionFree-text comments from the user.Required text without a fixed length limit, except Unit has no description and ResultQualifier's is optional.
definitionA URL defining or documenting the item, such as a vocabulary term, standard, or manual.Optional URL; at most 2,000 characters. ResultQualifier has no definition.
codeAn external or organizational identifier.Optional; at most 255 characters. Unit has no code because its definition serves this purpose.

Elsewhere in the data model, link is a person's or organization's website. A linked resource's url identifies an external link, and its file holds an uploaded file.

Datastream ​

A Datastream groups a collection of Observations measuring the same ObservedProperty and produced by the same Method. 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
MmethodIdA foreign key identifier for the Method used to produce the Datastream.UUID
MmonitoringSiteIdA foreign key identifier for the MonitoringSite at which the Datastream was created.UUID
MobservedPropertyIdA foreign key identifier for the ObservedProperty associated with the Datastream.UUID
MunitIdA foreign key identifier for the Unit used for Observations within the Datastream.UUID
MprocessingLevelIdA foreign key identifier indicating the ProcessingLevel for the Datastream.UUID
MtypeHow the Datastream's Observations are arranged. One of timeSeriesCoverage (one Observation per time). Defaults to timeSeriesCoverage. Allowed values are defined by HydroServer, not by a controlled vocabulary table.String
OstatusA text value indicating the status of the Datastream.String
OobservedAreaThe spatial extent associated with the Datastream. This field exists in the database but is currently unused.String
MsampledMediumThe environmental medium sampled by the Datastream.String
OvalueCountThe number of Observations within the Datastream.Integer
MnoDataValueA numeric value used to indicate the absence of data.Float
OintendedTimeSpacingA numeric value indicating the intended spacing between Observations.Float
OintendedTimeSpacingUnitA string indicating the unit for intendedTimeSpacing.String
MaggregationStatisticA text string indicating the aggregation statistic for the Datastream.String
MtimeAggregationIntervalA numeric value indicating the time interval over which recorded Observations were aggregated.Float
MtimeAggregationIntervalUnitA string indicating the unit for timeAggregationInterval.String
OphenomenonBeginTimeThe time at which the activity began that results in the Datastream's Observations.Datetime
OphenomenonEndTimeThe time at which the activity ended that results in the Datastream's Observations.Datetime
OresultBeginTimeThe timestamp of the first Observation in the Datastream. This field remains in the model but is currently unused.Datetime
OresultEndTimeThe timestamp of the last Observation in the Datastream. This field remains in the model but is currently unused.Datetime
MisPrivateAn access control flag indicating whether the Datastream metadata and data are private by default.Boolean
MisRestrictedAn access control flag indicating whether data download and query are restricted for the Datastream. The Datastream and its metadata stay public, but its Observations are only available to workspace collaborators with permission to view them. Defaults to false.Boolean
MtagsCustom key-value metadata for the Datastream, stored as a JSON object of non-empty string keys and values. Defaults to {}.JSON

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
MdatastreamIdA foreign key identifier for the Datastream to which the Observation belongs.UUID
MphenomenonTimeA datetime value indicating the time instant when the Observation happened.Datetime
MresultThe numeric value of the Observation.Float
OresultTimeThe time that the Observation's result was generated, if different from phenomenonTime.Datetime
OqualityCodeA text code indicating the quality of the Observation.String
OresultQualifiersA JSON array of ResultQualifier names.JSON array

NOTE: qualityCode is persisted in the database, but the current Data Management API does not include it in the main observation schema. The API exposes resultQualifiers in observation payloads and as the resultQualifiers filter on observation queries; their values are qualifier names, not optional external codes. The Python client uses result_qualifiers for the corresponding keyword argument and DataFrame column.

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
OworkspaceIdA foreign key identifier for the Workspace that owns the ObservedProperty. If omitted, the ObservedProperty is shared system-wide.UUID
MnameThe label displayed by every frontend.String (255)
OdefinitionA URL defining or documenting the item.URL (2,000)
MdescriptionFree-text comments from the user.Text
MtypeThe type of ObservedProperty.String (255)
OcodeAn external or organizational identifier.String (255)

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
MorganizationTypeA 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
OlastLoginThe datetime when the User last logged in.Datetime
MisSuperuserA boolean value indicating whether the User bypasses explicit permission assignments.Boolean
OfirstNameThe User's first name.String
OmiddleNameThe User's middle name.String
OlastNameThe User's last name.String
MemailThe User's contact email address.String
MisStaffA boolean value indicating whether the User can access the Django admin site.Boolean
MisActiveA boolean value indicating whether the account is active.Boolean
MdateJoinedThe 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
MuserTypeA text string indicating the type of User.String
OorganizationIdA 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
OownedWorkspaceLimitThe maximum number of workspaces the User may own. 0 prevents ownership and NULL allows unlimited ownership.Positive Small Integer

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
OworkspaceIdA foreign key identifier for the Workspace that owns the ProcessingLevel. If omitted, the ProcessingLevel is shared system-wide.UUID
OcodeAn external or organizational identifier.String (255)
MnameThe label displayed by every frontend.String (255)
MdescriptionFree-text comments from the user.Text
OdefinitionA URL defining or documenting the item.URL (2,000)

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
OworkspaceIdA foreign key identifier for the Workspace that owns the ResultQualifier. If omitted, the ResultQualifier is shared system-wide.UUID
MnameA brief text name identifying the ResultQualifier.String
OdescriptionA longer text description or explanation of the ResultQualifier.Text

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

Method ​

A Method describes how a Datastream's Observations are produced, whether by an instrument, technician, laboratory procedure, simulation, or computation.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Method.UUID
OworkspaceIdA foreign key identifier for the Workspace that owns the Method. If omitted, the Method is shared system-wide.UUID
MnameThe label displayed by every frontend.String (255)
OcodeAn external or organizational identifier.String (255)
MtypeA controlled-vocabulary value identifying the kind of Method.String (255)
MdescriptionFree-text comments from the user.Text
OdefinitionA URL defining or documenting the item.URL (2,000)
OsensorModelThe model name when the Method represents an instrument.String
OsensorModelManufacturerThe model manufacturer when the Method represents an instrument.String
OsensorModelDefinitionA URL pointing to documentation for the sensor model.URL (2,000)

The SensorThings API continues to expose these records as Sensor entities for standards compatibility.

MonitoringSite ​

A MonitoringSite stores a site and its single physical location in one row.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the MonitoringSite.UUID
MworkspaceIdA foreign key identifier for the Workspace that owns the MonitoringSite.UUID
MnameA text name for the MonitoringSite.String
MdescriptionA text description for the MonitoringSite.Text
McodeA shortened code identifying the MonitoringSite.String
MtypeThe type of monitoring site.String
MlatitudeThe site's latitude using WGS84 coordinates.Decimal
MlongitudeThe site's longitude using WGS84 coordinates.Decimal
OelevationMThe site's elevation in meters.Decimal
OelevationDatumThe elevation datum used for the site.String
OadminArea1The first-level administrative area.String
OadminArea2The second-level administrative area.String
OcountryA two-character ISO country code.String
MisPrivateWhether the MonitoringSite is discoverable and its metadata publicly available.Boolean
OdataDisclaimerA disclaimer displayed with the MonitoringSite's data.Text
MtagsCustom key-value metadata for the MonitoringSite, stored as a JSON object of non-empty string keys and values. Defaults to {}.JSON

MonitoringSiteLinkedResource ​

A linked resource associated with a MonitoringSite, pointing to either a hosted file (such as a site photo or document) or an external URL. The database enforces unique (monitoringSiteId, name) pairs, and a check constraint that exactly one of file/url is set.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the MonitoringSiteLinkedResource.UUID
MmonitoringSiteIdA foreign key identifier for the MonitoringSite to which the linked resource belongs.UUID
MnameThe name of the linked resource.String
OdescriptionA text description of the linked resource.Text
OfileThe stored file object, if the resource is hosted by HydroServer.File
OurlThe external URL, if the resource is not hosted by HydroServer.String
MtypeA text string identifying the type of linked resource.String

Unit ​

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

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Unit.UUID
OworkspaceIdA foreign key identifier for the Workspace that owns the Unit. If omitted, the Unit is shared system-wide.UUID
MnameThe label displayed by every frontend.String (255)
MsymbolAn abbreviation or symbol used for the Unit.String
OdefinitionA URL defining or documenting the item.URL (2,000)
MtypeThe type of Unit.String (255)

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
MownerIdA foreign key identifier for the User who owns the Workspace.BigInteger
MisPrivateAn access control flag indicating whether the Workspace is private.Boolean

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

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
MworkspaceIdA one-to-one foreign key identifier for the Workspace being transferred. Each Workspace may have at most one pending transfer.UUID
MnewOwnerIdA foreign key identifier for the new owner.BigInteger

Role ​

A Role is a named collection of permissions that can be assigned to user or service-account collaborators.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Role.UUID
OworkspaceIdA 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

Permission ​

A Permission associates a Role with the actions it may perform on a resource type.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Permission.BigInteger
MroleIdA foreign key identifier for the Role to which the Permission belongs.UUID
MresourceTypeThe resource type to which the Permission applies. One of *, Workspace, Role, ServiceAccount, Collaborator, MonitoringSite, ObservedProperty, ProcessingLevel, ResultQualifier, Method, Unit, Datastream, Observation, DataConnection, EtlTask, RatingCurve, DataProductTask, or MonitoringTask.String
McanViewWhether the Role may view this resource type.Boolean
McanCreateWhether the Role may create this resource type.Boolean
McanEditWhether the Role may edit this resource type.Boolean
McanDeleteWhether the Role may delete this resource type.Boolean

Collaborator ​

A Collaborator associates either a User or a ServiceAccount with a Workspace through a Role.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the Collaborator.BigInteger
MworkspaceIdA foreign key identifier for the Workspace.UUID
OuserIdA foreign key identifier for the collaborating User.BigInteger
OserviceAccountIdA foreign key identifier for the collaborating ServiceAccount.UUID
MroleIdA foreign key identifier for the Role assigned to the Collaborator.UUID

NOTE: Exactly one of userId and serviceAccountId must be set. The database allows each User or ServiceAccount to appear at most once per Workspace.

ServiceAccount ​

A ServiceAccount grants non-interactive access through a generated API key. It belongs to a Workspace and receives permissions through Collaborator records.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the ServiceAccount.UUID
MemailThe generated unique email-like identifier used in collaborator operations.String
MnameA descriptive name for the ServiceAccount.String
OdescriptionA text description of the ServiceAccount.Text
OworkspaceIdThe Workspace where the ServiceAccount was created.UUID
McreatedAtThe datetime when the ServiceAccount was created.Datetime
OlastUsedAtThe datetime when the ServiceAccount last authenticated.Datetime
MisActiveWhether the ServiceAccount may authenticate.Boolean
OdeactivatedAtThe datetime when the ServiceAccount was deactivated.Datetime
MkeyPrefixThe unique public prefix of the generated API key.String
MkeyHashThe stored hash of the API key secret.String
OkeyCreatedAtThe datetime when the current API key was generated.Datetime
OkeyExpiresAtThe datetime when the current API key expires.Datetime

DatastreamLinkedResource ​

A linked resource associated with a Datastream, pointing to either a hosted file or an external URL.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the DatastreamLinkedResource.UUID
MdatastreamIdA foreign key identifier for the Datastream to which the linked resource belongs.UUID
MnameThe name of the linked resource.String
OdescriptionA text description of the linked resource.Text
OfileThe stored file object, if the resource is hosted by HydroServer.File
OurlThe external URL, if the resource is not hosted by HydroServer.String
MtypeA text string identifying the type of linked resource.String

NOTE: The database enforces a unique constraint on (datastreamId, name), and a check constraint that exactly one of file/url is set.

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
OperiodicTaskIdA one-to-one identifier for the associated scheduler record in django_celery_beat. Each Task maps to at most one periodic task record.BigInteger
OnextRunAtThe 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
MtaskIdA 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
MstartedAtThe datetime when the TaskRun started. Automatically populated on creation.Datetime
OfinishedAtThe 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
MworkspaceIdA foreign key identifier for the Workspace that owns the DataConnection.UUID
MsourceUrlThe URL template fetched by the extractor. May contain placeholder variables resolved at run time.Text
OauthHeaderNameThe name of an HTTP header used to authenticate against the source URL (e.g. Authorization).String
OauthHeaderValueThe value sent with the auth header, such as an API token. Stored as plain text.Text
OtimezoneTypeThe kind of timezone interpretation applied to the timestamps: utc, offset, or iana.String
OtimezoneThe timezone value (an IANA name or an offset) used when timezoneType is offset or iana.String

PlaceholderVariable ​

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

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the PlaceholderVariable.UUID
MdataConnectionIdA foreign key identifier for the DataConnection to which the placeholder belongs.UUID
MnameThe placeholder name as it appears in the sourceUrl template.String
MvariableTypeThe type of value substituted at run time: run_time, latest_observation_timestamp, window_start, window_end, or per_task.String
OtimestampFormatAn 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
MdataConnectionIdA one-to-one foreign key identifier for the DataConnection to which the Payload belongs.UUID
MpayloadTypeThe payload encoding: CSV or JSON.String
OheaderRowFor CSV payloads, the row index containing column headers.Integer
OdataStartRowFor 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
MtimestampKeyThe field name or column key that identifies the timestamp in the source payload.String
OtimestampFormatAn optional format string used to parse non-ISO timestamps from the source payload.String
OdataIngestionWindowStartAnchorThe reference point for the start of the data ingestion window: latest_observation_timestamp, run_time, or fixed_timestamp. If omitted, the window has no start.String
OdataIngestionWindowStartLookbackAn amount of time subtracted from the start anchor. Not used with fixed_timestamp.Integer
OdataIngestionWindowStartLookbackUnitThe unit for dataIngestionWindowStartLookback: minutes, hours, or days.String
OdataIngestionWindowStartTimestampThe window start datetime, required when the start anchor is fixed_timestamp.Datetime
OdataIngestionWindowEndAnchorThe reference point for the end of the data ingestion window, with the same choices as the start anchor. If omitted, the window has no end.String
OdataIngestionWindowEndLookbackAn amount of time subtracted from the end anchor. Not used with fixed_timestamp.Integer
OdataIngestionWindowEndLookbackUnitThe unit for dataIngestionWindowEndLookback: minutes, hours, or days.String
OdataIngestionWindowEndTimestampThe window end datetime, required when the end anchor is fixed_timestamp.Datetime

DataConnectionNotification ​

A DataConnectionNotification records the configuration for the periodic task run summary email associated with a DataConnection.

RequiredAttributeDefinitionData Type
MdataConnectionIdThe primary key for the DataConnectionNotification — a one-to-one foreign key to DataConnection. Each DataConnection has at most one notification row.UUID
OperiodicTaskIdA 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
MnotificationIdA 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 (notificationId, 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
MdataConnectionIdA foreign key identifier for the DataConnection used by the EtlTask.UUID
MtaskVariablesA 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
MetlTaskIdA foreign key identifier for the EtlTask to which the mapping belongs.UUID
MsourceIdentifierA text identifier representing an incoming source field or column.String
MtargetDatastreamIdA 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, derivations, and time-series aggregations.

DataProductTask ​

A DataProductTask extends Task with the data-product context — the MonitoringSite 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
MmonitoringSiteIdA foreign key identifier for the MonitoringSite 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
MtaskIdA foreign key identifier for the DataProductTask to which the transformation belongs.UUID
MoutputDatastreamIdA one-to-one foreign key identifier for the Datastream that receives the transformation output.UUID
MtransformationTypeThe type of transformation: rating_curve, derivation, or aggregation.String
OratingCurveIdA foreign key identifier for the RatingCurve used when transformationType is rating_curve.UUID
OformulaA formula (expression) string used when transformationType is derivation, referencing one or more input variable names.Text
OstopOnGapsFor derivation transformations, whether a run stops at timestamps not shared by all inputs (vs. skipping them). Inputs holding their no-data value always produce the output's no-data value.Boolean
OstopOnErrorFor derivation transformations, whether a run stops when the formula produces a non-finite result (vs. filling and continuing).Boolean
OoutputIntervalUnitsThe interval unit for aggregation outputs: minutes, hours, days, weeks, or months.String
OoutputIntervalThe positive interval count corresponding to outputIntervalUnits.Integer
OtimezoneTypeFor interval-aligned aggregations, the timezone interpretation: utc, offset, or iana.String
OtimezoneThe timezone value (an IANA name or an offset) used when timezoneType is offset or iana.String
OaggregationMethodFor aggregation transformations, the aggregation function: mean, sum, min, max, first, last, or time_weighted_mean.String
OminValuesFor 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
MtransformationIdA foreign key identifier for the DataProductTransformation that consumes the input.UUID
MdatastreamIdA foreign key identifier for the input Datastream.UUID
OvariableNameThe variable name used in the transformation formula to reference this input.String

NOTE: The database enforces a unique constraint on (transformationId, variableName) when variableName 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
MmonitoringSiteIdA foreign key identifier for the MonitoringSite to which the RatingCurve belongs.UUID
MnameA descriptive name for the RatingCurve.String
OdescriptionA text description for the RatingCurve.Text
MfittingMethodThe 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
MratingCurveIdA foreign key identifier for the RatingCurve to which the point belongs.UUID
MinputValueThe input value of the point (e.g. stage).Float
MoutputValueThe 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 MonitoringSite 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
MmonitoringSiteIdA foreign key identifier for the MonitoringSite 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
MtaskIdA foreign key identifier for the MonitoringTask to which the rule belongs.UUID
MdatastreamIdA foreign key identifier for the Datastream evaluated by the rule.UUID
MruleTypeThe type of rule: range, rate_of_change, persistence, or missing_data.String
OlastCheckedAtThe datetime when the rule was last evaluated.Datetime
OminValueFor range rules, the lower bound of the allowed range.Float
OmaxValueFor range rules, the upper bound of the allowed range.Float
OwindowIntervalFor window-based rules, the positive number of windowIntervalUnits evaluated by the rule.Integer
OwindowIntervalUnitsFor window-based rules, the unit of the evaluation window: minutes, hours, or days.String

NOTE: The database enforces a unique constraint on (taskId, datastreamId, ruleType).

MonitoringNotificationRecipient ​

A notification email recipient associated with a MonitoringTask.

RequiredAttributeDefinitionData Type
MidA primary key unique identifier for the MonitoringNotificationRecipient.UUID
MtaskIdA 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 (taskId, email).

Reference Data ​

Controlled Vocabulary Tables ​

HydroServer also stores the controlled vocabulary terms used by the main entities in the following tables. UserType and OrganizationType are simple lookup tables. The rest are resources managed through the Data Management API, each with its own collection (for example, monitoring-site-types), and administrators can also manage them in the administrator dashboard.

TableAttributesData Type
UserTypeid, name, publicBigInteger, String, Boolean
OrganizationTypeid, name, publicBigInteger, String, Boolean
MonitoringSiteTypeid, name, descriptionUUID, String, Text
LinkedResourceTypeid, name, descriptionUUID, String, Text
ObservedPropertyTypeid, name, descriptionUUID, String, Text
MethodTypeid, name, descriptionUUID, String, Text
UnitTypeid, name, descriptionUUID, String, Text
AggregationStatisticid, name, descriptionUUID, String, Text
DatastreamStatusid, name, descriptionUUID, String, Text
SampledMediumid, name, descriptionUUID, String, Text

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 MonitoringSite 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
MencodingTypeA 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
MthingIdA foreign key identifier for the SensorThings Thing for which the HistoricalLocation is specified.UUID
MtimeThe time when the Thing is known to be at the Location.Datetime
MlocationIdA foreign key identifier for the Location.UUID