3

I am trying to move data from InfluxDB to QuestDB,

I was able to export my tables as JSON by following: https://stackoverflow.com/a/27913640/1267728

How do I now import these JSON files into QuestDB?

3 Answers 3

2

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
Sign up to request clarification or add additional context in comments.

Comments

0

Just adding here that QuestDB recently improved the performance of CSV ingestion. More info at https://questdb.io/docs/guides/importing-data/

Comments

0

If you want to avoid converting from JSON (and probably more performant as well than exporting to JSON for large tables), you can use the influxd inspect export-lp command that exports all your data as ILP points. You can choose to export a single bucket.

Once you have the ILP files, you can import as explained at this other StackOverflow post What's the best way to upload an ILP file into QuestDB?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.