Input tag data
Load all at once through a CSV file
Machbase allows you to load large amounts of CSV files through a csvimport tool.
More details can be found through practical examples, and are described in brief below.
CSV Format (data.csv)
TAG_0001, 2009-01-28 07:03:34 0:000:000, -41.98 TAG_0001, 2009-01-28 07:03:34 1:000:000, -46.50 TAG_0001, 2009-01-28 07:03:34 2:000:000, -36.16 ....
Prepare a csv file consisting of <tag name, time, value> as above.
Of course, the tag name TAG_0001 must be present in the tag meta.
Using the loading program csvimport
csvimport -t TAG -d data.csv -F "time YYYY-MM-DD HH24:MI:SS mmm:uuu:nnn" -l error.log
This loads data.csv into a table called TAG.
The -F option specifies the time format stored in the data.csv file.
In addition, -l error.log records the error that occurred when inputting as a separate file.
Input via the RESTful API
For more detailed usage of the RESTful API, please refer to the following examples.
Syntax of Input API
Machbase provides the RESTful API as follows:
{"values":[ [TAG_NAME, TAG_TIME, VALUE], # Specify Tagname,Time,Value. if you define additional columns, the columns and values are follows. [ .... ].... ], "date_format":"Date Format" # If you moit date_format, 'YYYY-MM-DD HH24:MI:SS mmm:uuu:nnn' is used as default. }
It is requested the number of columns in the defined TAG schema to match the above structure.
Input data via the SDK
Machbase provides standard development tools for a variety of languages, including:
Through these libraries, users can create various application programs according to their environment and input data to Machbase.