The content of this article is deprecated, and will be removed in the future
processValueTable
processValueTable contains process values.
less than a minute
Usage
This table stores process values, for example toner level of a printer, flow rate of a pump, etc. This table, has a closely related table for storing string values, processValueStringTable.
Structure
key | data type | description | example |
---|---|---|---|
timestamp | timestamptz | Entry timestamp | 0 |
asset_id | serial | Asset id (see assetTable) | 1 |
valueName | text | Name of the process value | toner-level |
value | double | Value of the process value | 100 |
Relations
DDL
CREATE TABLE IF NOT EXISTS processValueTable
(
timestamp TIMESTAMPTZ NOT NULL,
asset_id SERIAL REFERENCES assetTable (id),
valueName TEXT NOT NULL,
value DOUBLE PRECISION NULL,
UNIQUE(timestamp, asset_id, valueName)
);
-- creating hypertable
SELECT create_hypertable('processValueTable', 'timestamp');
-- creating an index to increase performance
CREATE INDEX ON processValueTable (asset_id, timestamp DESC);
-- creating an index to increase performance
CREATE INDEX ON processValueTable (valuename);
Last modified November 12, 2024: Merge pull request #308 from united-manufacturing-hub/fix/xxx/correct-opc-ua-simulator-get-started (56093f1)