example csv import command

This commit is contained in:
simon 2022-06-06 15:19:42 +07:00
parent 0c1c68a718
commit d8810397a7
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,12 @@ CREATE TABLE ta_docker_stats (
-- index for time_stamp where queries
CREATE INDEX docker_time_stamp ON ta_docker_stats (time_stamp DESC);
-- ingest old csv archive
COPY ta_docker_stats(time_stamp,time_stamp_human,last_updated,last_updated_human,stars,pulls)
FROM '/dockerstats.csv'
DELIMITER ','
CSV HEADER;
-- create release history table
CREATE TABLE ta_release (
id SERIAL NOT NULL PRIMARY KEY,