How to import InfluxDB tables into QuestDB?

Viewed 360
2 Answers

Convert from JSON to CSV

QuestDB supports importing data via CSV file, so first you would need to flatten the JSON and ensure that column names are modified to reflect nested properties.

There is a Java library called Json2Flat that already does this.

Import the CSV file

Using the REST API, you can import the data into QuestDB

curl -F data=file.csv http://localhost:9000/imp

For more details of how to use the REST API, please go to the official documentation.

Check the data

To verify that the import is successful, you can check via the Web Console or via CURL…

curl -G --data-urlencode "query=select * from 'file.csv'" http://localhost:9000/exp
Related