The dataset contains around 1.5 million Bitcoin transactions, the trades for five days. It includes information about each transaction, along with the value in satoshi. It also states if a trade is a coinbase transaction, and the reward a coin miner receives for mining the coin.
To ingest data into the tables that you created, you need to download the dataset and copy the data to your database.
-
Download the
[bitcoin_sample.zip](https://assets.timescale.com/docs/downloads/bitcoin-blockchain/bitcoin_sample.zip)bitcoin_sample.zipfile. The file contains a.csvfile that contains Bitcoin transactions for the past five days. Download: -
In a new terminal window, run this command to unzip the
.csvfiles:unzip bitcoin_sample.zip
-
In Terminal, navigate to the folder where you unzipped the Bitcoin transactions, then connect to your $SERVICE_SHORT using psql.
-
At the
psqlprompt, use theCOPYcommand to transfer data into your $SERVICE_LONG. If the.csvfiles aren't in your current directory, specify the file paths in these commands:\COPY transactions FROM 'tutorial_bitcoin_sample.csv' CSV HEADER;
Because there is over a million rows of data, the
COPYprocess could take a few minutes depending on your internet connection and local client resources.