We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Can we load ENV variable into VERTICA columns? — Vertica Forum

Can we load ENV variable into VERTICA columns?

Hi I have a table which has has date column. Can i load the ENV variable into that column using COPY command. Chandra

Comments

  • Navin_CNavin_C Vertica Customer
    Hi Chandra, Yes you can load ENV variable value to a date column using COPY command Lets say you have a unix variable PROCESS DATE='2010-12-12' You can pass this variable to be a Vertica variable using the
       vsql -v PROC_DATE = $PROCESS_DATE -c     COPY table_name  (  column_process_date as :PROC_DATE  )  from path_of_file  delimiter '|'  ;  
    Hope this helps.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file