Import Data
Download the previous example dataset.
Ingest the data
Section titled “Ingest the data”Currently, the brahmand-client
and HTTP interface do not support data import. You must use the ClickHouse client to load data directly into your ClickHouse tables. Native import functionality is planned for a future release.
Considering you are running brahmand with the docker compose configuration, use following commands to import the data.
First, copy your downloaded CSVs into the same folder as your docker-compose.yml. Then, from that folder, run:
Node User
Section titled “Node User”docker compose exec -T clickhouse-service \ clickhouse-client --database=brahmand \ --query="INSERT INTO User FORMAT CSVWithNames" < node_users.csv
Node Post
Section titled “Node Post”docker compose exec -T clickhouse-service \ clickhouse-client --database=brahmand \ --query="INSERT INTO Post FORMAT CSVWithNames" < node_posts.csv
Relationship FOLLOWS
Section titled “Relationship FOLLOWS”docker compose exec -T clickhouse-service \ clickhouse-client --database=brahmand \ --query="INSERT INTO FOLLOWS FORMAT CSVWithNames" < rel_follows.csv
Relationship POSTS
Section titled “Relationship POSTS”docker compose exec -T clickhouse-service \ clickhouse-client --database=brahmand \ --query="INSERT INTO POSTS FORMAT CSVWithNames" < rel_posts.csv
Relationship LIKES
Section titled “Relationship LIKES”docker compose exec -T clickhouse-service \ clickhouse-client --database=brahmand \ --query="INSERT INTO LIKES FORMAT CSVWithNames" < rel_likes.csv
Considering you are running brahmand with the docker compose configuration, to launch ClickHouse client, use this following command -
docker compose exec clickhouse-service clickhouse-client \ --host clickhouse-service \ --port 9000 \ --user test_user \ --password test_pass \ --database brahmand