Import data from bridge
Writer data from the external database into the Machbase DBMS.
📌
For smooth practice, the following query should be run to prepare tables and data.
CREATE TAG TABLE IF NOT EXISTS EXAMPLE (
NAME VARCHAR(20) PRIMARY KEY,
TIME DATETIME BASETIME,
VALUE DOUBLE SUMMARIZED
);
Prepare
bridge add -t sqlite mem file::memory:?cache=shared;
bridge exec mem create table if not exists mem_example(name varchar(20), time datetime, value double);
bridge exec mem insert into mem_example values('tag0', '2021-08-12', 10);
bridge exec mem insert into mem_example values('tag0', '2021-08-13', 11);
Import data from Bridge
Copy the code below into TQL editor and run
SQL(bridge('mem'), "select * from mem_example")
APPEND(table('example'))
Select data
machbase-neo shell "select * from example";
ROWNUM NAME TIME(LOCAL) VALUE
──────────────────────────────────────────
1 tag0 2021-08-12 09:00:00 10
2 tag0 2021-08-13 09:00:00 11
2 rows fetched.
Last updated on