Skip to main content

Flat File Destination Connector

The Flat File destination connector writes extracted data from DataSync into CSV or TXT files for storage, sharing, or further processing. For large files, you can adjust row scanning or override automatic detection using a custom Schema.ini file. You can also write to local, network, or cloud-hosted destinations by setting the URL parameter and any required authentication properties.

Once your destination connection is ready, create your extraction to define what data gets loaded and how.

Create the destination connection in DataSync

  1. Log in to DataSync.
  2. From the welcome screen, select Connections.
  3. Next to Destination Connections, click New.
  4. Select Flat File.
  5. Enter all required connection properties.
  6. (Optional) In the Additional Connection Properties panel, click Add property and enter any advanced parameters.
  7. Click Save.

Connection properties

PropertyWhat to enter
DescriptionUnique name for the connection. Example: Flat File.
URLPath to the source file or folder. Supports local paths, network shares, and can point to a single CSV file or a folder containing multiple files. Example: C:\Data\SalesData.csv or \\Server\Share\Data.
Include TypesFile types to include: CSV, TXT, or both.
DelimiterCharacter used to separate values: Comma, Tab, or Custom.
Custom DelimiterCharacter used when Delimiter is set to Custom. Example: ;.
Quote CharacterCharacter used to wrap quoted values in the file.
Top Rows to SkipNumber of rows to skip at the top of the file before reading data.
Exclude file extensionRemoves the file extension from table names during extraction.
First row contains headerTreats the first row as column headers.
Include subdirectoriesIncludes files and schema.ini from nested subfolders.
Use row numbersAdds a RowNumber column as a key when updating or deleting CSV records.
VerbosityControls how much detail the connector writes to the log. Each level includes everything from the level below it, plus additional detail.

  • 1 logs queries, row counts, execution start and end times, and errors.
  • 2 adds cache queries and HTTP headers.
  • 3 adds request and response bodies.
  • 4 adds transport-level communication.
  • 5 adds all interface commands.
Enable PoolingEnables connection pooling, which keeps a set of database connections open and reuses them across extractions instead of opening a new connection each time. This reduces overhead and improves performance when multiple extractions run at the same time.
Pool idle timeoutTime in seconds a connection can stay idle before returning to the pool.
Max Pool SizeMaximum number of connections allowed in the pool at the same time.
Pool wait timeTime in seconds DataSync waits for an available connection before throwing an error.

Additional connection properties

Use this panel to enter connection string properties not available in the Connection Properties panel. For sensitive values such as passwords, set the type to Encrypted. The value is hidden in the interface and stored encrypted in the back end.

PropertyWhat to enter
CharsetCharacter encoding for the source file when it uses ANSI encoding. Not needed for UTF-8 files. Example: windows-1252.
CultureRegional format that determines how decimal and thousands separators are interpreted. Must match between source files and your DataSync configuration. Example: fr-FR for comma decimals or en-US for period decimals.
RowScanDepthNumber of rows scanned to infer column data types. Default: 100. Use 5000 for better accuracy on varied data, or 0 to scan the entire file.
AggregateFilesCombines all files from the source folder into a single table called AggregatedFiles. The schema is taken from the first file unless MetadataDiscoveryURI is set. Useful when working with multiple files that share the same structure, such as monthly export files.
IncludeFilesComma-separated list of file extensions to include. Default: CSV,TXT,TAB. Supports files without extensions (NOEXT), archives (ZIP, TAR, GZ), file masks, and date filters. Example: IncludeFiles=2020*.csv,TXT.
ExcludeFilesComma-separated list of file extensions to exclude. Supports the same date and mask filters as IncludeFiles. Example: ExcludeFiles=TXT.
InsertModeControls how data is written to CSV files.
  • FilePerBatch creates a new CSV file per batch. Required for NEC Cloud.
  • SingleFile writes all data into one file. For local and network paths only.
CreateBatchFolderCreates a folder when InsertMode is set to FilePerBatch. Default: true.
BatchNamingConventionNaming format for batch files.
  • Timestamp_BatchNumber uses the format yyyyMMddhhmmssSSS_batchNumber.
  • TableName_BatchNumber uses the format TableName_batchNumber.csv. This is the default.