Top  | Previous | Next

Importing/Exporting using CSV

 

It is possible to export and import SQLTags to/from a CSV file format using the toolbar on the SQLTags browser window. Simply click the Export button sqlt_csv_export to export, or Import sqlt_csv_import to load a previously exported file.

 

CSV Format

The SQLTags CSV format consists of a fixed set of column headers. Generally the columns are self explanatory, in that they correspond to standard tag properties, and contain simple values. However, several columns have specially formatted values.

 

Alert States

Alert states are written as a semi-colon separated list of properties, with multiple states separated by a dollar sign ($). The properties, in order, are: "name, severity, low limit, high limit, flags, low tag path, high tag path, time deadband, time deadband units".

Flags - Bit mask defining properties of the state

1 - Low Exclusive
2 - Low Infinite
4 - High Exclusive
8 - High Infinite
16 - Any change
32 - Low setpoint is tag driven
64 - High setpoint is tag driven

Time deadband units - "MS, SEC, MIN, HOUR, DAY"

 

Custom Permissions

If using custom permissions for the tag, the set of role/permission mappings are written in the format "role;{RO|RW}$". For example, two read only roles and one read/write role would be written like: "Operators;RO$Vendors;RO$Admins;RW$"

 

Complex Types

Complex types are supported by the CSV format, and are generally straight forward. There are only a few special considerations for data types:

1.The path column is relative to the root of the data type.
2.Parameters are listed as separate entities, with a tag type of 11, no path, and the Owner set to the defining type.
3.Overrides are stored as separate lines, with the path set to the relative path under the data type, and the owner set to the instance to which the override belongs. All columns that are not empty are considered overridden properties.
4.The order of the tags in the CSV is important- types should be defined before sub types and instances that use them. Instances should be defined before the overrides that they contain.