CSV Formatting
When exporting to CSV format (.csv extension), FastTransfer provides extensive formatting options.
Delimiter
Use the -d or --delimiter parameter to specify the character(s) used to separate fields.
./FastTransfer \
...
--fileoutput "data.csv" \
--delimiter "," \
...
Syntax:
- Short form:
-d "delimiter" - Long form:
--delimiter "delimiter"
Default: , (comma)
Common Delimiters
- Comma (CSV)
- Tab (TSV)
- Pipe
- Semicolon
--delimiter ","
--delimiter "\t"
--delimiter "|"
--delimiter ";"
Use Quotes
Use the -t or --quotes switch to enclose string fields in double quotes.
./FastTransfer \
...
--fileoutput "products.csv" \
--quotes \
...
Syntax:
- Short form:
-t - Long form:
--quotes
Default: Without quotes
- Without --quotes
- With --quotes
ProductID,ProductName,Description,Price
1,Widget A,Small widget,19.99
2,Widget B,Large widget,29.99
"ProductID","ProductName","Description","Price"
"1","Widget A","Small widget","19.99"
"2","Widget B","Large widget","29.99"
When --quotes, any double quotes (") in the data are escaped with backslash (\").
Date Format
Use the -f or --dateformat parameter to specify how dates and timestamps are formatted.
./FastTransfer \
...
--fileoutput "orders.csv"
--dateformat "yyyy-MM-dd HH:mm:ss" \
...
Syntax:
- Short form:
-f "format" - Long form:
--dateformat "format"
Default: Database default format
Format Codes
| Code | Description | Example |
|---|---|---|
yyyy | 4-digit year | 2026 |
MM | Month (01-12) | 01 |
dd | Day (01-31) | 07 |
HH | Hour 24h (00-23) | 14 |
mm | Minute (00-59) | 30 |
ss | Second (00-59) | 22 |
Decimal Separator
Use the -n or --decimalseparator parameter to specify the decimal separator for numeric values.
./FastTransfer \
...
--fileoutput "products.csv"
--decimalseparator ","
...
Syntax:
- Short form:
-n "separator" - Long form:
--decimalseparator "separator"
Default: . (period/dot)
No Header
Use the -h or --noheader parameter to exclude column headers from the output.
./FastTransfer \
...
--fileoutput "customers.csv" \
--noheader \
...
Syntax:
- Short form:
-h - Long form:
--noheader
- Without --noheader (default)
- With --noheader
CustomerID,CustomerName,Email
1,John Doe,john@example.com
2,Jane Smith,jane@example.com
1,John Doe,john@example.com
2,Jane Smith,jane@example.com
Boolean Format
Use the -b or --boolformat parameter to specify how boolean values are represented.
./FastTransfer \
...
--fileoutput "products.csv" \
--boolformat "1/0" \
...
Syntax:
- Short form:
-b "format" - Long form:
--boolformat "format"
Default: 1/0
Options:
true/false(default)t/f1/0yes/noy/n
With --boolformat "true/false" (default):
ProductID,ProductName,InStock,Discontinued
1,Widget A,true,false
2,Widget B,false,true
With --boolformat "1/0":
ProductID,ProductName,InStock,Discontinued
1,Widget A,1,0
2,Widget B,0,1
With --boolformat "yes/no":
ProductID,ProductName,InStock,Discontinued
1,Widget A,yes,no
2,Widget B,no,yes
Complete Example
- Windows
- Linux
.\\FastTransfer.exe `
--connectiontype mssql `
--server "localhost" `
--database "AdventureWorks" `
--trusted `
--query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" `
--directory "C:\exports\sales" `
--fileoutput "orders_{startdate}.csv" `
--delimiter "," `
--quotes `
--dateformat "yyyy-MM-dd HH:mm:ss" `
--decimalseparator "." `
--boolformat "1/0" `
--encoding "UTF-8"
./FastTransfer \
--connectiontype mssql \
--server "localhost" \
--database "AdventureWorks" \
--trusted \
--query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \
--directory "/exports/sales" \
--fileoutput "orders_{startdate}.csv" \
--delimiter "," \
--quotes \
--dateformat "yyyy-MM-dd HH:mm:ss" \
--decimalseparator "." \
--boolformat "1/0" \
--encoding "UTF-8"
Output (orders_20260107.csv):
"OrderID","OrderDate","CustomerName","TotalAmount","IsShipped"
"1001","2026-01-05 10:30:00","John Doe","299.99","1"
"1002","2026-01-05 11:15:00","Jane Smith","149.50","0"
"1003","2026-01-06 09:20:00","Bob Johnson","599.00","1"
For Excel compatibility, use .xlsx format instead: --fileoutput "data.xlsx"