select-rawdata.tql
Description
This API extracts data from a specified table and sensor in a given time range in CSV format. It is designed to extract data stored in Machbase Neo's tag table through various parameters into a CSV structure without using complex SQL, and can be directly utilized as a frame in languages such as Python.
It is merged into the data_load.
API module path
http://HOST:PORT/db/tql/datahub/api/v2/tql/select-rawdata.tql
Parameters
URL
- Specifies the URL address where the Mahabase Neo DB is installed.
- Example
- URL = 'http://127.0.0.1:5654' (Local)
Table
- Specifies the name of the table that contains the data. Only a single table can be specified.
- Example
- table=home (O)
- table=home.rotor (X)
name
- Specify the Tag Name to load.
- Set the required Tag Names after the EDA process.
start
- Specifies the start (end) time of the extract data.
- Note that you are extracting data up to this time, not beyond.
- Data after the year and month can be omitted.
- Any deviation from the given Machbase standard format will result in an error.
- Standard format: 'Year-Month-Day-Hour-Minute-Seconds-Milliseconds-Micro-Micro-Nano'
- Example
- start='2024-10-31 12:33:33'
- start='2024-10-31 12:33:33 111:222:333'
- start='2024-10-31' (single quotation available)
- start =1451624400000000000 (Can be specified with nano precision in epoch)
- TO_DATE('2016-01-01 14:00:00.000000000', 'YYYY-MM-DD HH24:MI:SS.mmmuuunnn') (TO_DATE syntax allows arbitrary time formatting)
- start=2024/11/22 (X : Date separators must be marked with -. )
- start='2024/11/22' (X)
end
- Specifies the end time for the extracted data. Note that you want to extract data up to and including this time, not less.
- Other usage is the same as start.
Timeformat
- specifies the time format.
- The time format follows the KST (Korean Standard Time) notation.
- Option
- 'default'
- Use the system's default time format.
- '2006-01-02 15:04:05.000000'
- The time format of the system's default time format that includes nanoseconds.
- 'default'
- Example
- Timeformat = 'default'
- Timeformat = quote('2006-01-02 15:04:05.000000')
Example Sample Code (Python)
Results

Check the entire module code.
datahub/api/v2/tql/select-rawdata.tql at main · machbase/datahub
All Industrial IoT DataHub with data visualization and AI source - machbase/datahub