Comments (2)
What about:
INSERT INTO
tb_name
[TAGS (tag1_value, ...)]
[(field1_name, ...)]
VALUES (field1_value, ...) [(field1_value2, ...) ...]
- Insert one record with function now(), the timestamp is always in the first position.
INSERT INTO d1001 tags("sh", "1.1.1.1") VALUES (now(), 10.2, 219, 0.32);
- Insert multiple records with time, I think adding comma is better.
INSERT INTO d1001 VALUES
('2021-07-13 14:06:32.272', 10.2, 219, 0.32),
(1626164208000, 10.15, 217, 0.33),
(now()-1s, 1, 2, 3);
- Specify column names when inserting data.
-- ts or timestamp ?
INSERT INTO d1001 (ts, current, phase) VALUES (now(), 10.27, 0.31);
- Allow table creation during insertion ?
ref tdengine
from lindb.
I think it is difficult to define the type of fields in insert statement. So not allow table creation during insertion.
Steps:
- create table(#1010 )
create table if not exist cpu
(
host tag,
ip tag,
load last,
temperature max
);
- insert data
-- single
INSERT INTO cpu (timestamp, host, ip, load) VALUES (now(), "sh","1.1.1.1",4);
-- batch
INSERT INTO cpu (timestamp, host, ip, load)
VALUES
(now(), "sh","1.1.1.1",4),
(now(), "sh","1.1.1.2",5),
(now(), "sh","1.1.1.3",4),
;
also depend(#1015 )
from lindb.
Related Issues (20)
- [bug]: darwin package no cpu stats data
- [bug]: lost web console when build package via github action
- [feature]: support select *(query all fields)
- [question]: Is this a product exchange group? HOT 3
- [bug]:When the query result is empty, the client will report a null pointer exception. HOT 3
- [feature]: build index on LinDB common kv store
- [bug]: data not found with not in filter(if tag value not exist) HOT 2
- [enhance]: create database by with statement HOT 3
- [feature]: support opentelemetry exemplar
- [feature]: support prometheus query language HOT 3
- [bug]: read index data panic
- [enhance]: reduce goroutine when write too many data families HOT 2
- [feature]: create table HOT 2
- [bug]:the 'show metrics' statement returns incorrect results when there are a large number of metrics HOT 1
- [enhance]: new sql parser
- [bug]: Unexplained restart in standalone mode HOT 18
- [question]: Proper backup and restore mechanism HOT 2
- [bug]: Node goes dead HOT 9
- [enhance]: monthly partitioning of indices
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lindb.