Production table
Jump to navigation
Jump to search
To create the file for updating the productions:
psql -U postgres -W -h db.pau.pic.es dm -c "COPY (SELECT * FROM production) TO stdout DELIMITER ',' CSV" | pv > paudm_production_datetime.csv
To remove the old version:
hdfs dfs -rm /user/jcarrete/data/paudm/production/*
Copy from local:
hdfs dfs -copyFromLocal /cephfs/pic.es/astro/scratch/jcarrete/sandbox/paudm_production_17_02_2020.csv /user/jcarrete/data/paudm/production/paudm_production_17_02_2020.csv
To update the table:
INSERT OVERWRITE TABLE cosmohub.paudm_production SELECT id, input_production, pipeline, release, software_version, job_id, comments, created FROM jcarrete.paudm_production_csv;