Skip to main content

OPC UA Point mapping CSV

info

An OPC UA Point CSV is collection configuration. Each row specifies a NodeId, target table, and columns; uploading it does not import business data. Enter the complete NodeId in point_id. Browse names and paths only locate nodes. Check for conflicts using expanded table names before enabling Points in bulk.

Entry point: taosExplorer → Data Ingestion → OPC UA → Point Set → Download Data Points or Upload CSV Configuration File.

point_id is the protocol NodeId. BrowseName, DisplayName, and browse paths only locate nodes and cannot replace the NodeId.

1. Download, review, and upload​

  1. Configure the connection and pass the connectivity check. First narrow browsing to nodes approved for testing.
  2. View the Point list, download the existing Point template, and retain UTF-8 encoding and an original backup. UTF-8 with or without a BOM is supported.
  3. Check each row's Point identifier, enable state, target database tables, type, time columns, and tags. Initially retain only one controllable Point and verify it in a new test database.
  4. Upload the file. Correct duplicate columns, duplicate Points, column counts, or types according to the returned validation errors. Do not expand the collection scope directly after validation fails.
  5. After starting the task, check the actual table structure and source values at the same time. A successful upload does not mean every Point can be read or that target writes succeed.
warning

enabled=0 is not a safe temporary pause: the corresponding child table may be deleted when the model is applied, affecting historical data as well. To pause the entire task, use the task stop operation. Before disabling Points, synchronizing deletions, or replacing a model, assess existing target tables and backups. Do not try this directly on a production Point list.

2. Columns and values​

