Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.33 KB

File metadata and controls

44 lines (32 loc) · 1.33 KB

Load financial data

This tutorial uses real-time cryptocurrency data, also known as tick data, from Twelve Data.

Ingest the dataset

To ingest data into the tables that you created, you need to download the dataset and copy the data to your database.

Ingesting the dataset

  1. Download the crypto_sample.zip file. The file contains two .csv files; one with company information, and one with real-time stock trades for the past month. Download: crypto_sample.zip

  2. In a new terminal window, run this command to unzip the .csv files:

    unzip crypto_sample.zip
  3. At the psql prompt, use the COPY command to transfer data into your TimescaleDB instance. If the .csv files 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 COPY process could take a few minutes depending on your internet connection and local client resources.