Transfer Parameters
FastTransfer requires parameters to define which data to transfer and how to load it into the target database. This page covers all transfer-related parameters for source selection, target configuration, and load behavior.
Source Configuration
These parameters define what data to extract from the source database.
Source Schema
Define the source schema name. This parameter is required when using the PostgreSQL Ctid method.
Example:
./FastTransfer \
...
--sourceschema "public" \
...
Syntax:
- Short form:
-s "schema_name" - Long form:
--sourceschema "schema_name"
This parameter must be set if the PostgreSQL Ctid method is used.
Source Table
Define the source table name. This parameter is required when using the PostgreSQL Ctid method.
Example:
./FastTransfer \
...
--sourcetable "customers" \
...
Syntax:
- Short form:
-t "table_name" - Long form:
--sourcetable "table_name"
This parameter must be set if the PostgreSQL Ctid method is used.
Query
Plain text SQL query. Will be used instead of source table if provided.
Example:
./FastTransfer \
...
--query "SELECT * FROM customers WHERE country = 'USA'" \
...
Syntax:
- Short form:
-q "sql_query" - Long form:
--query "sql_query"
When using a custom query, FastTransfer will execute this query on the source database instead of reading from a table directly.
File Input
Input file storing SQL query. The file must exist. This allows you to store complex queries in a separate file.
Example:
./FastTransfer \
...
--fileinput "query.sql" \
...
Syntax:
- Short form:
-f "file_path" - Long form:
--fileinput "file_path"
The specified file must exist and contain a valid SQL query.
Target Configuration
These parameters define where to load the data in the target database.
Target Schema
Define the target schema name.
Example:
./FastTransfer \
...
--targetschema "dbo" \
...
Syntax:
- Short form:
-S "schema_name" - Long form:
--targetschema "schema_name"
Target Table
Define the target table name.
Example:
./FastTransfer \
...
--targettable "customers" \
...
Syntax:
- Short form:
-T "table_name" - Long form:
--targettable "table_name"
Load Behavior
These parameters control how data is loaded into the target table.
Load Mode
Load mode of the data into the target table.
Example:
./FastTransfer \
...
--loadmode Truncate \
...
Syntax:
- Short form:
-L "mode" - Long form:
--loadmode "mode"
Allowed Values:
| Load Mode | Description |
|---|---|
Append | Append data to the target table (default) |
Truncate | Truncate the target table before loading |
Default Value: Append
Batch Size
Batch Size for BulkCopy operations.
Example:
./FastTransfer \
...
--batchsize 500000 \
...
Syntax:
- Short form:
-B "size" - Long form:
--batchsize "size"
Default Value: 1048576
Adjust the batch size based on your network bandwidth and target database capabilities. Smaller batches may be better for slower networks, while larger batches can improve throughput on fast connections.
Use Work Tables
Switch that will activate the usage of intermediate work tables. Useful in some rare cases.
Example:
./FastTransfer \
...
--useworktables \
...
Syntax:
- Short form:
-W - Long form:
--useworktables
This option is useful in rare scenarios where direct loading causes issues. Work tables act as an intermediate staging area.
Map Method
Mapping method for the columns between source and target.
Example:
./FastTransfer \
...
--mapmethod Name \
...
Syntax:
- Short form:
-N "method" - Long form:
--mapmethod "method"
Allowed Values:
| Map Method | Description |
|---|---|
Position | Map columns by their position in the source and target tables (default) |
Name | Map columns by their name (case insensitive) and ignore missing columns |
Default Value: Position
Use Position when source and target tables have identical column order. Use Name when column order differs or when some columns may be missing from either source or target.