Skip to main content

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

 --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

ProductID,ProductName,Description,Price
1,Widget A,Small widget,19.99
2,Widget B,Large widget,29.99
Information

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

CodeDescriptionExample
yyyy4-digit year2026
MMMonth (01-12)01
ddDay (01-31)07
HHHour 24h (00-23)14
mmMinute (00-59)30
ssSecond (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
CustomerID,CustomerName,Email
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/f
  • 1/0
  • yes/no
  • y/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

.\\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"

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"
tip

For Excel compatibility, use .xlsx format instead: --fileoutput "data.xlsx"

Copyright © 2026 Architecture & Performance. Built with Docusaurus.