I keep finding myself looking around for a quick and convenient way to to create a table populated with data.
(the datasets are described as being free to use for testing)
Download 100,000 rows dataset.
curl -L https://github.com/datablist/sample-csv-files/raw/main/files/people/people-100000.zip > people-100000.zip
unzip people-100000.zip
Download 1,000,000 rows dataset.
curl -L https://github.com/datablist/sample-csv-files/raw/main/files/people/people-1000000.zip > people-1000000.zip
unzip people-1000000.zip
Create table and import data into YCQL (Cassandra compatible)
create keyspace sample;
use sample;
create table sample_data
(
index int primary key,
user_id text,
first_name text,
last_name text,
sex text,
email text,
phone text,
date_of_birth text,
job_title text
);
--copy sample_data from 'people-100000.csv' with header=true;
copy sample_data from 'people-1000000.csv' with header=true;
Create table and import data into YSQL (PostgreSQL compatible)
create table sample_data
(
index int primary key,
user_id text,
first_name text,
last_name text,
sex text,
email text,
phone text,
date_of_birth text,
job_title text
);
--\copy sample_data from 'people-100000.csv' csv header;
\copy sample_data from 'people-1000000.csv' csv header;
Top comments (0)