ColumnRequirement and meaningConfiguration notes
point_idRequired, unique within a task; for example ns=2;s=Demo/TemperatureNumeric, string, GUID, and opaque identifiers use i=, s=, g=, and b= respectively. Copy the actual NodeId in full.
stableRequired, target supertableopc_{type} separates tables by value type. An object-node template can generate opc_object; objects are not read as ordinary numeric Points.
tbnameRequired, target child tableCan use t_{ns}_{id#/_}. Check name conflicts after replacement, not merely whether source Point names differ.
enabledOptional, 1 enables and 0 disables; omitted or empty values mean enabledDisabling risks table deletion; see the warning above.
value_colRetain this header to store collected values; an empty cell uses the column name valOmitting the entire header does not configure a value column automatically. Column names and types for the same target structure must be consistent.
value_transformOptional value expression before writingFor example, with value column val, use val * 1.8 + 32 for temperature conversion. Check types and values before and after conversion first.
typeOptional value-column type override; an empty value retains the source typeAffects expansion of {type}. A type override does not mean arbitrary data can be converted without loss.
quality_colOptional target column for quality codesWithout this header, no quality column is added. With the header but an empty row value, quality is used. An empty value does not mean Do not save.
ts_colTarget column name for the source timestampFor example ts; corresponds to original_ts, not origin_ts.
request_ts_colTarget column name for the request timestampFor example qts; do not confuse it with source time.
received_ts_colTarget column name for the receive timestampFor example rts; reflects receive time, not device generation time.
ts_transform, request_ts_transform, received_ts_transformOptional transformations of their respective time columnsReference input with the corresponding target column name. Specify units and precision clearly; do not blindly add or subtract offsets for an eight-hour display difference.
tag::TYPE::nameOptional; repeat with different tagsFor example tag::VARCHAR(1024)::Path. Tag names must be unique, and values must fit the type and length.
Other columns such as No.Manual helper columnsNot used as target data columns; do not rely on them to determine the primary key or order.

Use the exact header spelling above. Do not change case arbitrarily or substitute synonyms. For example, enable is not enabled, and Point_ID is not point_id. Missing required headers cause failure, while misspelled optional headers may be treated only as helper columns. An upload without an error does not prove a setting took effect. After each template change, check every header again, then inspect actual structures and values.

Explicitly retain at least one nonempty time column. If none of the three time headers exists, the source-time column ts is used as a fallback. Do not expect the same fallback when a time header exists but the row value is empty. With multiple time headers, the leftmost determines the primary key, and every row must explicitly name that column. Do not unintentionally change the primary-key source by reordering headers.

Before configuring target time columns, also confirm whether the Server supplies source timestamps. For fallback when UA source timestamps are missing, and differences in request and receive times between polling and subscriptions, see Interpreting ordinary Point-value times. To verify source event time or freshness, first confirm that the source actually supplies timestamps, then compare target columns.

Exported templates typically include the tag columns tag::VARCHAR(1024)::name, BrowseName, DisplayName, Description, and Path. These are browse information saved at download time, not another set of subscription addresses. Retain them to query by readable names or paths. Add custom plant or production-line tags separately, without duplicating existing tag or Property names.

2.1 Meaning of browse tags​

TagValue in the downloaded Point listOperations check
nameGenerated from node identifier content, replacing / with . and trimming replacement characters at both endsNot necessarily equal to BrowseName or DisplayName, and cannot replace the complete NodeId.
BrowseNameNode name in browse resultsCheck actual downloaded values; do not infer the source identifier from the display name.
DisplayNameDisplay name in browse resultsFor human identification, but different nodes may share a name.
DescriptionDescription in browse results; may be empty if not supplied by the sourceAn empty description does not mean the node cannot be read.
PathPath saved from browse resultsDetermine path prefixes from actual downloaded values. Do not assume all Servers use the same root and separator format.

For example, if the downloaded Point list retains the Path tag and actual paths begin with Objects.Demo., query in the taosExplorer Data Browser or taos CLI:

SELECT TBNAME, Path FROM opcua_demo.opc_double
WHERE Path LIKE 'Objects.Demo.%' LIMIT 10;

This filters ingested data by actual tags; it does not change collection scope. If no rows are returned, first check the actual supertable, tag name, and path values rather than expanding source collection. Omitting all tag headers differs from retaining these five columns: ordinary Point models usually add two default tags, point_id and point_name, but do not guarantee automatic reuse of an arbitrary existing supertable's tag structure. Configure business tags explicitly and check the target structure.

2.2 Value type names​

When reviewing a Point list, use the following names or aliases for type. These names configure the value-column type. A valid name does not mean any OPC value can be converted successfully. Empty values retain the source type. Before overriding a type, compare values, range, precision, and target structure before and after conversion using an approved test Point.

TypeNames and aliases
BooleanBOOL, boolean, b
Signed integerTINYINT / i8, SMALLINT / i16, INT / i32, BIGINT / i64
Unsigned integerTINYINT UNSIGNED / u8, SMALLINT UNSIGNED / u16, INT UNSIGNED / u32, BIGINT UNSIGNED / u64
Floating pointFLOAT / f32, DOUBLE / f64
String and binaryVARCHAR(n) / BINARY(n), NCHAR(n), VARBINARY(n); explicitly specify a length meeting business and target constraints
Time valueTIMESTAMP, TIMESTAMP(ms), TIMESTAMP(us), TIMESTAMP(ns)
Special type namesType-name parsing recognizes JSON, DECIMAL(p,s), BLOB, and NULL / none, but this does not establish them as recommended usable types for ordinary OPC value columns or tags. First confirm support constraints for this direction and target.

Type-name parsing is case-insensitive, but {type} table-name expansion does not guarantee normalization of aliases to the same name. For example, explicit f64 and double may generate different supertable names. Use a consistent spelling and check actual target tables. Setting the value column to TIMESTAMP(us) does not automatically change the time primary key or database precision. type and time-column settings such as ts_col are different settings.

3. A verifiable single-Point example​

This example assumes the administrator provides NodeId ns=2;s=Demo/Temperature. Replace it with a site Point for actual use. The target supertable expands using type DOUBLE. The complete file is:

point_id,enabled,stable,tbname,value_col,quality_col,ts_col,received_ts_col,tag::VARCHAR(64)::site
ns=2;s=Demo/Temperature,1,opc_{type},t_{ns}_{id#/_},val,quality,ts,rts,lab

Query the target test database in the taosExplorer Data Browser or taos CLI. The example database is opcua_demo:

DESCRIBE opcua_demo.`t_2_Demo_Temperature`;
SELECT ts, rts, val, quality, site
FROM opcua_demo.`t_2_Demo_Temperature`
ORDER BY ts DESC LIMIT 10;

Expect source time ts, receive time rts, value val, quality code quality, and tag site, with site equal to lab. Compare ts with Server source time and rts with receive time. Interpret quality codes according to the Server specification; do not assume nonzero means good. Ask the administrator to change an approved test Point and verify the new value, rather than checking only old records.

4. Manually add a few Points​

This procedure appends a mapping to an existing OPC UA or OPC DA task using a CSV Point list. It does not modify rule filters or subscribe to events. OPC DA uses tag_name for the source identifier. For other DA-specific requirements, see OPC DA Point mapping CSV.

  1. Find the original task in the task list. Record its name, target database, actual collection host, and agent, then click Edit. First download CSV File in Use and retain the original. Confirm that the new Point is not already in the list.
  2. Check Point Update Mode. Use Append to load additions into the running task, and confirm Point Update Interval. Use Update only when deletion synchronization is explicitly needed. None performs no periodic Point-list updates. Do not expect a running task to collect a new Point immediately just because appending succeeded. Schedule a maintenance window for the first mode change. Save and check task state using Daily operations, then append Points.
  3. On Upload CSV Configuration File, click Add Data Points. Enter the complete point_id (tag_name for DA), enabled=1, supertable and child-table mappings, then values, quality, time, and tags individually. Dialog columns come from the original CSV headers and may differ from the image below. If a column is absent, first review the Point list using this page's rules. Do not enter optional column names into other fields.
  4. Click OK. Correct duplicate Point identifiers or model validation failures as prompted. Do not bypass duplicate source Point checks by changing the target table name. For agent tasks, also confirm that the agent is online and the Point list has reached the actual collection host.
  5. Click View Point List, check the new Point and mapping, then wait for Point-list updates and subsequent collection and writes. The update interval is only a check cycle, not a guarantee of when a new Point reaches the database.
  6. Query the target table by the added mapping in the taosExplorer Data Browser or taos CLI. Check the value, quality, and tags for the same source time, and spot-check that existing Points still update. Successful appending or a new row in the Point list does not replace this verification.

Example OPC UA mapping form for manually adding Points

ns=3;i=1003 and the tag values in the image only show input locations. Do not use them directly in the Demo/Temperature exercise above. No. is only an auxiliary number; enabled is the enable field. Time and tag columns follow the task's existing Point list. Adding a Point does not recover all changes before it joined collection. This procedure does not promise lossless data under every failure.

If the new Point appears in the list but no target value arrives, first check update mode, wait cycle, source read permissions, and the actual expanded target table. Then inspect Point-list update, agent transfer, and target write logs. Do not append the same Point repeatedly, clear caches, or delete the original task.

5. Name templates and tags​

TemplateAvailable fieldsPurpose and example
{type}stableopc_{type} expands by value type. See above for table-name differences with explicit type aliases.
{ns}UA tbname, identifier-generated tag valuesns=2;s=Demo/Temperature yields 2.
{id}UA tbname, identifier-generated tag valuesTakes the content after the identifier prefix, yielding Demo/Temperature.
{id#/_}, {id#-_}UA tbname, identifier-generated tag valuesReplace / or - with _ and trim replacement characters at both ends. For example, Demo/Temperature yields Demo_Temperature.
{BrowseName}, {DisplayName}, {Description}, {Path}Custom tags in rule-based tasksBrowse attributes, such as VARCHAR(1024)::Path::{Path}. Check actual downloaded content for CSV tag values.
{Path#/_}, {DisplayName#_.}Custom tags in rule-based tasksReplace characters in browse attributes: / → _ and _ → ., respectively. Not child-table templates.
{id/}, {id.}, {id_}Identifier-generated tag values, not tbnameRemove the final segment for the corresponding separator. For Device/Type/Tag, {id/} yields Device/Type.
{id..}, {..id.}Identifier-generated tag values, not tbnameFor A.B.C.D, yield A.B and C, respectively.
{id#/.}, {id#-.}Identifier-generated tag values, not tbnameReplace / or - with ., and trim replacement characters at both ends.
{id/#/.}, {id_#_.}Identifier-generated tag values, not tbnameFirst remove the last / or _ segment, then replace remaining separators with .. For example, Device/Type/Tag yields Device.Type.

Rule-based tasks use 数据类型::标签名::模式 for custom tags, separating entries with semicolons, for example VARCHAR(1024)::name::{id#/.};VARCHAR(1024)::Path::{Path}.Value;INT::version::1. CSV uses the header tag::TYPE::name with per-row tag values. Do not mix these two input formats.

warning

Table-name transformations do not guarantee that distinct NodeIds remain unique. For example, / and _ may collide after normalization. Before enabling in bulk, check expanded supertable, child-table, and value-column combinations, not merely duplicate point_id values. Points sharing a target child table need different value columns compatible with the existing structure. Verify wide-table updates separately first.

6. Write two Points to the same child table​

Assume the source administrator provides two actual readable Double Points, ns=2;s=Demo/Temperature and ns=2;s=Demo/Pressure, representing temperature and pressure for the same device. Upload this Point list only to a separate test database. Do not reuse the targets device_readings and device_01 for existing business tables. Replace names and NodeIds with site values.

point_id,enabled,stable,tbname,value_col,type,quality_col,ts_col,tag::VARCHAR(64)::site
ns=2;s=Demo/Temperature,1,device_readings,device_01,temperature,DOUBLE,temperature_quality,ts,lab
ns=2;s=Demo/Pressure,1,device_readings,device_01,pressure,DOUBLE,pressure_quality,ts,lab

Both rows use the same child table, time primary key, and tags, but different value and quality columns. After startup, run the following in the taosExplorer Data Browser or taos CLI:

DESCRIBE opcua_demo.device_01;
SELECT ts, temperature, temperature_quality, pressure, pressure_quality, site
FROM opcua_demo.device_01 ORDER BY ts DESC LIMIT 10;

First check that the structure contains both value/quality column pairs. Then ask the administrator to change the approved test Points separately and check their corresponding columns against each source time. The Points may have different source times. A row containing only one value pair does not mean the other Point was lost. This configuration does not automatically align values from different times into a complete device snapshot. Do not require a new pressure reading for every temperature change, or force different Points into one column by assigning them the same value_col.

7. Commas and double quotes​

Node ns=2;s=Site,Plant,Tag-01 contains CSV separators. Enclose the whole field in double quotes, and double any double quotes inside a field. For example:

point_id,enabled,stable,tbname,value_col,ts_col
"ns=2;s=Site,Plant,Tag-01",1,opc_{type},site_tag01,val,ts
"ns=2;s=Tag""A""",1,opc_{type},tag_a,val,ts

The separator is fixed as a comma. Do not URL-encode NodeIds first, escape commas with backslashes, or treat an entire row as one quoted field. CSV quotes are not part of the NodeId. Before uploading, confirm consistent column counts, no duplicate headers, accurate Point identifiers, nonempty leftmost time columns, and sufficient tag lengths. Use this page for CSV configuration errors. For unreadable sources or secure connection failures, return to OPC UA.