vsql Export to CSV from commandline
Posted: Thu Jul 31, 2014 8:45 am
Hi,
I have an issue with csv export (dump) for a query result in vertica.
i.e. for a column string containing comma is splitting into another column for which data is mismatching
example :
(Required OutPut)
_____________________________
ID NAME SALARY
-- ------ ------
1 AK,Nayak 100000
(Actual Output)
_____________________________
ID NAME SALARY
-- ---- ------
1 AK Nayak 100000
Commands Used for export to csv through commandline :
--------------------------------------------------------------------
/opt/vertica/bin/vsql -w <password> -P footer=off -F$',' -A -o "/home/dbadmin/test.csv" -c "SELECT * from Table LIMIT 100 ;"
Please someone help me in getting the required csv file with quoted identifier .
Thanks
Ajit Kumar Nayak
ajit.nayak@vichara.com
I have an issue with csv export (dump) for a query result in vertica.
i.e. for a column string containing comma is splitting into another column for which data is mismatching
example :
(Required OutPut)
_____________________________
ID NAME SALARY
-- ------ ------
1 AK,Nayak 100000
(Actual Output)
_____________________________
ID NAME SALARY
-- ---- ------
1 AK Nayak 100000
Commands Used for export to csv through commandline :
--------------------------------------------------------------------
/opt/vertica/bin/vsql -w <password> -P footer=off -F$',' -A -o "/home/dbadmin/test.csv" -c "SELECT * from Table LIMIT 100 ;"
Please someone help me in getting the required csv file with quoted identifier .
Thanks
Ajit Kumar Nayak
ajit.nayak@vichara.com