Help Center > > User Guide> MRS Cluster Component Operation Guide> Using Spark> Interconnecting Spark with OpenTSDB> Inserting Data to the OpenTSDB Table

Inserting Data to the OpenTSDB Table

Updated at: Sep 12, 2019 GMT+08:00

Function

Run the INSERT INTO statement to insert the data in the table to the associated OpenTSDB metric.

Syntax

INSERT INTO TABLE_NAME SELECT * FROM SRC_TABLE;
INSERT INTO TABLE_NAME VALUES(XXX);

Keyword

Parameter

Description

TABLE_NAME

Name of the associated OpenTSDB table.

SRC_TABLE

Name of the table from which data is obtained. This parameter can be set to a name of a common table.

Precautions

  • The inserted data cannot be null. If the inserted data is the same as the original data or only the value is different, the inserted data overwrites the original data.
  • INSERT OVERWRITE is not supported.
  • You are advised not to concurrently insert data into a table. If you concurrently insert data into a table, there is a possibility that conflicts occur, leading to failed data insertion.
  • The TIMESTAMP format supports only yyyy-MM-dd hh:mm:ss.

Example

Insert data into table opentsdb_table.

insert into opentsdb_table values('shenzhen','futian','2018-05-03 00:00:00',21);

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel