This tutorial uses real-time cryptocurrency data, also known as tick data, from Twelve Data.
To ingest data into the tables that you created, you need to download the dataset and copy the data to your database.
-
Download the
crypto_sample.zipfile. The file contains two.csvfiles; one with company information, and one with real-time stock trades for the past month. Download: crypto_sample.zip -
In a new terminal window, run this command to unzip the
.csvfiles:unzip crypto_sample.zip
-
At the
psqlprompt, use theCOPYcommand to transfer data into your TimescaleDB instance. If the.csvfiles aren't in your current directory, specify the file paths in these commands:\COPY crypto_ticks FROM 'tutorial_sample_tick.csv' CSV HEADER;
\COPY crypto_assets FROM 'tutorial_sample_assets.csv' CSV HEADER;
Because there are millions of rows of data, the
COPYprocess could take a few minutes depending on your internet connection and local client resources.