Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
Copy from CSV sfile
Hi,
Do I have to create a table before I can use copy statement to import a CSV file to that table?
Can I import CSV file at the same time a new table is created?
Thank you.
0
Leave a Comment
Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.
Comments
You can grab the headers of the file and create the table before you run copy cmd. (oldschool)
Or
You can use External table build definition on copy cmd:
Note : there is need for access on a location for the user who will run the copy command.
See more details here
https://my.vertica.com/docs/8.0.x/HTML/index.htm#Authoring/SQLReferenceManual/Statements/CREATEEXTERNALTABLEASCOPY.htm
Both are not as fast/ optimium as the default copy cmd on a existing table.