Create sample YugabyteDB table with data
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.zipunzip 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.zipunzip people-1000000.zip
Create table and import data into YCQL (Cassandra compatible)
createkeyspacesample;usesample;createtablesample_data(indexintprimarykey,user_idtext,first_nametext,last_nametext,sextext,emailtext,phonetext,date_of_birthtext,job_titletext);--copy sample_data from 'people-100000.csv' with header=true;copysample_datafrom'people-1000000.csv'withheader=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)
Subscribe
For further actions, you may consider blocking this person and/orreporting abuse