A. Command Reference : vwload Command--Load Data into a Table : vwload Examples
 
Share this page                  
vwload Examples
1. Load the contents of a CSV file named t1.txt into table t1 of the mydb database. In the t1 table, delimit fields with a comma (,) and quoted strings with quotation marks ("). Skip one record in the t1.txt file and log errors to the t1.log file.
vwload –f "," –q "\"" –s 1 –l t1.log –t t1 mydb t1.txt
2. Load into table t1 of the mydb database only the first and third columns from loadfile.txt, which has three columns. (The empty attribute name tells vwload to ignore the second column in loadfile.txt.) The columns in the table are named a and b.
vwload ‑‑table t1 ‑‑attributes a,,b mydb loadfile.txt
3. Load into table t1 of the mydb database a date column named "dt" using the US date format:
vwload ‑‑table t1 ‑‑dateformat dt=US mydb loadfile.txt
4. Load the contents from file data into table info in database db, convert from character set Windows code page 1252, and substitute an inverted question mark (Unicode code point 00bf) for any invalid characters in the input file:
vwload ‑C windows-1252 ‑S '\u00bf' ‑t info db data
Note:  The ‑S option is valid on Linux only.
5. Load data into the lineitem table in parallel mode:
vwload --table lineitem --fdelim "|" --cluster dbtest lineitem1.tbl lineitem2.tbl lineitem3.tbl lineitem4.tbl
6. Load the region table into the mydb database from the region.dat file and build histograms on all columns after the table is loaded:
vwload –t –z region mydb region.dat