How to copy data from a CSV file to a table in Vertica Data Base by using command line (CMD)?
I was wondering if there is any way to copy a data from csv file by using command line (CMD) to a table in Vertica Data Base. I've searching for a while and I don't find something that works for me. I want to create something similar to this I've made, is a batch file to copy a data from CSV file to a table in postgreSQL Data Base remotley:
C: cd "C:\pgsql\bin" psql -h suggestedorder.postgres.database.azure.com -d DataAnalytics -U [email protected] -c "\copy planning.sap_mx_env_me2n_zaaptr_zpaitr_envase_transito (planta, folio, des_proveedor, fecha_carga, hora)from 'C:\Users\geradiaz.MODELO\Desktop\Envase\Transitos\Outputs\Transitos.csv' with (format csv, header)
To avoid CMD asked for my password I created The password file, so i don't know if I can create something like that to use it in Vertica.
Do you know guys, if there is any way to make something similiar? do I need to create The Password file like in posgreSQL first? I hope you can help me or tell me where I can find info about how to create this properly.
Have a nice day, Best regards!