# FastTransfer Documentation > High-performance cross-database data transfer tool for importing CSV, Parquet, JSON, XLSX files and transferring data between PostgreSQL, SQL Server, MySQL, Oracle, ClickHouse, SAP HANA, Teradata, DuckDB, and more. Runs on-premises, in the cloud, or in fully air-gapped environments with no internet connection required. ## 0.14 Your first FastTransfer data transfer - [Getting Started with FastTransfer](/0.14.md): Your first FastTransfer data transfer ### documentation - [Advanced Parameters](/0.14/documentation/cli/advanced_parameters.md): Advanced configuration options for FastTransfer - [Authentication](/0.14/documentation/cli/authentication.md): FastTransfer authentication methods and security - [License](/0.14/documentation/cli/license.md): License configuration for FastTransfer - [Parallel Parameters](/0.14/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Source Connection Parameters](/0.14/documentation/cli/source_connection_parameters.md): Source server, database, and connection configuration - [Target Connection Parameters](/0.14/documentation/cli/target_connection_parameters.md): Target server, database, and connection configuration - [Transfer Parameters](/0.14/documentation/cli/transfer_parameters.md): Source and target object selection and transfer configuration - [AWS S3 Configuration](/0.14/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/0.14/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/0.14/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/0.14/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/0.14/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [Operating Systems](/0.14/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/0.14/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [Advanced Scenarios](/0.14/documentation/examples/advanced-scenarios.md): Advanced use cases and complex transfer scenarios - [CSV Import](/0.14/documentation/examples/csv-import.md): Import CSV files into databases using a powerful read_csv capabilities - [JSON Import](/0.14/documentation/examples/json-import.md): Import JSON files into databases using a powerful read_json capabilities - [MySQL Examples](/0.14/documentation/examples/mysql.md): Transfer examples for MySQL databases - [Oracle Examples](/0.14/documentation/examples/oracle.md): Transfer examples for Oracle databases - [Other Databases](/0.14/documentation/examples/other-databases.md): Transfer examples for ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB - [Parquet Import](/0.14/documentation/examples/parquet-import.md): Import Parquet files into databases using a powerful read_parquet capabilities - [PostgreSQL Examples](/0.14/documentation/examples/postgresql.md): Transfer examples for PostgreSQL databases - [SQL Server Examples](/0.14/documentation/examples/sql-server.md): Transfer examples for SQL Server databases - [Configuration Examples](/0.14/documentation/logging/examples.md): Sample FastTransfer_settings.json configurations - [Log Database](/0.14/documentation/logging/log-database.md): Configure database logging in FastTransfer - [Log Files Names Mapping using variables](/0.14/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/0.14/documentation/logging/logs-level.md): Configure FastTransfer log levels - [Logging Overview](/0.14/documentation/logging/Overview.md): Overview of FastTransfer logging configuration ### installation Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. - [Installation](/0.14/installation.md): Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. ### integration - [Apache Airflow](/0.14/integration/airflow-integration.md): Integrate FastTransfer with Apache Airflow using the DockerOperator. Build DAGs to schedule and monitor data transfer pipelines. - [Docker](/0.14/integration/docker-integration.md): Run FastTransfer in Docker with the official container image. Pull from DockerHub, configure volumes, and automate data transfers. - [Kestra](/0.14/integration/kestra-integration.md): Orchestrate FastTransfer workflows with Kestra. Schedule and automate data transfers using Docker Run or Shell command plugins. - [PostgreSQL](/0.14/integration/postgresql-integration.md): Run FastTransfer directly from PostgreSQL with the pg_fasttransfer extension. Execute data transfers via SQL functions natively. - [SQL Server](/0.14/integration/sqlserver-integration.md): Integrate FastTransfer with SQL Server using CLR stored procedures. Run data transfers directly from T-SQL with FastWrappers-TSQL. ### sitemap Complete documentation structure - [Sitemap](/0.14/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastTransfer commands - [FastTransfer Command Wizard](/0.14/wizard.md): Interactive wizard to build FastTransfer commands ## 0.15 Your first FastTransfer data transfer - [Getting Started with FastTransfer](/0.15.md): Your first FastTransfer data transfer ### documentation - [Advanced Parameters](/0.15/documentation/cli/advanced_parameters.md): Advanced configuration options for FastTransfer - [Authentication](/0.15/documentation/cli/authentication.md): FastTransfer authentication methods and security - [License](/0.15/documentation/cli/license.md): License configuration for FastTransfer - [Parallel Parameters](/0.15/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Source Connection Parameters](/0.15/documentation/cli/source_connection_parameters.md): Source server, database, and connection configuration - [Target Connection Parameters](/0.15/documentation/cli/target_connection_parameters.md): Target server, database, and connection configuration - [Transfer Parameters](/0.15/documentation/cli/transfer_parameters.md): Source and target object selection and transfer configuration - [AWS S3 Configuration](/0.15/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/0.15/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/0.15/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/0.15/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/0.15/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [Operating Systems](/0.15/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/0.15/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [Advanced Scenarios](/0.15/documentation/examples/advanced-scenarios.md): Advanced use cases and complex transfer scenarios - [CSV Import](/0.15/documentation/examples/csv-import.md): Import CSV files into databases using a powerful read_csv capabilities - [JSON Import](/0.15/documentation/examples/json-import.md): Import JSON files into databases using a powerful read_json capabilities - [MySQL Examples](/0.15/documentation/examples/mysql.md): Transfer examples for MySQL databases - [Oracle Examples](/0.15/documentation/examples/oracle.md): Transfer examples for Oracle databases - [Other Databases](/0.15/documentation/examples/other-databases.md): Transfer examples for ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB - [Parquet Import with DuckDB](/0.15/documentation/examples/parquet-import.md): Import Parquet files into databases using DuckDB's powerful read_parquet capabilities - [PostgreSQL Examples](/0.15/documentation/examples/postgresql.md): Transfer examples for PostgreSQL databases - [SQL Server Examples](/0.15/documentation/examples/sql-server.md): Transfer examples for SQL Server databases - [Configuration Examples](/0.15/documentation/logging/examples.md): Sample FastTransfer_settings.json configurations - [Log Database](/0.15/documentation/logging/log-database.md): Configure database logging in FastTransfer - [Log Files Names Mapping using variables](/0.15/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/0.15/documentation/logging/logs-level.md): Configure FastTransfer log levels - [Logging Overview](/0.15/documentation/logging/Overview.md): Overview of FastTransfer logging configuration ### installation Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. - [Installation](/0.15/installation.md): Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. ### integration - [Apache Airflow](/0.15/integration/airflow-integration.md): Integrate FastTransfer with Apache Airflow using the DockerOperator. Build DAGs to schedule and monitor data transfer pipelines. - [Docker](/0.15/integration/docker-integration.md): Run FastTransfer in Docker with the official container image. Pull from DockerHub, configure volumes, and automate data transfers. - [Kestra](/0.15/integration/kestra-integration.md): Orchestrate FastTransfer workflows with Kestra. Schedule and automate data transfers using Docker Run or Shell command plugins. - [PostgreSQL](/0.15/integration/postgresql-integration.md): Run FastTransfer directly from PostgreSQL with the pg_fasttransfer extension. Execute data transfers via SQL functions natively. - [SQL Server](/0.15/integration/sqlserver-integration.md): Integrate FastTransfer with SQL Server using CLR stored procedures. Run data transfers directly from T-SQL with FastWrappers-TSQL. ### release-notes - [Release Notes 0.15](/0.15/release-notes/release-notes-0.15.md): What's new in FastTransfer 0.15 ### sitemap Complete documentation structure - [Sitemap](/0.15/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastTransfer commands - [FastTransfer Command Wizard](/0.15/wizard.md): Interactive wizard to build FastTransfer commands ## 0.16 Your first FastTransfer data transfer - [Getting Started with FastTransfer](/0.16.md): Your first FastTransfer data transfer ### documentation - [Advanced Parameters](/0.16/documentation/cli/advanced_parameters.md): Advanced configuration options for FastTransfer - [Authentication](/0.16/documentation/cli/authentication.md): FastTransfer authentication methods and security - [License](/0.16/documentation/cli/license.md): License configuration for FastTransfer - [Parallel Parameters](/0.16/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Source Connection Parameters](/0.16/documentation/cli/source_connection_parameters.md): Source server, database, and connection configuration - [Target Connection Parameters](/0.16/documentation/cli/target_connection_parameters.md): Target server, database, and connection configuration - [Transfer Parameters](/0.16/documentation/cli/transfer_parameters.md): Source and target object selection and transfer configuration - [AWS S3 Configuration](/0.16/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/0.16/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/0.16/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/0.16/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/0.16/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [Operating Systems](/0.16/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/0.16/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [Advanced Scenarios](/0.16/documentation/examples/advanced-scenarios.md): Advanced use cases and complex transfer scenarios - [CSV Import](/0.16/documentation/examples/csv-import.md): Import CSV files into databases using a powerful read_csv capabilities - [JSON Import](/0.16/documentation/examples/json-import.md): Import JSON files into databases using a powerful read_json capabilities - [MySQL Examples](/0.16/documentation/examples/mysql.md): Transfer examples for MySQL databases - [Oracle Examples](/0.16/documentation/examples/oracle.md): Transfer examples for Oracle databases - [Other Databases](/0.16/documentation/examples/other-databases.md): Transfer examples for ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB - [Parquet Import](/0.16/documentation/examples/parquet-import.md): Import Parquet files into databases using a powerful read_parquet capabilities - [PostgreSQL Examples](/0.16/documentation/examples/postgresql.md): Transfer examples for PostgreSQL databases - [SQL Server Examples](/0.16/documentation/examples/sql-server.md): Transfer examples for SQL Server databases - [Configuration Examples](/0.16/documentation/logging/examples.md): Sample FastTransfer_settings.json configurations - [Log Database](/0.16/documentation/logging/log-database.md): Configure database logging in FastTransfer - [Log Files Names Mapping using variables](/0.16/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/0.16/documentation/logging/logs-level.md): Configure FastTransfer log levels - [Logging Overview](/0.16/documentation/logging/Overview.md): Overview of FastTransfer logging configuration ### installation Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. - [Installation](/0.16/installation.md): Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. ### integration - [Apache Airflow](/0.16/integration/airflow-integration.md): Integrate FastTransfer with Apache Airflow using the DockerOperator. Build DAGs to schedule and monitor data transfer pipelines. - [Docker](/0.16/integration/docker-integration.md): Run FastTransfer in Docker with the official container image. Pull from DockerHub, configure volumes, and automate data transfers. - [Kestra](/0.16/integration/kestra-integration.md): Orchestrate FastTransfer workflows with Kestra. Schedule and automate data transfers using Docker Run or Shell command plugins. - [PostgreSQL](/0.16/integration/postgresql-integration.md): Run FastTransfer directly from PostgreSQL with the pg_fasttransfer extension. Execute data transfers via SQL functions natively. - [SQL Server](/0.16/integration/sqlserver-integration.md): Integrate FastTransfer with SQL Server using CLR stored procedures. Run data transfers directly from T-SQL with FastWrappers-TSQL. ### release-notes - [Release Notes 0.16](/0.16/release-notes/release-notes-0.16.md): What's new in FastTransfer 0.16 ### sitemap Complete documentation structure - [Sitemap](/0.16/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastTransfer commands - [FastTransfer Command Wizard](/0.16/wizard.md): Interactive wizard to build FastTransfer commands ## 0.17 Your first FastTransfer data transfer - [Getting Started with FastTransfer](/0.17.md): Your first FastTransfer data transfer ### documentation - [Advanced Parameters](/0.17/documentation/cli/advanced_parameters.md): Advanced configuration options for FastTransfer - [Authentication](/0.17/documentation/cli/authentication.md): FastTransfer authentication methods and security - [License](/0.17/documentation/cli/license.md): License configuration for FastTransfer - [Parallel Parameters](/0.17/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Source Connection Parameters](/0.17/documentation/cli/source_connection_parameters.md): Source server, database, and connection configuration - [Target Connection Parameters](/0.17/documentation/cli/target_connection_parameters.md): Target server, database, and connection configuration - [Transfer Parameters](/0.17/documentation/cli/transfer_parameters.md): Source and target object selection and transfer configuration - [Operating Systems](/0.17/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/0.17/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES](/0.17/documentation/environment-variables/loadsteptimeout.md): Control bulk load timeout for msbulk and orabulk operations - [Environment Variables Overview](/0.17/documentation/environment-variables/overview.md): Configure FastTransfer runtime behavior with environment variables - [FASTTRANSFER_SORTEDINPUT](/0.17/documentation/environment-variables/sortedinput.md): Force sorted input hint for SQL Server bulk copy operations - [Advanced Scenarios](/0.17/documentation/examples/advanced-scenarios.md): Advanced use cases and complex transfer scenarios - [CSV Import](/0.17/documentation/examples/csv-import.md): Import CSV files into databases using a powerful read_csv capabilities - [JSON Import](/0.17/documentation/examples/json-import.md): Import JSON files into databases using a powerful read_json capabilities - [MySQL Examples](/0.17/documentation/examples/mysql.md): Transfer examples for MySQL databases - [Oracle Examples](/0.17/documentation/examples/oracle.md): Transfer examples for Oracle databases - [Other Databases](/0.17/documentation/examples/other-databases.md): Transfer examples for ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB - [Parquet Import](/0.17/documentation/examples/parquet-import.md): Import Parquet files into databases using a powerful read_parquet capabilities - [PostgreSQL Examples](/0.17/documentation/examples/postgresql.md): Transfer examples for PostgreSQL databases - [SQL Server Examples](/0.17/documentation/examples/sql-server.md): Transfer examples for SQL Server databases - [Configuration Examples](/0.17/documentation/logging/examples.md): Sample FastTransfer_Settings.json configurations - [Log Database](/0.17/documentation/logging/log-database.md): Configure database logging in FastTransfer - [Log Files Names Mapping using variables](/0.17/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/0.17/documentation/logging/logs-level.md): Configure FastTransfer log levels - [Logging Overview](/0.17/documentation/logging/Overview.md): Overview of FastTransfer logging configuration ### installation Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. - [Installation](/0.17/installation.md): Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. ### integration - [Apache Airflow](/0.17/integration/airflow-integration.md): Integrate FastTransfer with Apache Airflow using the DockerOperator. Build DAGs to schedule and monitor data transfer pipelines. - [Docker](/0.17/integration/docker-integration.md): Run FastTransfer in Docker with the official container image. Pull from DockerHub, configure volumes, and automate data transfers. - [Kestra](/0.17/integration/kestra-integration.md): Orchestrate FastTransfer workflows with Kestra. Schedule and automate data transfers using Docker Run or Shell command plugins. - [PostgreSQL](/0.17/integration/postgresql-integration.md): Run FastTransfer directly from PostgreSQL with the pg_fasttransfer extension. Execute data transfers via SQL functions natively. - [SQL Server](/0.17/integration/sqlserver-integration.md): Integrate FastTransfer with SQL Server using CLR stored procedures. Run data transfers directly from T-SQL with FastWrappers-TSQL. ### release-notes - [Release Notes 0.16](/0.17/release-notes/release-notes-0.16.md): What's new in FastTransfer 0.16 - [Release Notes 0.17](/0.17/release-notes/release-notes-0.17.md): What's new in FastTransfer 0.17 ### sitemap Complete documentation structure - [Sitemap](/0.17/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastTransfer commands - [FastTransfer Command Wizard](/0.17/wizard.md): Interactive wizard to build FastTransfer commands ## 0.18 Your first FastTransfer data transfer - [Getting Started with FastTransfer](/0.18.md): Your first FastTransfer data transfer ### ai - [FastTransfer Agent Skill](/0.18/ai/agent-skills.md): Install the official arpe.io agent skill that teaches Claude Code, Codex, Cursor, Copilot and other AI agents to build correct FastTransfer command lines - [FastTransfer MCP Server](/0.18/ai/mcp-server.md): Connect Claude, ChatGPT, Cursor, VS Code and other AI assistants to the arpe.io MCP server to build, check and run FastTransfer commands ### documentation - [Advanced Parameters](/0.18/documentation/cli/advanced_parameters.md): Advanced configuration options for FastTransfer - [Authentication](/0.18/documentation/cli/authentication.md): FastTransfer authentication methods and security - [License](/0.18/documentation/cli/license.md): License configuration for FastTransfer - [Parallel Parameters](/0.18/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Source Connection Parameters](/0.18/documentation/cli/source_connection_parameters.md): Source server, database, and connection configuration - [Target Connection Parameters](/0.18/documentation/cli/target_connection_parameters.md): Target server, database, and connection configuration - [Transfer Parameters](/0.18/documentation/cli/transfer_parameters.md): Source and target object selection and transfer configuration - [Operating Systems](/0.18/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/0.18/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [FASTTRANSFER_DATEFORMAT](/0.18/documentation/environment-variables/dateformat.md): Format of the date bounds used by the Timepartition parallel method - [FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES](/0.18/documentation/environment-variables/loadsteptimeout.md): Control bulk load timeout for msbulk and orabulk operations - [Environment Variables Overview](/0.18/documentation/environment-variables/overview.md): Configure FastTransfer runtime behavior with environment variables - [FASTTRANSFER_SORTEDINPUT](/0.18/documentation/environment-variables/sortedinput.md): Force sorted input hint for SQL Server bulk copy operations - [Advanced Scenarios](/0.18/documentation/examples/advanced-scenarios.md): Advanced use cases and complex transfer scenarios - [CSV Import](/0.18/documentation/examples/csv-import.md): Import CSV files into databases using a powerful read_csv capabilities - [JSON Import](/0.18/documentation/examples/json-import.md): Import JSON files into databases using a powerful read_json capabilities - [MySQL Examples](/0.18/documentation/examples/mysql.md): Transfer examples for MySQL databases - [Oracle Examples](/0.18/documentation/examples/oracle.md): Transfer examples for Oracle databases - [Other Databases](/0.18/documentation/examples/other-databases.md): Transfer examples for ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB - [Parquet Import](/0.18/documentation/examples/parquet-import.md): Import Parquet files into databases using a powerful read_parquet capabilities - [PostgreSQL Examples](/0.18/documentation/examples/postgresql.md): Transfer examples for PostgreSQL databases - [SQL Server Examples](/0.18/documentation/examples/sql-server.md): Transfer examples for SQL Server databases - [Configuration Examples](/0.18/documentation/logging/examples.md): Sample FastTransfer_Settings.json configurations - [Log Database](/0.18/documentation/logging/log-database.md): Configure database logging in FastTransfer - [Log Files Names Mapping using variables](/0.18/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/0.18/documentation/logging/logs-level.md): Configure FastTransfer log levels - [Logging Overview](/0.18/documentation/logging/Overview.md): Overview of FastTransfer logging configuration ### installation Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. - [Installation](/0.18/installation.md): Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. ### integration - [Apache Airflow](/0.18/integration/airflow-integration.md): Integrate FastTransfer with Apache Airflow using the DockerOperator. Build DAGs to schedule and monitor data transfer pipelines. - [Docker](/0.18/integration/docker-integration.md): Run FastTransfer in Docker with the official container image. Pull from DockerHub, configure volumes, and automate data transfers. - [Kestra](/0.18/integration/kestra-integration.md): Orchestrate FastTransfer workflows with Kestra. Schedule and automate data transfers using Docker Run or Shell command plugins. - [PostgreSQL](/0.18/integration/postgresql-integration.md): Run FastTransfer directly from PostgreSQL with the pg_fasttransfer extension. Execute data transfers via SQL functions natively. - [SQL Server](/0.18/integration/sqlserver-integration.md): Integrate FastTransfer with SQL Server using CLR stored procedures. Run data transfers directly from T-SQL with FastWrappers-TSQL. ### release-notes - [Release Notes 0.16](/0.18/release-notes/release-notes-0.16.md): What's new in FastTransfer 0.16 - [Release Notes 0.17](/0.18/release-notes/release-notes-0.17.md): What's new in FastTransfer 0.17 - [Release Notes 0.18](/0.18/release-notes/release-notes-0.18.md): What's new in FastTransfer 0.18 ### sitemap Complete documentation structure - [Sitemap](/0.18/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastTransfer commands - [FastTransfer Command Wizard](/0.18/wizard.md): Interactive wizard to build FastTransfer commands ## 1.0 Your first FastTransfer data transfer - [Getting Started with FastTransfer](/1.0.md): Your first FastTransfer data transfer ### ai - [FastTransfer Agent Skill](/1.0/ai/agent-skills.md): Install the official arpe.io agent skill that teaches Claude Code, Codex, Cursor, Copilot and other AI agents to build correct FastTransfer command lines - [FastTransfer MCP Server](/1.0/ai/mcp-server.md): Connect Claude, ChatGPT, Cursor, VS Code and other AI assistants to the arpe.io MCP server to build, check and run FastTransfer commands ### documentation - [ADBC Connections](/1.0/documentation/cli/adbc_connections.md): Transfer data with the Arpe.io ADBC drivers bundled with FastTransfer - [Advanced Parameters](/1.0/documentation/cli/advanced_parameters.md): Advanced configuration options for FastTransfer - [Authentication](/1.0/documentation/cli/authentication.md): FastTransfer authentication methods and security - [License](/1.0/documentation/cli/license.md): License configuration for FastTransfer - [Parallel Parameters](/1.0/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Source Connection Parameters](/1.0/documentation/cli/source_connection_parameters.md): Source server, database, and connection configuration - [Target Connection Parameters](/1.0/documentation/cli/target_connection_parameters.md): Target server, database, and connection configuration - [Transfer Parameters](/1.0/documentation/cli/transfer_parameters.md): Source and target object selection and transfer configuration - [Operating Systems](/1.0/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/1.0/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [FASTTRANSFER_DATEFORMAT](/1.0/documentation/environment-variables/dateformat.md): Format of the date bounds used by the Timepartition parallel method - [FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES](/1.0/documentation/environment-variables/loadsteptimeout.md): Control bulk load timeout for msbulk and orabulk operations - [Environment Variables Overview](/1.0/documentation/environment-variables/overview.md): Configure FastTransfer runtime behavior with environment variables - [FASTTRANSFER_SORTEDINPUT](/1.0/documentation/environment-variables/sortedinput.md): Force sorted input hint for SQL Server bulk copy operations - [ADBC](/1.0/documentation/examples/adbc.md): Transfer examples with the ADBC connection types (SQL Server, PostgreSQL, Oracle, Db2, Teradata, Netezza) - [Advanced Scenarios](/1.0/documentation/examples/advanced-scenarios.md): Advanced use cases and complex transfer scenarios - [CSV Import](/1.0/documentation/examples/csv-import.md): Import CSV files into databases using a powerful read_csv capabilities - [JSON Import](/1.0/documentation/examples/json-import.md): Import JSON files into databases using a powerful read_json capabilities - [MySQL Examples](/1.0/documentation/examples/mysql.md): Transfer examples for MySQL databases - [Oracle Examples](/1.0/documentation/examples/oracle.md): Transfer examples for Oracle databases - [Other Databases](/1.0/documentation/examples/other-databases.md): Transfer examples for ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB - [Parquet Import](/1.0/documentation/examples/parquet-import.md): Import Parquet files into databases using a powerful read_parquet capabilities - [PostgreSQL Examples](/1.0/documentation/examples/postgresql.md): Transfer examples for PostgreSQL databases - [SQL Server Examples](/1.0/documentation/examples/sql-server.md): Transfer examples for SQL Server databases - [Configuration Examples](/1.0/documentation/logging/examples.md): Sample FastTransfer_Settings.json configurations - [Log Database](/1.0/documentation/logging/log-database.md): Configure database logging in FastTransfer - [Log Files Names Mapping using variables](/1.0/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/1.0/documentation/logging/logs-level.md): Configure FastTransfer log levels - [Logging Overview](/1.0/documentation/logging/Overview.md): Overview of FastTransfer logging configuration ### installation Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. - [Installation](/1.0/installation.md): Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. ### integration - [Apache Airflow](/1.0/integration/airflow-integration.md): Integrate FastTransfer with Apache Airflow using the DockerOperator. Build DAGs to schedule and monitor data transfer pipelines. - [Docker](/1.0/integration/docker-integration.md): Run FastTransfer in Docker with the official container image. Pull from DockerHub, configure volumes, and automate data transfers. - [Kestra](/1.0/integration/kestra-integration.md): Orchestrate FastTransfer workflows with Kestra. Schedule and automate data transfers using Docker Run or Shell command plugins. - [PostgreSQL](/1.0/integration/postgresql-integration.md): Run FastTransfer directly from PostgreSQL with the pg_fasttransfer extension. Execute data transfers via SQL functions natively. - [SQL Server](/1.0/integration/sqlserver-integration.md): Integrate FastTransfer with SQL Server using CLR stored procedures. Run data transfers directly from T-SQL with FastWrappers-TSQL. ### release-notes - [Release Notes 0.16](/1.0/release-notes/release-notes-0.16.md): What's new in FastTransfer 0.16 - [Release Notes 0.17](/1.0/release-notes/release-notes-0.17.md): What's new in FastTransfer 0.17 - [Release Notes 0.18](/1.0/release-notes/release-notes-0.18.md): What's new in FastTransfer 0.18 - [Release Notes 1.0](/1.0/release-notes/release-notes-1.0.md): What's new in FastTransfer 1.0, ADBC connections, Db2 support and the Physical parallel method ### sitemap Complete documentation structure - [Sitemap](/1.0/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastTransfer commands - [FastTransfer Command Wizard](/1.0/wizard.md): Interactive wizard to build FastTransfer commands ## latest Your first FastTransfer data transfer - [Getting Started with FastTransfer](/latest.md): Your first FastTransfer data transfer ### ai - [FastTransfer Agent Skill](/latest/ai/agent-skills.md): Install the official arpe.io agent skill that teaches Claude Code, Codex, Cursor, Copilot and other AI agents to build correct FastTransfer command lines - [FastTransfer MCP Server](/latest/ai/mcp-server.md): Connect Claude, ChatGPT, Cursor, VS Code and other AI assistants to the arpe.io MCP server to build, check and run FastTransfer commands ### documentation - [ADBC Connections](/latest/documentation/cli/adbc_connections.md): Transfer data with the Arpe.io ADBC drivers bundled with FastTransfer - [Advanced Parameters](/latest/documentation/cli/advanced_parameters.md): Advanced configuration options for FastTransfer - [Authentication](/latest/documentation/cli/authentication.md): FastTransfer authentication methods and security - [Backup Sources](/latest/documentation/cli/backup_sources.md): Load tables straight from SQL Server backup files and Oracle RMAN backup sets, without restoring them and without a running database - [Creating the Target Table](/latest/documentation/cli/create_target_table.md): Let FastTransfer create the target table from the source with --loadmode Create, and choose how its column types are derived with --inferdatatype - [License](/latest/documentation/cli/license.md): License configuration for FastTransfer - [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Source Connection Parameters](/latest/documentation/cli/source_connection_parameters.md): Source server, database, and connection configuration - [Target Connection Parameters](/latest/documentation/cli/target_connection_parameters.md): Target server, database, and connection configuration - [Transfer Parameters](/latest/documentation/cli/transfer_parameters.md): Source and target object selection and transfer configuration - [Operating Systems](/latest/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/latest/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [FASTTRANSFER_DATEFORMAT](/latest/documentation/environment-variables/dateformat.md): Format of the date bounds used by the Timepartition parallel method - [FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES](/latest/documentation/environment-variables/loadsteptimeout.md): Control bulk load timeout for msbulk and orabulk operations - [Environment Variables Overview](/latest/documentation/environment-variables/overview.md): Configure FastTransfer runtime behavior with environment variables - [FASTTRANSFER_SORTEDINPUT](/latest/documentation/environment-variables/sortedinput.md): Force sorted input hint for SQL Server bulk copy operations - [ADBC](/latest/documentation/examples/adbc.md): Transfer examples with the ADBC connection types (SQL Server, PostgreSQL, Oracle, Db2, Teradata, Netezza) - [Advanced Scenarios](/latest/documentation/examples/advanced-scenarios.md): Advanced use cases and complex transfer scenarios - [CSV Import](/latest/documentation/examples/csv-import.md): Import CSV files into databases using a powerful read_csv capabilities - [JSON Import](/latest/documentation/examples/json-import.md): Import JSON files into databases using a powerful read_json capabilities - [MySQL Examples](/latest/documentation/examples/mysql.md): Transfer examples for MySQL databases - [Oracle Examples](/latest/documentation/examples/oracle.md): Transfer examples for Oracle databases - [Other Databases](/latest/documentation/examples/other-databases.md): Transfer examples for ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB - [Parquet Import](/latest/documentation/examples/parquet-import.md): Import Parquet files into databases using a powerful read_parquet capabilities - [PostgreSQL Examples](/latest/documentation/examples/postgresql.md): Transfer examples for PostgreSQL databases - [SQL Server Examples](/latest/documentation/examples/sql-server.md): Transfer examples for SQL Server databases - [Configuration Examples](/latest/documentation/logging/examples.md): Sample FastTransfer_Settings.json configurations - [Log Database](/latest/documentation/logging/log-database.md): Configure database logging in FastTransfer - [Log Files Names Mapping using variables](/latest/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/latest/documentation/logging/logs-level.md): Configure FastTransfer log levels - [Logging Overview](/latest/documentation/logging/Overview.md): Overview of FastTransfer logging configuration ### installation Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. - [Installation](/latest/installation.md): Install FastTransfer on Windows, Linux, or macOS. Download, unzip, and verify your high-performance data transfer tool in minutes. ### integration - [Apache Airflow](/latest/integration/airflow-integration.md): Integrate FastTransfer with Apache Airflow using the DockerOperator. Build DAGs to schedule and monitor data transfer pipelines. - [Docker](/latest/integration/docker-integration.md): Run FastTransfer in Docker with the official container image. Pull from DockerHub, configure volumes, and automate data transfers. - [Kestra](/latest/integration/kestra-integration.md): Orchestrate FastTransfer workflows with Kestra. Schedule and automate data transfers using Docker Run or Shell command plugins. - [PostgreSQL](/latest/integration/postgresql-integration.md): Run FastTransfer directly from PostgreSQL with the pg_fasttransfer extension. Execute data transfers via SQL functions natively. - [SQL Server](/latest/integration/sqlserver-integration.md): Integrate FastTransfer with SQL Server using CLR stored procedures. Run data transfers directly from T-SQL with FastWrappers-TSQL. ### release-notes - [Release Notes 0.16](/latest/release-notes/release-notes-0.16.md): What's new in FastTransfer 0.16 - [Release Notes 0.17](/latest/release-notes/release-notes-0.17.md): What's new in FastTransfer 0.17 - [Release Notes 0.18](/latest/release-notes/release-notes-0.18.md): What's new in FastTransfer 0.18 - [Release Notes 1.0](/latest/release-notes/release-notes-1.0.md): What's new in FastTransfer 1.0, ADBC connections, Db2 support and the Physical parallel method - [Release Notes 1.1](/latest/release-notes/release-notes-1.1.md): FastTransfer 1.1: load tables straight from SQL Server and Oracle RMAN backups without restoring them, and let FastTransfer create the target table with the right column types. ### sitemap Complete documentation structure - [Sitemap](/latest/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastTransfer commands - [FastTransfer Command Wizard](/latest/wizard.md): Interactive wizard to build FastTransfer commands --- # Full Documentation Content # Getting Started with FastTransfer FastTransfer is a high-performance **high-performance data ingestion and transfer engine** that enables fast, parallel data movement between different database systems or from files to databases systems. If you haven't installed FastTransfer yet, please check the [Installation](/0.14/installation.md) section first. You can also build your first FastTransfer command using our interactive [Command Builder Wizard](/0.14/wizard.md). [FastTransfer Mini-Demo](https://www.youtube.com/embed/CL3031FWwqo) --- # Advanced Parameters This section covers advanced configuration options for FastTransfer, including tracing, logging, and display settings. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter allows you to specify a custom identifier for tracing the transfer process. This is useful for correlating logs and tracking operations across systems. **Example:** ``` ./FastTransfer \ ... --runid "transfer-2024-01-15-001" \ ... ``` **Syntax:** * Short form: `-R "RunSpanID"` * Long form: `--runid "RunSpanID"` **Default Value:** A random GUID is generated if not specified. Tracing Use a meaningful Run ID to make it easier to search logs and trace specific transfer operations, especially in production environments or when running multiple transfers. ## Settings File[​](#settings-file "Direct link to Settings File") Specify a custom settings file for logging and other configuration options. This allows you to use different configuration profiles for different environments or scenarios. **Example:** ``` ./FastTransfer \ ... --settingsfile "config/production-settings.json" \ ... ``` **Syntax:** * Short form: `-O "file_path"` * Long form: `--settingsfile "file_path"` **Default Value:** `FastTransfer__settings.json` in the same folder as the executable. Configuration File The settings file contains logging configuration, connection settings, and other advanced options. You can maintain separate configuration files for development, staging, and production environments. ## Log Level[​](#log-level "Direct link to Log Level") Override the log level defined in the settings file. This is useful for temporary debugging or troubleshooting without modifying the settings file. **Example:** ``` ./FastTransfer \ ... --loglevel debug \ ... ``` **Syntax:** * Long form: `--loglevel "level"` **Allowed Values:** | Log Level | Description | | ------------- | --------------------------------------------------- | | `debug` | Detailed debugging information | | `information` | General informational messages (default) | | `warning` | Warning messages for potentially harmful situations | | `error` | Error messages for failures | | `fatal` | Fatal error messages for critical failures | **Default Value:** `information` Debugging Use `--loglevel debug` when troubleshooting issues to get the most detailed logging output. Remember to switch back to `information` or `warning` for production use to avoid excessive log volume. ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using advanced parameters: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "sales" ` --query "select * from sales where order_date >= '2024-01-01'" ` --runid "daily-sales-sync-2024-01-15" ` --settingsfile "config/production-settings.json" ` --loglevel information ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "sales" \ --query "select * from sales where order_date >= '2024-01-01'" \ --runid "daily-sales-sync-2024-01-15" \ --settingsfile "config/production-settings.json" \ --loglevel information ``` This example: * Uses a custom Run ID for tracing * Loads configuration from a custom settings file * Sets the log level to information --- # Authentication FastTransfer supports two types of authentication methods depending on your database platform. Authentication can be configured separately for source and target databases. ## Source Authentication[​](#source-authentication "Direct link to Source Authentication") ### Trusted Connection (Source)[​](#trusted-connection-source "Direct link to Trusted Connection (Source)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --sourcetrusted ` ... ``` **Syntax:** * Short form: `-a` * Long form: `--sourcetrusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### SQL Login with Username and Password (Source)[​](#sql-login-with-username-and-password-source "Direct link to SQL Login with Username and Password (Source)") Standard database authentication with explicit credentials for the source database. ``` ./FastTransfer ` ... --sourceuser "myuser" ` --sourcepassword "mypassword" ` ... ``` **Syntax:** * Username: `-u "username"` or `--sourceuser "username"` * Password: `-x "password"` or `--sourcepassword "password"` ## Target Authentication[​](#target-authentication "Direct link to Target Authentication") ### Trusted Connection (Target)[​](#trusted-connection-target "Direct link to Trusted Connection (Target)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --targettrusted ` ... ``` **Syntax:** * Short form: `-A` * Long form: `--targettrusted` ### SQL Login with Username and Password (Target)[​](#sql-login-with-username-and-password-target "Direct link to SQL Login with Username and Password (Target)") Standard database authentication with explicit credentials for the target database. ``` ./FastTransfer ` ... --targetuser "myuser" ` --targetpassword "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--targetuser "username"` * Password: `-X "password"` or `--targetpassword "password"` ## Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use connection string parameters where you pass the user and password directly in the connection string: * `--sourceconnectionstring` for source database connection - see [Source Connection Parameters](/0.14/documentation/cli/source_connection_parameters.md) * `--targetconnectionstring` for target database connection - see [Target Connection Parameters](/0.14/documentation/cli/target_connection_parameters.md) Password Security in Logs All passwords passed either through the `--sourcepassword`, `--targetpassword` parameters or within the `--sourceconnectionstring`, `--targetconnectionstring` parameters are automatically hidden in all logs (Console, Files, and Database). This ensures your credentials remain secure in logging outputs. Tips For Login/Password you can also use the environment variables like FastTransfer\_SOURCEUSER and FastTransfer\_SOURCEPASSWORD for example or store the password in an encrypted file. Up to you to decrypt the file and its content before using it in a shell variable that will be used with FastTransfer. --- # License Configure how FastTransfer retrieves and uses its license file. ## License Parameter[​](#license-parameter "Direct link to License Parameter") Use the `--license` parameter to specify the location or content of your FastTransfer license. By default, FastTransfer will try to use the license file named `FastTransfer.lic` in the same directory as the FastTransfer executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastTransfer supports multiple ways to provide a license: #### 1. File Path[​](#1-file-path "Direct link to 1. File Path") Specify a custom license file path: * Windows * Linux ``` .\FastTransfer.exe ` ... --license "C:\licenses\FastTransfer.lic" ` ... ``` ``` ./FastTransfer \ ... --license "/path/to/licenses/FastTransfer.lic" \ ... ``` #### 2. HTTP(S) Endpoint[​](#2-https-endpoint "Direct link to 2. HTTP(S) Endpoint") Retrieve the license from a remote URL where you put the license content and distribute it using https : * Windows * Linux ``` .\FastTransfer.exe ` ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" ` ... ``` ``` ./FastTransfer \ ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" \ ... ``` #### 3. License Content (Inline)[​](#3-license-content-inline "Direct link to 3. License Content (Inline)") Provide the license content directly. Using a variable or environment variable is recommended. Usefull for Docker or Lambda deployment: * Windows * Linux ``` # Using environment variable $env:FastTransfer_LICENSE = "LICENSE_CONTENT_HERE" .\FastTransfer.exe ` ... --license $env:FastTransfer_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastTransfer.lic" -Raw .\FastTransfer.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FastTransfer_LICENSE="LICENSE_CONTENT_HERE" ./FastTransfer \ ... --license "$FastTransfer_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastTransfer.lic) ./FastTransfer \ ... --license "$license" \ ... ``` **Syntax:** * Long form only: `--license ""` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using a license from a remote server with a database transfer: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" ` --parallelmethod DataDriven ` --degree 4 ` --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` ``` ./FastTransfer \ --sourceconnectiontype "pgsql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourceuser "FastUser" \ --sourcepassword "FastPassword" \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" \ --parallelmethod DataDriven \ --degree 4 \ --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` This example: * Retrieves the license from a remote UNC path * Connects to a PostgreSQL source database * Transfers data to a SQL Server target using bulk insert * Uses DataDriven parallel method with 4 threads * Filters orders from 2024 onwards --- # Parallel Parameters FastTransfer can parallelize data export to significantly improve performance. This section covers the parameters that control parallel execution. ## Parallel Method[​](#parallel-method "Direct link to Parallel Method") Use the `-M` or `--parallelmethod` parameter to specify how data will be split across parallel threads. * Windows * Linux ``` .\FastTransfer.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastTransfer \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Short form: `-m ` * Long form: `--parallelmethod ` ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallelism. **DataDriven** - Use the distinct value of the distributeKeyColumn (which can be a column or an expression) to distribute data. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ctid** - Recommended and exclusive for PostgreSQL and PostgreSQL compatible databases. Use the Ctid pseudo column (for pgsql and pgcopy source only). note Ctid parallel method is for PostgreSQL databases only. **Physloc** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the Physloc range. note Physloc parallel method is for SQL Server databases only. **Random** - Use a modulo on the distributeKeyColumn to distribute data. **Rowid** - For Oracle sources only: use rowid slices. note Rowid parallel method is for Oracle databases only. **RangeId** - Use a numeric range to distribute data (useful with an identity column or sequence without gaps. The column must be numerical). **Ntile** - Use the ntile function to distribute data evenly. Data can be numerical, date, datetime or string. **NZDataSlice** - Netezza source only. Use the data slices to distribute data retrieval. note NZDataSlice parallel method is for Netezza databases only. ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | ------------- | -------- | ------------------------ | ------------------------- | | `None` | | | Any | | `DataDriven` | | | Any | | `Ctid` | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` | | | SQL Server (mssql) | | `Random` | | | Any | | `Rowid` | | | Oracle (oraodp) | | `RangeId` | | | Any | | `Ntile` | | | Any | | `NZDataSlice` | | | Netezza | **Default Value:** `None` When to Use Parallelism If you want to use a parallel export/import use other than None. Try to use Parallelism only if you have a large amount of data to transfer (more than 1M cells). ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `-K` or `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastTransfer will use SQL queries that run in parallel against the source. Each query will have a WHERE clause that retrieves a part of the total data. Information This parameter is mandatory when using methods that require a distributed column: Random, DataDriven, RangeId, or Ntile. * Windows * Linux ``` # Using a column name .\FastTransfer.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastTransfer.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastTransfer \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastTransfer \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Short form: `-K ` * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `-P` or `--degree` parameter to control how many parallel threads will be used for the export. ### DOP Values[​](#dop-values "Direct link to DOP Values") **Positive value (e.g., 4)** - Uses exactly that number of parallel threads. If greater than the number of CPU cores/threads, it will be downscaled to match available cores. **0** - Automatically aligns with the number of cores (or threads if Hyper-Threading is enabled) on the machine. **Negative value (e.g., -2)** - Computed as `number of cores / abs(dop)`. For example, if you have 16 cores and set DOP to -2, the actual DOP will be 8. * Windows * Linux ``` # Use 8 parallel threads .\FastTransfer.exe ` ... --degree 8 ` ... # Auto-detect based on CPU cores .\FastTransfer.exe ` ... --degree 0 ` ... # Use half of available cores .\FastTransfer.exe ` ... --degree -2 ` ... ``` ``` # Use 8 parallel threads ./FastTransfer \ ... --degree 8 \ ... # Auto-detect based on CPU cores ./FastTransfer \ ... --degree 0 \ ... # Use half of available cores ./FastTransfer \ ... --degree -2 \ ... ``` **Syntax:** * Short form: `-P ` * Long form: `--degree ` **Default:** `-2` ## Data Driven Query[​](#data-driven-query "Direct link to Data Driven Query") Use the `-Q` or `--datadrivenquery` parameter when using the DataDriven method to provide a query that returns the list of values that will be used to split the data. This allows you to filter the values that will be exported and used to split the data. * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Short form: `-Q ""` * Long form only: `--datadrivenquery ""` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "select * from orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_ordermonth" ` --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" ` --degree 10 ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "select * from orders" \ --parallelmethod "DataDriven" \ --distributekeycolumn "o_ordermonth" \ --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" \ --degree 10 ``` This example: * Connects to a SQL Server source database on localhost * Transfers data to a SQL Server target database using BulkCopy * Uses trusted authentication for both source and target * Executes a custom query on the orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date (o\_ordermonth column) * Uses a custom query to generate month values (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even though there are 12 months to export) --- # Source Connection Parameters FastTransfer requires connection information to access your source database where data will be extracted. This page covers all source connection-related parameters. ## Source Connection Type[​](#source-connection-type "Direct link to Source Connection Type") Specify the type of source database connection driver to use. This parameter determines how FastTransfer connects to your source database. ``` ./FastTransfer \ ... --sourceconnectiontype mssql \ ... ``` **Syntax:** * Short form: `-c "connection_type"` * Long form: `--sourceconnectiontype "connection_type"` **Available Source Connection Types:** | Connection Type | Description | | --------------- | ---------------------------------------------- | | `clickhouse` | ClickHouse | | `duckdb` | DuckDB | | `duckdbstream` | DuckDB using streaming (more memory efficient) | | `hana` | SAP HANA (.net driver) | | `msoledbsql` | SQL Server OleDB | | `mssql` | SQL Server Native Client (.Net) | | `mysql` | MySQL | | `nzcopy` | Netezza copy (WIP) | | `nzoledb` | Netezza OleDB | | `nzsql` | Netezza Native (.net driver) | | `odbc` | ODBC datasource (DSN must be configured) | | `oledb` | Generic OleDB datasource | | `oraodp` | Oracle ODP.Net | | `pgcopy` | PostgreSQL Copy | | `pgsql` | PostgreSQL Native (.Net) | | `teradata` | Teradata (.Net) | ## Source DSN (Data Source Name)[​](#source-dsn-data-source-name "Direct link to Source DSN (Data Source Name)") If you have chosen an ODBC connection type for the source, you must define the DSN with the `-n` parameter, or alternatively define a connection string using `--sourceconnectionstring`. ``` ./FastTransfer \ ... --sourceconnectiontype odbc \ --sourcedsn "MySourceODBCDataSource" \ ... ``` **Syntax:** * Short form: `-n "DSN_name"` * Long form: `--sourcedsn "DSN_name"` ## Source Provider[​](#source-provider "Direct link to Source Provider") If you have chosen an OLEDB connection type for the source, you must define the OLEDB provider with the `-p` parameter. ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider MSOLEDBSQL \ ... ``` ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider NZOLEDB \ ... ``` **Syntax:** * Short form: `-p "provider_name"` * Long form: `--sourceprovider "provider_name"` ## Source Server[​](#source-server "Direct link to Source Server") Except if you have defined a source connection string, you must define a source server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-s "server"` * Long form: `--sourceserver "server"` ### Source Server Format Examples[​](#source-server-format-examples "Direct link to Source Server Format Examples") The source server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:2433" \ ... ``` or ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:1521/myinstance" \ ... ``` **For Oracle - TNS entry:** ``` ./FastTransfer \ ... --sourceserver "MYTNS" \ ... ``` ## Source Connection String[​](#source-connection-string "Direct link to Source Connection String") Tips You can use a connection string to define the connection to the source database. This connection string will override any other connection parameters and can be used if the other authentication modes are not enough for your case. You can use the connection string for any source connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastTransfer \ ... --sourceconnectionstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--sourceconnectionstring "connection_string"` Password Security in Logs All passwords within the `--sourceconnectionstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Source Database[​](#source-database "Direct link to Source Database") Define the source database name. **Example:** ``` ./FastTransfer \ ... --sourcedatabase "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-d "database_name"` * Long form: `--sourcedatabase "database_name"` --- # Target Connection Parameters FastTransfer requires connection information to access your target database where data will be transferred. This page covers all target connection-related parameters. ## Target Connection Type[​](#target-connection-type "Direct link to Target Connection Type") Specify the type of target database connection driver to use. This parameter determines how FastTransfer connects to your target database. ``` ./FastTransfer \ ... --targetconnectiontype mssql \ ... ``` **Syntax:** * Short form: `-C "connection_type"` * Long form: `--targetconnectiontype "connection_type"` **Available Target Connection Types:** | Connection Type | Description | | ---------------- | -------------------------------------------------------------------------------- | | `clickhousebulk` | ClickHouse BulkCopy | | `duckdb` | DuckDB | | `hanabulk` | SAP HANA | | `msbulk` | SQL Server BulkCopy | | `mysqlbulk` | MySQL BulkCopy | | `nzbulk` | Netezza BulkCopy | | `orabulk` | Oracle BulkCopy | | `oradirect` | Oracle Direct | | `pgcopy` | PostgreSQL using copy (Binary format for postgresql sources and Text for others) | | `pgsql` | PostgreSQL Native (.Net) | | `teradata` | Teradata (.Net) | ## Target Server[​](#target-server "Direct link to Target Server") Except if you have defined a target connection string, you must define a target server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-I "server"` * Long form: `--targetserver "server"` ### Target Server Format Examples[​](#target-server-format-examples "Direct link to Target Server Format Examples") The target server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:3306" \ ... ``` or ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com,1433" \ ... ``` **IP address or DNS name with named instance (SQL Server):** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com\TARGETINSTANCE" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:1521/TARGETPDB" \ ... ``` **For DuckDB - Local file path:** ``` ./FastTransfer \ ... --targetconnectiontype duckdb \ --targetserver "/path/to/target.duckdb" \ ... ``` ## Target Connection String[​](#target-connection-string "Direct link to Target Connection String") Advanced Connection Options You can use a connection string to define the connection to the target database. This connection string will override any other target connection parameters and can be used if the standard authentication modes are not sufficient for your use case. You can use the target connection string for any connection type. The connection string must be enclosed in double quotes. **Example for SQL Server:** ``` ./FastTransfer \ ... --targetconnectionstring "Server=mytargetserver;Database=mytargetdb;User ID=TargetUser;Password=TargetPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Example for PostgreSQL:** ``` ./FastTransfer \ ... --targetconnectionstring "Host=mytargetserver;Database=mytargetdb;Username=TargetUser;Password=TargetPassword;SSL Mode=Require" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--targetconnectionstring "connection_string"` Password Security in Logs All passwords within the `--targetconnectionstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Target Database[​](#target-database "Direct link to Target Database") Define the target database name. **Example:** ``` ./FastTransfer \ ... --targetdatabase "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-D "database_name"` * Long form: `--targetdatabase "database_name"` Matching Schema Requirements The target table must already exist with a compatible schema. FastTransfer does not automatically create target tables. Ensure column data types are compatible between source and target databases. --- # 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[​](#source-configuration "Direct link to Source Configuration") These parameters define what data to extract from the source database. ### Source Schema[​](#source-schema "Direct link to 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"` Required for PostgreSQL Ctid Method This parameter must be set if the PostgreSQL Ctid method is used. ### Source Table[​](#source-table "Direct link to 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"` Required for PostgreSQL Ctid Method This parameter must be set if the PostgreSQL Ctid method is used. ### Query[​](#query "Direct link to 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"` Tips When using a custom query, FastTransfer will execute this query on the source database instead of reading from a table directly. ### File Input[​](#file-input "Direct link to 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"` File Requirement The specified file must exist and contain a valid SQL query. ## Target Configuration[​](#target-configuration "Direct link to Target Configuration") These parameters define where to load the data in the target database. ### Target Schema[​](#target-schema "Direct link to Target Schema") Define the target schema name. **Example:** ``` ./FastTransfer \ ... --targetschema "dbo" \ ... ``` **Syntax:** * Short form: `-S "schema_name"` * Long form: `--targetschema "schema_name"` ### Target Table[​](#target-table "Direct link to Target Table") Define the target table name. **Example:** ``` ./FastTransfer \ ... --targettable "customers" \ ... ``` **Syntax:** * Short form: `-T "table_name"` * Long form: `--targettable "table_name"` ## Load Behavior[​](#load-behavior "Direct link to Load Behavior") These parameters control how data is loaded into the target table. ### Load Mode[​](#load-mode "Direct link to 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 "Direct link to Batch Size") Batch Size for BulkCopy operations. **Example:** ``` ./FastTransfer \ ... --batchsize 500000 \ ... ``` **Syntax:** * Short form: `-B "size"` * Long form: `--batchsize "size"` **Default Value:** `1048576` Performance Tuning 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[​](#use-work-tables "Direct link to 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` When to Use This option is useful in rare scenarios where direct loading causes issues. Work tables act as an intermediate staging area. ### Map Method[​](#map-method "Direct link to 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` Column Mapping 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. --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastTransfer. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastTransfer supports multiple AWS authentication methods, listed in order of precedence: 1. **AWS Credentials File** (recommended for local development) 2. **Environment Variables** (recommended for CI/CD) 3. **IAM Roles** (recommended for AWS infrastructure) ### 1. AWS Credentials File[​](#1-aws-credentials-file "Direct link to 1. AWS Credentials File") The most common method for local development and testing. **Location:** * **Windows:** `C:\Users\YourName\.aws\credentials` * **Linux:** `~/.aws/credentials` **Credentials File Format:** ``` [default] aws_access_key_id = AKIAIOSFODNN7EXAMPLE aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY [production] aws_access_key_id = AKIAI44QH8DHBEXAMPLE aws_secret_access_key = je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY [development] aws_access_key_id = AKIAI44QH8DHBEXAMPLE aws_secret_access_key = je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY ``` **Configuration File (Optional):** Location: `~/.aws/config` ``` [default] region = us-east-1 output = json [profile production] region = eu-west-1 output = json [profile development] region = us-west-2 output = json ``` **Using Profiles with FastTransfer:** ``` # Use default profile ./FastTransfer \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastTransfer \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastTransfer \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" \ --fileoutput "data.parquet" \ ... ``` ### 2. Environment Variables[​](#2-environment-variables "Direct link to 2. Environment Variables") Useful for CI/CD pipelines and containerized environments. * Windows (PowerShell) * Linux ``` # Set AWS credentials $env:AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" $env:AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" $env:AWS_DEFAULT_REGION="us-east-1" # Optional: Session token for temporary credentials $env:AWS_SESSION_TOKEN="FwoGZXIvYXdzEBYaD..." # Run FastTransfer .\\FastTransfer.exe ` ... --directory "s3://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set AWS credentials export AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" export AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" export AWS_DEFAULT_REGION="us-east-1" # Optional: Session token for temporary credentials export AWS_SESSION_TOKEN="FwoGZXIvYXdzEBYaD..." # Run FastTransfer ./FastTransfer \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. IAM Roles (EC2, ECS, Lambda)[​](#3-iam-roles-ec2-ecs-lambda "Direct link to 3. IAM Roles (EC2, ECS, Lambda)") When FastTransfer runs on AWS infrastructure, it can use automatically the instance's IAM role. **No credentials configuration needed!** **Supported AWS Services:** * Amazon EC2 instances * Amazon ECS tasks * AWS Lambda functions * AWS Batch jobs * Amazon EKS pods (with IAM roles for service accounts) **Example IAM Policy for FastTransfer:** ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:PutObjectAcl", "s3:GetObject" ], "Resource": "arn:aws:s3:::my-bucket/exports/*" }, { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": "arn:aws:s3:::my-bucket" } ] } ``` ## S3 URI Format[​](#s3-uri-format "Direct link to S3 URI Format") ``` s3://bucket-name/path/to/directory/ ``` ### URI Examples[​](#uri-examples "Direct link to URI Examples") ``` # Root of bucket --directory "s3://my-bucket" # Single folder level --directory "s3://my-bucket/exports" # Multiple folder levels --directory "s3://my-bucket/exports/sales/2024" # Hive-style partitioning --directory "s3://my-bucket/data/year=2024/month=01/day=15" ``` ## Complete Examples[​](#complete-examples "Direct link to Complete Examples") ### Basic Export to S3[​](#basic-export-to-s3 "Direct link to Basic Export to S3") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "SalesDB" \ --trusted \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "s3://my-bucket/exports/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" ``` ### Parallel Export with Profile[​](#parallel-export-with-profile "Direct link to Parallel Export with Profile") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "prod-sql-01" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "s3://prod-datalake/sales/orders" ` --fileoutput "orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "OrderID" ` --paralleldegree 8 ` --cloudprofile "production" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "prod-sql-01" \ --database "SalesDB" \ --trusted \ --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "s3://prod-datalake/sales/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "RangeId" \ --distributekeycolumn "OrderID" \ --paralleldegree 8 \ --cloudprofile "production" ``` ### Export with Date Partitioning[​](#export-with-date-partitioning "Direct link to Export with Date Partitioning") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "events" ` --directory "s3://analytics-bucket/events/" ` --fileoutput "events.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "eventmonth" ` --paralleldegree 10 ``` ``` ./FastTransfer \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "analytics" \ --user "postgres" \ --password "postgres" \ --sourceschema "public" \ --sourcetable "events" \ --directory "s3://analytics-bucket/events/" \ --fileoutput "events.parquet" \ --parallelmethod "DataDriven" \ --distributekeycolumn "eventmonth" \ --paralleldegree 10 ``` ## S3-Compatible Storage[​](#s3-compatible-storage "Direct link to S3-Compatible Storage") FastTransfer works with S3-compatible storage services like MinIO, DigitalOcean Spaces, Wasabi, and OVH Object Storage. ### Configuration for S3-Compatible Services[​](#configuration-for-s3-compatible-services "Direct link to Configuration for S3-Compatible Services") * Windows (PowerShell) * Linux ``` # Set endpoint URL for S3-compatible service $env:AWS_ACCESS_KEY_ID="your-access-key" $env:AWS_SECRET_ACCESS_KEY="your-secret-key" $env:S3_ENDPOINT="https://s3.your-provider.com" # For MinIO $env:S3_ENDPOINT="http://localhost:9000" ``` ``` # Set endpoint URL for S3-compatible service export AWS_ACCESS_KEY_ID="your-access-key" export AWS_SECRET_ACCESS_KEY="your-secret-key" export S3_ENDPOINT="https://s3.your-provider.com" # For MinIO export S3_ENDPOINT="http://localhost:9000" ``` ## Required Permissions[​](#required-permissions "Direct link to Required Permissions") ### Minimum Permissions[​](#minimum-permissions "Direct link to Minimum Permissions") ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject" ], "Resource": "arn:aws:s3:::my-bucket/exports/*" } ] } ``` ### Recommended Permissions[​](#recommended-permissions "Direct link to Recommended Permissions") ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:PutObjectAcl", "s3:GetObject", "s3:DeleteObject" ], "Resource": "arn:aws:s3:::my-bucket/exports/*" }, { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": "arn:aws:s3:::my-bucket", "Condition": { "StringLike": { "s3:prefix": "exports/*" } } } ] } ``` --- # Azure Configuration Complete guide for configuring Azure Blob Storage and Azure Data Lake Gen2 connectivity with FastTransfer. ## Supported Azure Storage Services[​](#supported-azure-storage-services "Direct link to Supported Azure Storage Services") | Service | Protocol | Best For | | ------------------------ | ---------- | ---------------------------------------------- | | **Azure Blob Storage** | `abs://` | General-purpose object storage | | **Azure Data Lake Gen2** | `abfss://` | Big data analytics and hierarchical namespaces | ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastTransfer supports multiple Azure authentication methods: 1. **Azure CLI** (recommended for local development) 2. **Connection String** (simple but less secure) 3. **Storage Account Key** (via environment variables) 4. **Managed Identity** (recommended for Azure infrastructure) ### 1. Azure CLI[​](#1-azure-cli "Direct link to 1. Azure CLI") The simplest method for local development and testing. **Setup:** ``` # Install Azure CLI # Windows: Download from https://aka.ms/installazurecliwindows # Linux: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # Login to Azure az login # List subscriptions az account list --output table # Set active subscription (if you have multiple) az account set --subscription "My Subscription Name" # or by ID az account set --subscription "12345678-1234-1234-1234-123456789abc" # Verify access to storage account az storage account show --name mystorageaccount --resource-group myresourcegroup ``` FastTransfer will automatically use the Azure CLI's authentication credentials. **Using with FastTransfer:** ``` # No additional configuration needed - just run FastTransfer ./FastTransfer \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" \ --fileoutput "data.parquet" \ ... ``` ### 2. Connection String[​](#2-connection-string "Direct link to 2. Connection String") Useful for CI/CD pipelines and automated workflows. **Get Connection String:** * Azure Portal * Azure CLI 1. Navigate to your Storage Account 2. Go to **Security + networking** → **Access keys** 3. Copy the **Connection string** for key1 or key2 ``` az storage account show-connection-string \ --name mystorageaccount \ --resource-group myresourcegroup \ --output tsv ``` **Set Connection String:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=xxxxx;EndpointSuffix=core.windows.net" # Run FastTransfer .\\FastTransfer.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/container/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=xxxxx;EndpointSuffix=core.windows.net" # Run FastTransfer ./FastTransfer \ ... --directory"abs://mystorageaccount.blob.core.windows.net/mycontaner/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Storage Account Key[​](#3-storage-account-key "Direct link to 3. Storage Account Key") Alternative to connection string using separate environment variables. **Get Storage Account Key:** * Azure Portal * Azure CLI 1. Navigate to your Storage Account 2. Go to **Security + networking** → **Access keys** 3. Copy **key1** or **key2** ``` az storage account keys list \ --account-name mystorageaccount \ --resource-group myresourcegroup \ --query "[0].value" \ --output tsv ``` **Set Environment Variables:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_CLIENT_ID="" $env:AZURE_TENANT_ID="" $env:AZURE_CLIENT_SECRET="" # Run FastTransfer .\\FastTransfer.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontaner/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_CLIENT_ID="" export AZURE_TENANT_ID="" export AZURE_CLIENT_SECRET="" # Run FastTransfer ./FastTransfer \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontaner/exports" \ --fileoutput "data.parquet" \ ... ``` ### 4. Managed Identity[​](#4-managed-identity "Direct link to 4. Managed Identity") When FastTransfer runs on Azure infrastructure, it can use Managed Identity automatically. **No credentials configuration needed!** **Supported Azure Services:** * Azure Virtual Machines * Azure App Service * Azure Functions * Azure Container Instances * Azure Kubernetes Service (AKS) **Enable System-Assigned Managed Identity:** * Azure Portal * Azure CLI 1. Navigate to your Azure resource (VM, App Service, etc.) 2. Go to **Identity** 3. Enable **System assigned** identity 4. Save changes ``` # For a VM az vm identity assign --name myVM --resource-group myResourceGroup # For an App Service az webapp identity assign --name myAppService --resource-group myResourceGroup ``` **Grant Storage Access:** ``` # Get the Managed Identity Object ID PRINCIPAL_ID=$(az vm show --name myVM --resource-group myResourceGroup --query identity.principalId -o tsv) # Assign Storage Blob Data Contributor role az role assignment create \ --assignee $PRINCIPAL_ID \ --role "Storage Blob Data Contributor" \ --scope "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") ### URI Format[​](#uri-format "Direct link to URI Format") ``` abs://storageaccount.blob.core.windows.net/container/path/ ``` ### URI Examples[​](#uri-examples "Direct link to URI Examples") ``` # Root of container --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/" # Folder in container --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" # Nested folders --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports/sales/2024" # Date partitioning --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/yearmonth=202401/" ``` ### Complete Examples[​](#complete-examples "Direct link to Complete Examples") **Basic Export:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Customers" ` --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports/customers" ` --fileoutput "customers.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "SalesDB" \ --trusted \ --sourceschema "dbo" \ --sourcetable "Customers" \ --directory "abs://mystorageaccount.blob.core.windows.net/container/exports/customers" \ --fileoutput "customers.parquet" ``` **Parallel Export with Query:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" ` --directory "abs://mystorageaccount.blob.core.windows.net/container/exports/orders" ` --fileoutput "orders_2024.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ``` ``` ./FastTransfer \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "ecommerce" \ --user "postgres" \ --password "postgres" \ --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" \ --directory "abs://mystorageaccount.blob.core.windows.net/container/exports/orders" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Random" \ --distributekeycolumn "order_id" \ --paralleldegree 8 ``` ## Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Azure Data Lake Storage Gen2 is recommended for analytics workloads due to hierarchical namespace support and better performance. ### URI Format[​](#uri-format-1 "Direct link to URI Format") ``` abfss://container@storageaccount.dfs.core.windows.net/path/ ``` Key Differences from Blob Storage * **Protocol:** `abfss://` instead of `abs://` * **Endpoint:** `.dfs.core.windows.net` instead of `.blob.core.windows.net` * **Features:** Hierarchical namespace, directory-level operations, better performance ### URI Examples[​](#uri-examples-1 "Direct link to URI Examples") ``` # Root of filesystem --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake" # Folder in filesystem --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake/raw/sales" # Hive-style partitioning --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake/sales/yearmonth=202401" ``` ### Complete Examples[​](#complete-examples-1 "Direct link to Complete Examples") **Basic Export:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake/raw/{sourcetable}/" ` --fileoutput "FactSales.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "DataWarehouse" \ --trusted \ --sourceschema "dbo" \ --sourcetable "FactSales" \ --directory "abfss://datalake@mystorageaccount.dfs.core.windows.net/raw/{sourcetable}/" \ --fileoutput "FactSales.parquet" ``` **Parallel Export with Partitioning:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "Analytics" ` --trusted ` --query "SELECT * FROM Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/mycontainer/{sourcedatabase}/events/" ` --fileoutput "events.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "EventDate" ` --datadrivenquery "SELECT RefDate From Calendar WHERE RefDate between '2024-01-01' and '2024-03-01'" ` --paralleldegree 12 ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "Analytics" \ --trusted \ --query "SELECT * FROM Events" \ --directory "abfss://mystorageaccount.dfs.core.windows.net/mycontainer/{sourcedatabase}/events/" \ --fileoutput "events.parquet" \ --parallelmethod "DataDriven" \ --distributekeycolumn "EventDate" \ --datadrivenquery "SELECT RefDate From Calendar WHERE RefDate between '2024-01-01' and '2024-03-01'" \ --paralleldegree 12 ``` ## Required Permissions[​](#required-permissions "Direct link to Required Permissions") ### Azure RBAC Roles[​](#azure-rbac-roles "Direct link to Azure RBAC Roles") **Recommended Role:** * **Storage Blob Data Contributor** - Full read/write access to blobs **Alternative Roles:** * **Storage Blob Data Owner** - Full access including ACL management * **Storage Blob Data Reader** - Read-only access (for verification) ### Assign Role via Azure Portal[​](#assign-role-via-azure-portal "Direct link to Assign Role via Azure Portal") 1. Navigate to your Storage Account 2. Go to **Access Control (IAM)** 3. Click **Add** → **Add role assignment** 4. Select **Storage Blob Data Contributor** 5. Select user, group, or managed identity 6. Click **Save** ### Assign Role via Azure CLI[​](#assign-role-via-azure-cli "Direct link to Assign Role via Azure CLI") ``` # For a user az role assignment create \ --assignee user@example.com \ --role "Storage Blob Data Contributor" \ --scope "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}" # For a managed identity az role assignment create \ --assignee {managed-identity-object-id} \ --role "Storage Blob Data Contributor" \ --scope "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}" ``` --- # Google Cloud Storage Configuration Complete guide for configuring Google Cloud Storage connectivity with FastTransfer. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastTransfer supports multiple Google Cloud authentication methods: 1. **gcloud CLI** (recommended for local development) 2. **Service Account Key File** (recommended for production) 3. **Default Application Credentials** (for GCP infrastructure) ### 1. gcloud CLI (Recommended)[​](#1-gcloud-cli-recommended "Direct link to 1. gcloud CLI (Recommended)") The simplest method for local development and testing. **Setup:** ``` # Install gcloud CLI # Windows: Download from https://cloud.google.com/sdk/docs/install # Linux: curl https://sdk.cloud.google.com | bash # Initialize gcloud gcloud init # Login to Google Cloud gcloud auth login # List available projects gcloud projects list # Set active project gcloud config set project my-project-id # Create application default credentials gcloud auth application-default login ``` FastTransfer will automatically use the gcloud CLI's authentication credentials. **Using with FastTransfer:** ``` # No additional configuration needed - just run FastTransfer ./FastTransfer \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 2. Service Account Key File[​](#2-service-account-key-file "Direct link to 2. Service Account Key File") Recommended for production environments, CI/CD pipelines, and automated workflows. **Create Service Account:** * Google Cloud Console * gcloud CLI 1. Go to [IAM & Admin → Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) 2. Click **Create Service Account** 3. Enter name (e.g., "FastTransfer-export") 4. Click **Create and Continue** 5. Grant **Storage Object Admin** role 6. Click **Continue** → **Done** 7. Click on the service account 8. Go to **Keys** tab 9. Click **Add Key** → **Create new key** 10. Select **JSON** format 11. Click **Create** (JSON file will download) ``` # Create service account gcloud iam service-accounts create FastTransfer-export \ --display-name="FastTransfer Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:FastTransfer-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/FastTransfer-key.json \ --iam-account=FastTransfer-export@my-project-id.iam.gserviceaccount.com ``` **Use Service Account Key:** * Windows (PowerShell) * Linux ``` # Set path to service account key file $env:GOOGLE_APPLICATION_CREDENTIALS="C:\keys\FastTransfer-key.json" # Run FastTransfer .\\FastTransfer.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/FastTransfer-key.json" # Run FastTransfer ./FastTransfer \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastTransfer runs on Google Cloud infrastructure, it automatically uses the default service account. **No credentials configuration needed!** **Supported GCP Services:** * Compute Engine instances * Google Kubernetes Engine (GKE) pods * Cloud Run services * Cloud Functions * App Engine **Verify Default Credentials:** ``` gcloud auth application-default print-access-token ``` ## GCS URI Format[​](#gcs-uri-format "Direct link to GCS URI Format") ``` gs://bucket-name/path/to/directory/ ``` ### URI Examples[​](#uri-examples "Direct link to URI Examples") ``` # Root of bucket --directory "gs://my-bucket" # Single folder level --directory "gs://my-bucket/exports" # Multiple folder levels --directory "gs://my-bucket/exports/sales/2024" # Hive-style partitioning --directory "gs://my-bucket/data/year=2024/month=01/day=15" ``` ## Complete Examples[​](#complete-examples "Direct link to Complete Examples") ### Basic Export to GCS[​](#basic-export-to-gcs "Direct link to Basic Export to GCS") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "SalesDB" \ --trusted \ --sourceschema "dbo" \ --sourcetable "Orders" \ --directory "gs://my-bucket/exports/orders" \ --fileoutput "orders.parquet" ``` ### Parallel Export with Query[​](#parallel-export-with-query "Direct link to Parallel Export with Query") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" ` --directory "gs://analytics-bucket/events/2024" ` --fileoutput "events.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ``` ``` ./FastTransfer \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "analytics" \ --user "postgres" \ --password "postgres" \ --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" \ --directory "gs://analytics-bucket/events/2024" \ --fileoutput "events.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 10 ``` ### Export with Date Partitioning[​](#export-with-date-partitioning "Direct link to Export with Date Partitioning") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "ecommerce" ` --user "root" ` --password "password" ` --sourceschema "ecommerce" ` --sourcetable "orders" ` --directory "gs://datalake-bucket/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 8 ``` ``` ./FastTransfer \ --connectiontype "mysql" \ --server "localhost" \ --port "3306" \ --database "ecommerce" \ --user "root" \ --password "password" \ --sourceschema "ecommerce" \ --sourcetable "orders" \ --directory "gs://datalake-bucket/orders/" \ --fileoutput "orders.parquet" \ --parallelmethod "DataDriven" \ --distributekeycolumn "o_orderdate" \ --paralleldegree 8 ``` ### Export from Oracle to GCS using Rowid parallelmethod[​](#export-from-oracle-to-gcs-using-rowid-parallelmethod "Direct link to Export from Oracle to GCS using Rowid parallelmethod") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "gs://warehouse-bucket/oracle-export/orders" ` --fileoutput "orders.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 8 ``` ``` ./FastTransfer \ --connectiontype "oraodp" \ --server "localhost:1521/ORCLPDB1" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "gs://warehouse-bucket/oracle-export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Rowid" \ --paralleldegree 8 \ --merge "True" ``` ## Bucket Configuration[​](#bucket-configuration "Direct link to Bucket Configuration") ### Create Bucket[​](#create-bucket "Direct link to Create Bucket") * Google Cloud Console * gcloud CLI 1. Go to [Cloud Storage → Buckets](https://console.cloud.google.com/storage/browser) 2. Click **Create Bucket** 3. Enter bucket name (globally unique) 4. Choose location type and region 5. Choose storage class (Standard, Nearline, Coldline, Archive) 6. Set access control (Uniform or Fine-grained) 7. Click **Create** ``` # Create bucket in us-central1 gsutil mb -l us-central1 gs://my-bucket # Create bucket with specific storage class gsutil mb -c STANDARD -l us-central1 gs://my-bucket # Set uniform bucket-level access gsutil uniformbucketlevelaccess set on gs://my-bucket ``` ## Required Permissions[​](#required-permissions "Direct link to Required Permissions") ### IAM Roles[​](#iam-roles "Direct link to IAM Roles") **Recommended Roles:** * **Storage Object Creator** (`roles/storage.objectCreator`) - Create objects only * **Storage Object Viewer** (`roles/storage.objectViewer`) - Read objects only ### Grant Access via Console[​](#grant-access-via-console "Direct link to Grant Access via Console") 1. Go to [Cloud Storage → Buckets](https://console.cloud.google.com/storage/browser) 2. Click bucket name 3. Go to **Permissions** tab 4. Click **Grant Access** 5. Enter principal (user, service account, or group) 6. Select role (e.g., **Storage Object Admin**) 7. Click **Save** ### Grant Access via gcloud CLI[​](#grant-access-via-gcloud-cli "Direct link to Grant Access via gcloud CLI") ``` # Grant to service account gsutil iam ch serviceAccount:FastTransfer-export@my-project-id.iam.gserviceaccount.com:roles/storage.objectAdmin gs://my-bucket ``` ### Minimal Permissions[​](#minimal-permissions "Direct link to Minimal Permissions") Minimum permissions for FastTransfer instead of bucket storage admin: * `storage.objects.create` - Upload objects * `storage.objects.delete` - Delete objects (for overwrite) * `storage.objects.get` - Read objects (for verification) * `storage.objects.list` - List objects in bucket --- # OneLake Configuration * 1 - In Entra : Create an application account in your tenant * 2 - In Entra : Create a secret for this application * 3 - In Entra : Grant the application on PowerBI Service in API Permission * 4 - In Fabric : Give the Service principal created in step 1, the Admin Role in your workspace in you shell set environment variables * Windows * Linux ``` $env:AZURE_TENANT_ID="YOUR_TENANT_ID" $env:AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" $env:AZURE_CLIENT_SECRET="Your_AZCLient_Secret" .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "sales" ` --sourcetable "orders" ` --query "SELECT * FROM orders WHERE order_date between '2024-01-01' and '2024-12-31'" ` --directory "onelakes://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" ` --fileoutput "orders_2024.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 8 ``` ``` export AZURE_TENANT_ID="YOUR_TENANT_ID" export AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" export AZURE_CLIENT_SECRET="Your_AZCLient_Secret" ./FastTransfer ` --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "ecommerce" \ --user "postgres" \ --password "postgres" \ --sourceschema "sales"\ --sourcetable "orders" \ --query "SELECT * FROM orders WHERE order_date between '2024-01-01' and '2024-12-31'" \ --directory "onelakes://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastTransfer provides native support for exporting data directly to major cloud storage platforms without requiring intermediate local storage. ## Supported Platforms[​](#supported-platforms "Direct link to Supported Platforms") | Platform | Protocol | Authentication Methods | | ------------------------- | ------------ | ----------------------------------------------------------- | | **AWS S3** | `s3://` | Credentials file, Environment variables, IAM roles | | **Azure Blob Storage** | `abs://` | Azure CLI, Connection string, Access keys, Managed Identity | | **Azure Data Lake Gen2** | `abfss://` | Azure CLI, Connection string, Access keys, Managed Identity | | **Google Cloud Storage** | `gs://` | gcloud CLI, Service account, Default credentials | | **S3-Compatible Storage** | `s3://` | Credentials file, Environment variables | | **OneLake** | `onelake://` | Azure CLI, Connection string, Access keys, Managed Identity | ## Key Features[​](#key-features "Direct link to Key Features") ### Direct Upload[​](#direct-upload "Direct link to Direct Upload") Export data directly to cloud storage without local disk space requirements. note FastTransfer will use multi-part uploads for all cloud provider Warning Since FastTransfer can be cancelled, killed, or crash unexpectedly, any multipart uploads it initiates may remain incomplete. These unfinished multipart uploads continue to occupy storage and may incur additional costs. To prevent this, **you should configure a lifecycle management rule on your bucket to automatically delete incomplete multipart uploads older than x days**. ### Multiple Authentication Methods[​](#multiple-authentication-methods "Direct link to Multiple Authentication Methods") FastTransfer supports multiple authentication mechanisms, including CLI profiles, credentials files, environment variables, and cloud-native identity solutions. Authentication is resolved through a fallback chain, in the following order: * The `--cloudprofile` option is used first, if provided. * Standard authentication environment variables are used as the first fallback. * Managed Identity is used as the second fallback. * An IAM role/profile is used as the final fallback. ### Profile Management[​](#profile-management "Direct link to Profile Management") Use the `--cloudprofile` parameter can allow you to switch between different cloud accounts and environments (development, staging, production). ### Automatic Retry[​](#automatic-retry "Direct link to Automatic Retry") Built-in retry logic for network failures and transient cloud service errors. ## Quick Start[​](#quick-start "Direct link to Quick Start") ### 1. Configure Cloud Authentication[​](#1-configure-cloud-authentication "Direct link to 1. Configure Cloud Authentication") Choose your cloud provider and follow the setup guide: * [AWS S3 Setup](/0.14/documentation/cloud-connectivity/aws-s3.md) * [Azure Setup](/0.14/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage Setup](/0.14/documentation/cloud-connectivity/google-cloud.md) ### 2. Export to Cloud[​](#2-export-to-cloud "Direct link to 2. Export to Cloud") Use the appropriate URI scheme in the `--directory` parameter: ``` # AWS S3 & S3-Compatible ./FastTransfer / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastTransfer \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastTransfer \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastTransfer \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastTransfer \ ... --directory "onelake://MyWorSpace/MyLakeHouse/MyDir/" \ --fileoutput "data.parquet" \ ... ``` ### 3. Use Profiles[​](#3-use-profiles "Direct link to 3. Use Profiles") Switch between different cloud accounts: ``` ./FastTransfer \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastTransfer \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastTransfer supports Windows, Linux, and macOS across different architectures. ## Supported Operating Systems[​](#supported-operating-systems "Direct link to Supported Operating Systems") * Windows * Linux | OS | Versions | Architectures | Supported | | ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------- | --------- | | Nano Server | 2025, 2022, 2019 | x64 | | | Windows | 11 24H2 (IoT), 11 24H2 (E), 11 24H2, 11 23H2, 11 22H2 (E), 10 22H2, 10 21H2 (E), 10 21H2 (IoT), 10 1809 (E), 10 1607 (E) | x64 | | | Windows Server | 2025, 23H2, 2022, 2019, 2016, 2012-R2, 2012 | x64 | | | Windows Server Core | 2025, 2022, 2019, 2016, 2012-R2, 2012 | x64 | | | OS | Versions | Architectures | Supported | | ------------------------ | -------------------------- | ------------- | --------- | | Alpine | 3.21, 3.20, 3.19, 3.18 | Arm64, x64 | | | Azure Linux | 3.0 | Arm64, x64 | | | CentOS Stream | 10, 9 | Arm64, x64 | | | Debian | 12 | Arm64, x64 | | | Fedora | 41, 40 | Arm64, x64 | | | openSUSE Leap | 15.6 | Arm64, x64 | | | Red Hat Enterprise Linux | 10, 9, 8 | Arm64, x64 | | | SUSE Enterprise Linux | 15.6 | Arm64, x64 | | | Ubuntu | 24.10, 24.04, 22.04, 20.04 | Arm64, x64 | | --- # Database Sources & Platforms FastTransfer supports a wide range of database systems across different platforms. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") | Source | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **ClickHouse** | | | | | **DuckDB** | | | | | **MySQL** | | | | | **Netezza** | | | | | **ODBC** | | | | | **OLEDB** | | | | | **Oracle** | | | | | **PostgreSQL** | | | | | **SQL Server** | | | | | **SAP Hana** | | | | | **Teradata** | | | | ## Supported Targets[​](#supported-targets "Direct link to Supported Targets") | Target | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **ClickHouse** | | | | | **DuckDB** | | | | | **MySQL** | | | | | **Netezza** | | | | | **ODBC** | | | | | **OLEDB** | | | | | **Oracle** | | | | | **PostgreSQL** | | | | | **SQL Server** | | | | | **SAP Hana** | | | | | **Teradata** | | | | --- # Advanced Scenarios Advanced use cases including DuckDB integration, ClickHouse, SAP HANA, Teradata, and other complex transfer scenarios. ## DuckDB Integration[​](#duckdb-integration "Direct link to DuckDB Integration") DuckDB provides powerful data transformation capabilities with FastTransfer. ### DuckDB Memory - Parquet with Nested Fields to MSSQL[​](#duckdb-memory---parquet-with-nested-fields-to-mssql "Direct link to DuckDB Memory - Parquet with Nested Fields to MSSQL") Process complex nested JSON/Parquet files with DuckDB's in-memory engine: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdb" ` --sourceserver ":memory:" ` --query "select * EXCLUDE(Risques, Interlocuteurs),unnest(interlocuteurs,recursive := true ) from (select day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) from read_parquet('D:\CLIENTS\ENEDIS\BI4ALL\CHANTIER\**\*.parquet', hive_partitioning=true)) t_row_unest" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "ENDSBI4ALL" ` --targetschema "bi4all" ` --targettable "DuckChantiers_hpart" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "day" ` --loadmode "Truncate" ` --degree 8 ``` DuckDB Memory Mode Use `:memory:` as the server to process data without persisting a DuckDB database file. Perfect for ETL transformations. ### DuckDB Stream - Multiple CSV Files with DataDriven[​](#duckdb-stream---multiple-csv-files-with-datadriven "Direct link to DuckDB Stream - Multiple CSV Files with DataDriven") Process multiple CSV files in parallel using filename as distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - Single Large CSV with Random Method[​](#duckdb-stream---single-large-csv-with-random-method "Direct link to DuckDB Stream - Single Large CSV with Random Method") Process a single large CSV file with parallel Random distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributeKeyColumn "l_orderkey" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - CSV with Column Slicing[​](#duckdb-stream---csv-with-column-slicing "Direct link to DuckDB Stream - CSV with Column Slicing") Use calculated column slices for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --loadmode "Truncate" ` --degree 13 ``` ### DuckDB Stream - CSV with Custom Format[​](#duckdb-stream---csv-with-custom-format "Direct link to DuckDB Stream - CSV with Custom Format") Specify CSV format parameters when auto-detection isn't sufficient: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(id/10000)::int" ` --loadmode "Truncate" ` --degree 12 ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributeKeyColumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## ClickHouse Integration[​](#clickhouse-integration "Direct link to ClickHouse Integration") ### PostgreSQL to ClickHouse - Single-threaded[​](#postgresql-to-clickhouse---single-threaded "Direct link to PostgreSQL to ClickHouse - Single-threaded") Transfer data to ClickHouse without parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ### PostgreSQL to ClickHouse - Parallel with Ctid[​](#postgresql-to-clickhouse---parallel-with-ctid "Direct link to PostgreSQL to ClickHouse - Parallel with Ctid") High-performance transfer using PostgreSQL's Ctid method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL - Multiple Methods[​](#clickhouse-to-postgresql---multiple-methods "Direct link to ClickHouse to PostgreSQL - Multiple Methods") Transfer from ClickHouse to PostgreSQL using various distribution methods: * Single-threaded * RangeId Method * DataDriven Method ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## SAP HANA Integration[​](#sap-hana-integration "Direct link to SAP HANA Integration") ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data to SAP HANA using the HANA bulk loader: **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer from SAP HANA to PostgreSQL: ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## Teradata Integration[​](#teradata-integration "Direct link to Teradata Integration") ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data to Teradata with parallel Ctid method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## Netezza Integration[​](#netezza-integration "Direct link to Netezza Integration") Transfer from Netezza to MSSQL using DATASLICEID for optimal parallelism: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "DATASLICEID" ` --degree 6 ``` Netezza DATASLICEID Use DATASLICEID as the distribution column to leverage Netezza's internal data distribution for optimal parallel extraction. ## Advanced SQL Server Techniques[​](#advanced-sql-server-techniques "Direct link to Advanced SQL Server Techniques") ### Using Partition Functions[​](#using-partition-functions "Direct link to Using Partition Functions") Leverage SQL Server partition functions for efficient parallel transfers: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` Partition Function Syntax Use `` `$PARTITION.FunctionName(ColumnName) `` to reference a partition function. The backtick (`` ` ``) escapes the dollar sign in PowerShell. ### Using Physloc Method[​](#using-physloc-method "Direct link to Using Physloc Method") Use physical location for parallel distribution (readonly tables only): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` Physloc Method The Physloc method should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Dynamic Degree with Negative Values[​](#dynamic-degree-with-negative-values "Direct link to Dynamic Degree with Negative Values") Use negative degree values to automatically calculate parallelism based on CPU cores: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree -4 ` --loadmode "Truncate" ``` Dynamic Degree A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores. With 8 cores, `-4` results in 32 parallel threads. ### Batch Size Optimization[​](#batch-size-optimization "Direct link to Batch Size Optimization") Adjust batch size based on connection type for optimal performance: * **MSSQL (msbulk)**: 10,000 - 100,000 rows * **PostgreSQL (pgcopy)**: 10,000 - 50,000 rows * **Oracle (orabulk)**: 100,000 - 500,000 rows * **Oracle (oradirect)**: 1,000 - 10,000 rows * **ClickHouse**: 10,000 - 1,000,000 rows * **SAP HANA**: 5,000 - 10,000 rows ### Debug Logging[​](#debug-logging "Direct link to Debug Logging") Enable detailed logging for troubleshooting: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` Debug Mode Use `--loglevel "debug"` to see detailed execution steps, connection information, and query generation details for troubleshooting. ## Using Input Files[​](#using-input-files "Direct link to Using Input Files") Process SQL queries from external files: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourcefile "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ## Column Mapping[​](#column-mapping "Direct link to Column Mapping") ### Map by Name[​](#map-by-name "Direct link to Map by Name") Automatically map columns by name (default): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # CSV Import FastTransfer leverages a powerful `read_csv` function to efficiently import CSV files into any supported database. DuckDB provides advanced features like automatic schema detection, parallel processing, and support for complex CSV formats. FastTransfer offers several advantages for CSV processing: * **Automatic schema detection** - No need to manually define column types * **High performance** - Optimized CSV parser with parallel reading * **Flexible formatting** - Handle various delimiters, quotes, and escape characters * **Multi-file support** - Process multiple CSV files with glob patterns * **In-memory processing** - No need for a persistent database file ## Basic CSV Import[​](#basic-csv-import "Direct link to Basic CSV Import") ### Single Small CSV File[​](#single-small-csv-file "Direct link to Single Small CSV File") Import a single CSV file using a streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Using :memory: The `:memory:` server parameter tells FastTransfer to operate in-memory without creating a database file. This is perfect for one-time CSV imports. ### Medium CSV File - Single Thread[​](#medium-csv-file---single-thread "Direct link to Medium CSV File - Single Thread") Import a medium-sized CSV file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel CSV Import[​](#parallel-csv-import "Direct link to Parallel CSV Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(id/10000)::int` divides the ID column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large CSV[​](#random-method-on-large-csv "Direct link to Random Method on Large CSV") Process a large CSV file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributeKeyColumn "l_orderkey" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 13 ``` ## Multiple CSV Files[​](#multiple-csv-files "Direct link to Multiple CSV Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple CSV files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_csv()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Advanced CSV Formats[​](#advanced-csv-formats "Direct link to Advanced CSV Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") When automatic detection doesn't work, specify the CSV format explicitly: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` **Format Parameters:** * `auto_detect=false` - Disable automatic schema detection * `delim=','` - Field delimiter (comma) * `quote='"'` - Quote character for fields containing delimiters * `escape='"'` - Escape character for quotes within quoted fields * `new_line='\n'` - Line terminator * `skip=0` - Number of lines to skip at the start * `comment=''` - Character indicating comment lines to ignore * `header=true` - First line contains column names * `columns={...}` - Explicit column names and types ### CSV with Vector Data to SQL Server[​](#csv-with-vector-data-to-sql-server "Direct link to CSV with Vector Data to SQL Server") Import CSV containing vector embeddings as VARCHAR: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id,url,title,text,title_vector::varchar tv,content_vector::varchar cv,vector_id from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') limit 100" ` --targetconnectiontype "msbulk" ` --targetserver "localhost\SS2025" ` --targettrusted ` --targetdatabase "wikipedia" ` --targetschema "dbo" ` --targettable "wikipedia_articles_embeddings_as_vector" ` --mapmethod "Name" ` --loadmode "Append" ``` ## Common CSV Scenarios[​](#common-csv-scenarios "Direct link to Common CSV Scenarios") ### Tab-Delimited Files[​](#tab-delimited-files "Direct link to Tab-Delimited Files") For tab-separated values (TSV): ``` --query "SELECT * FROM read_csv('file.tsv', delim='\t')" ``` ### CSV with Different Encodings[​](#csv-with-different-encodings "Direct link to CSV with Different Encodings") ``` --query "SELECT * FROM read_csv('file.csv', encoding='UTF-8')" ``` ### CSV with Custom Quote Character[​](#csv-with-custom-quote-character "Direct link to CSV with Custom Quote Character") ``` --query "SELECT * FROM read_csv('file.csv', quote='''', escape='''')" ``` ### CSV Without Headers[​](#csv-without-headers "Direct link to CSV Without Headers") ``` --query "SELECT * FROM read_csv('file.csv', header=false, columns={'col1': 'VARCHAR', 'col2': 'INTEGER'})" ``` ### Skip Header Lines[​](#skip-header-lines "Direct link to Skip Header Lines") ``` --query "SELECT * FROM read_csv('file.csv', skip=3)" ``` --- # JSON Import FastTransfer leverages a powerful `read_json` function to efficiently import JSON files into any supported database. DuckDB provides advanced features like automatic schema detection, nested structure handling, and support for both JSON objects and JSON Lines (JSONL/NDJSON) formats. FastTransfer offers several advantages for JSON processing: * **Automatic schema detection** - Automatically infers column types from JSON structure * **High performance** - Optimized JSON parser with parallel reading * **Nested structure support** - Handle complex nested objects and arrays * **Multiple formats** - Support for JSON, JSON Lines (JSONL), and NDJSON * **Array flattening** - Use `unnest()` to flatten nested arrays * **In-memory processing** - No need for a persistent database file ## Basic JSON Import[​](#basic-json-import "Direct link to Basic JSON Import") ### Single JSON File[​](#single-json-file "Direct link to Single JSON File") Import a single JSON file using a streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\users.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "AppDB" ` --targetschema "dbo" ` --targettable "users" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` JSON Formats FastTransfer automatically detects the JSON format: * **JSON Array**: `[{...}, {...}]` - Array of objects * **JSON Lines (JSONL)**: One JSON object per line * **NDJSON**: Newline-delimited JSON objects ### JSON Lines File - Single Thread[​](#json-lines-file---single-thread "Direct link to JSON Lines File - Single Thread") Import a JSON Lines file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\events.jsonl', format='newline_delimited')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "analytics" ` --targetschema "public" ` --targettable "events" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel JSON Import[​](#parallel-json-import "Direct link to Parallel JSON Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\orders.jsonl')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(order_id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(order_id/10000)::int` divides the order\_id column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large JSON File[​](#random-method-on-large-json-file "Direct link to Random Method on Large JSON File") Process a large JSON Lines file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\transactions.jsonl')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "Random" ` --distributeKeyColumn "transaction_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\logs.jsonl') rjson" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(event_timestamp::date)" ` --datadrivenquery "select distinct event_timestamp::date from read_json('D:\DATA\logs.jsonl') rjson" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple JSON Files[​](#multiple-json-files "Direct link to Multiple JSON Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple JSON files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_json('D:\DATA\daily\*.jsonl', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_metrics" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.jsonl')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_json()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Nested JSON Structures[​](#nested-json-structures "Direct link to Nested JSON Structures") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested JSON structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, user.name as user_name, user.email as user_email, order_date, total_amount FROM read_json('D:\DATA\orders.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within JSON objects: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(items, recursive := true) FROM read_json('D:\DATA\orders_with_items.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structure[​](#complex-nested-structure "Direct link to Complex Nested Structure") Handle deeply nested JSON with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, address.street as street, address.city as city, address.country as country, contacts[1] as primary_contact FROM read_json('D:\DATA\customers.json')" ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "crm" ` --targetuser "crmuser" ` --targetpassword "YourPassword" ` --targetschema "crm" ` --targettable "customers" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Advanced JSON Formats[​](#advanced-json-formats "Direct link to Advanced JSON Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") Specify JSON format explicitly when needed: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\data.json', format='array', maximum_depth=10)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "raw_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` **Format Parameters:** * `format='array'` - JSON array of objects * `format='newline_delimited'` - JSON Lines (JSONL/NDJSON) * `format='auto'` - Automatic detection (default) * `maximum_depth` - Maximum nesting depth to parse * `records='true'` - Parse records format * `columns={...}` - Explicit column names and types ### Compressed JSON Files[​](#compressed-json-files "Direct link to Compressed JSON Files") Import gzip-compressed JSON files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\logs.jsonl.gz', compression='gzip')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "compressed_logs" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Compression Support DuckDB automatically detects compression from file extensions: * `.gz` - Gzip compression * `.json.gz` or `.jsonl.gz` - Compressed JSON files ## JSON Type Conversions[​](#json-type-conversions "Direct link to JSON Type Conversions") ### Converting JSON Fields[​](#converting-json-fields "Direct link to Converting JSON Fields") Transform JSON data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, CAST(amount AS DECIMAL(10,2)) as amount, status FROM read_json('D:\DATA\payments.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "payments" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### JSON String to Array[​](#json-string-to-array "Direct link to JSON String to Array") Convert JSON string fields to arrays: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, json_extract(tags, '$') as tags_array FROM read_json('D:\DATA\products.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "catalog" ` --targetschema "public" ` --targettable "products" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # MySQL Examples Examples for transferring data from and to MySQL databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") MySQL transfers support: * **mysql**: Standard MySQL protocol for reading * **mysqlbulk**: MySQL bulk loader for high-performance target loading ## MySQL to MSSQL - Single-threaded Transfer[​](#mysql-to-mssql---single-threaded-transfer "Direct link to MySQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with Random Method[​](#mysql-to-mssql---parallel-transfer-with-random-method "Direct link to MySQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mysql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MySQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values. **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year(o_orderdate)" ` --degree 10 ` --loadmode Truncate ``` **Using partitioned table with year column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "o_orderdate_year" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "FREEPDB1" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## MSSQL to MySQL - Single-threaded Transfer[​](#mssql-to-mysql---single-threaded-transfer "Direct link to MSSQL to MySQL - Single-threaded Transfer") Transfer data from SQL Server to MySQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Parallel Transfer with Random Method[​](#mssql-to-mysql---parallel-transfer-with-random-method "Direct link to MSSQL to MySQL - Parallel Transfer with Random Method") Transfer with Random distribution. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Using Partition Function[​](#mssql-to-mysql---using-partition-function "Direct link to MSSQL to MySQL - Using Partition Function") Transfer with DataDriven method using SQL Server partition function. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Adding Computed Column[​](#mssql-to-mysql---adding-computed-column "Direct link to MSSQL to MySQL - Adding Computed Column") Transfer with additional computed column and DataDriven method. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select *,null as o_orderdate_year from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores to determine the actual degree of parallelism. ## Using ODBC Connection to MySQL[​](#using-odbc-connection-to-mysql "Direct link to Using ODBC Connection to MySQL") Transfer using ODBC DSN for MySQL connection. ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcename "DSNMySQLTPCH" ` --sourcedatabase "tpch" ` --query "select * from tpch.orders_part LIMIT 10" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for transferring data from and to Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle transfers support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended for source) * **orabulk**: Oracle Bulk Loader for high-performance target loading * **oradirect**: Oracle Direct Path for target loading * **odbc**: Using ODBC DSN ## Oracle to MSSQL - Single-threaded Transfer[​](#oracle-to-mssql---single-threaded-transfer "Direct link to Oracle to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "localhost:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ``` ## Oracle to MSSQL - Parallel Transfer with Rowid Method[​](#oracle-to-mssql---parallel-transfer-with-rowid-method "Direct link to Oracle to MSSQL - Parallel Transfer with Rowid Method") Oracle-specific parallel transfer using physical row identifier (ROWID). Oracle-Specific The Rowid method is unique to Oracle and uses the physical row identifier for parallel data distribution. This is very efficient for full table transfers. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "LOCALHOST:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS_FLAT" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Rowid" ` --loadmode "Truncate" ` --degree 12 ``` ## PostgreSQL to Oracle - Using orabulk (Bulk Loader)[​](#postgresql-to-oracle---using-orabulk-bulk-loader "Direct link to PostgreSQL to Oracle - Using orabulk (Bulk Loader)") Transfer data from PostgreSQL to Oracle using Oracle bulk loader. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## PostgreSQL to Oracle - Using oradirect (Direct Path)[​](#postgresql-to-oracle---using-oradirect-direct-path "Direct link to PostgreSQL to Oracle - Using oradirect (Direct Path)") Transfer data from PostgreSQL to Oracle using Oracle direct path loading. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 1000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "FREEPDB1" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## Using ODBC Connection to Oracle[​](#using-odbc-connection-to-oracle "Direct link to Using ODBC Connection to Oracle") Transfer using ODBC DSN for Oracle connection. **To MSSQL - single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNORA23CFREEPDB1" ` --sourcedatabase "FREEPDB1" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for transferring data from and to ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB databases. ## ClickHouse[​](#clickhouse "Direct link to ClickHouse") Transfer data from and to ClickHouse database. ### PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse using the bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL[​](#clickhouse-to-postgresql "Direct link to ClickHouse to PostgreSQL") Transfer data from ClickHouse to PostgreSQL with various parallelization methods. **Single-threaded:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with RangeId:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Ntile:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Ntile" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Random:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with DataDriven:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ClickHouse Connection Types * **clickhouse**: Standard connection for reading * **clickhousebulk**: High-performance bulk loader for writing ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Transfer data from and to SAP HANA database. ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA using the HANA bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Batch Size For SAP HANA, use batch sizes between 5,000 and 10,000 rows for optimal performance. ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer data from SAP HANA to PostgreSQL. ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Connection Types * **hana**: Standard connection for reading from SAP HANA * **hanabulk**: Bulk loader for writing to SAP HANA ## Netezza[​](#netezza "Direct link to Netezza") Transfer data from Netezza using the DATASLICEID for optimal parallelism. ### Netezza to MSSQL[​](#netezza-to-mssql "Direct link to Netezza to MSSQL") Transfer from Netezza to SQL Server using DataDriven method on DATASLICEID: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "DATASLICEID" ` --degree 6 ` --loadmode Truncate ``` Netezza DATASLICEID The DATASLICEID column in Netezza represents the internal data distribution. Using it as the distribution key provides optimal parallel extraction by leveraging Netezza's data placement. ## Teradata[​](#teradata "Direct link to Teradata") Transfer data from and to Teradata database. ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer data from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## DuckDB[​](#duckdb "Direct link to DuckDB") Transfer data from and to DuckDB database files or in-memory. ### MSSQL to DuckDB File[​](#mssql-to-duckdb-file "Direct link to MSSQL to DuckDB File") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributeKeyColumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### DuckDB Stream - CSV Files[​](#duckdb-stream---csv-files "Direct link to DuckDB Stream - CSV Files") Process CSV files using DuckDB's in-memory engine and load into SQL Server: **Single CSV file:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Multiple CSV files with parallel processing:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` DuckDB Connection Types * **duckdb**: Direct connection to DuckDB file * **duckdbstream**: Streaming connection for in-memory processing or file-based operations * Use `:memory:` as server for in-memory processing tip Build your command with the [Wizard](/latest/wizard.md) --- # Parquet Import FastTransfer leverages a powerful `read_parquet` function to efficiently import Parquet files into any supported database. Parquet is a columnar storage format optimized for analytics, and DuckDB provides excellent performance and feature support for reading Parquet files. FastTransfer offers several advantages for Parquet processing: * **Columnar access** - Read only the columns you need for optimal performance * **Predicate pushdown** - Filter data at the file level before loading * **Automatic schema detection** - Column types preserved from Parquet metadata * **High performance** - Optimized Parquet reader with parallel processing * **Compression support** - Handles all Parquet compression codecs (Snappy, Gzip, LZ4, Zstd) * **Nested structure support** - Handle complex nested objects, arrays, and maps * **Multi-file support** - Process multiple Parquet files with glob patterns * **Partition support** - Hive-style partitioning for efficient data access ## Basic Parquet Import[​](#basic-parquet-import "Direct link to Basic Parquet Import") ### Single Parquet File[​](#single-parquet-file "Direct link to Single Parquet File") Import a single Parquet file using a streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\sales.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "SalesDB" ` --targetschema "dbo" ` --targettable "sales" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Column Selection For optimal performance, select only the columns you need: ``` --query "SELECT customer_id, order_date, total_amount FROM read_parquet('file.parquet')" ``` This reduces I/O and memory usage significantly. ### Multiple Parquet Files - Single Thread[​](#multiple-parquet-files---single-thread "Direct link to Multiple Parquet Files - Single Thread") Import multiple Parquet files using glob pattern: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\orders\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel Parquet Import[​](#parallel-parquet-import "Direct link to Parallel Parquet Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\transactions\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "finance" ` --targetschema "public" ` --targettable "transactions" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(transaction_id/100000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(transaction_id/100000)::int` divides the ID by 100,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large Parquet Files[​](#random-method-on-large-parquet-files "Direct link to Random Method on Large Parquet Files") Process large Parquet files with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "events" ` --parallelmethod "Random" ` --distributeKeyColumn "event_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\logs\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "CAST(event_date AS VARCHAR)" ` --datadrivenquery "select distinct CAST(event_date AS VARCHAR) from read_parquet('D:\DATA\logs\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple Parquet Files[​](#multiple-parquet-files "Direct link to Multiple Parquet Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple Parquet files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_parquet('D:\DATA\daily\*.parquet', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_reports" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_parquet()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Hive-Style Partitioning[​](#hive-style-partitioning "Direct link to Hive-Style Partitioning") ### Reading Partitioned Data[​](#reading-partitioned-data "Direct link to Reading Partitioned Data") Read Parquet files with Hive-style partitioning: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\partitioned\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "warehouse" ` --targetschema "dbo" ` --targettable "partitioned_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Hive Partitioning For data organized like `year=2024/month=01/data.parquet`, DuckDB automatically extracts partition columns: * Partition columns become regular columns in the result * Use `hive_partitioning=true` to enable this feature * Excellent for partition pruning and efficient queries ### Parallel Processing on Partitioned Data[​](#parallel-processing-on-partitioned-data "Direct link to Parallel Processing on Partitioned Data") Use partition columns for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "sales_data" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year || '-' || month" ` --datadrivenquery "select distinct year || '-' || month as partition_key from read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` ## Nested Structures in Parquet[​](#nested-structures-in-parquet "Direct link to Nested Structures in Parquet") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested Parquet structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, customer.name as customer_name, customer.email as customer_email, order_date, total FROM read_parquet('D:\DATA\orders.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(line_items, recursive := true) FROM read_parquet('D:\DATA\orders_nested.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structures[​](#complex-nested-structures "Direct link to Complex Nested Structures") Handle complex nested Parquet data with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) FROM read_parquet('D:\DATA\chantier\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "construction" ` --targetschema "dbo" ` --targettable "site_details" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "day" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 8 ``` ## Advanced Filtering[​](#advanced-filtering "Direct link to Advanced Filtering") ### Predicate Pushdown[​](#predicate-pushdown "Direct link to Predicate Pushdown") Apply filters to reduce data read from Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet') WHERE event_date >= '2024-01-01' AND event_type = 'purchase'" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "purchases" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Append" ``` Predicate Pushdown Benefits DuckDB pushes filters down to the Parquet reader, which: * Skips entire row groups that don't match the filter * Reduces memory usage * Significantly improves performance for selective queries * Works best with filters on partition columns or columns with statistics ### Column Pruning with Selection[​](#column-pruning-with-selection "Direct link to Column Pruning with Selection") Select only needed columns for maximum performance: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT customer_id, order_date, total_amount, status FROM read_parquet('D:\DATA\orders_large.parquet') WHERE order_date >= '2024-01-01'" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "recent_orders" ` --parallelmethod "Random" ` --distributeKeyColumn "customer_id" ` --mapmethod "Name" ` --loadmode "Append" ` --degree 12 ``` ## Schema and Metadata[​](#schema-and-metadata "Direct link to Schema and Metadata") ### Union Multiple Parquet Files[​](#union-multiple-parquet-files "Direct link to Union Multiple Parquet Files") Union Parquet files with compatible schemas: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet(['D:\DATA\2023\*.parquet', 'D:\DATA\2024\*.parquet'], union_by_name=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "archive" ` --targetschema "dbo" ` --targettable "historical_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Union By Name `union_by_name=true` allows reading files with different column orders or optional columns: * Columns are matched by name instead of position * Missing columns are filled with NULL * Extra columns are ignored * Useful for schema evolution scenarios ### Type Conversion[​](#type-conversion "Direct link to Type Conversion") Convert Parquet data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, amount::DECIMAL(18,2) as amount, status FROM read_parquet('D:\DATA\transactions.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # PostgreSQL Examples Comprehensive examples for transferring data from and to PostgreSQL databases using native connectors. ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL transfers support multiple connection types: * **pgsql**: Standard PostgreSQL protocol for reading/writing * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk transfers, binary format) ## PostgreSQL to MSSQL - Single-threaded Transfer[​](#postgresql-to-mssql---single-threaded-transfer "Direct link to PostgreSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization using a SQL query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## PostgreSQL to MSSQL - Using Schema and Table[​](#postgresql-to-mssql---using-schema-and-table "Direct link to PostgreSQL to MSSQL - Using Schema and Table") Transfer specifying schema and table names instead of a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#postgresql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on a calculated column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "FLOOR(o_orderkey/10000000)" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Parallel Transfer with Ctid Method[​](#postgresql-to-mssql---parallel-transfer-with-ctid-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Ctid Method") PostgreSQL-specific parallel transfer using physical row identifier (ctid). PostgreSQL-Specific The Ctid method is unique to PostgreSQL and uses the physical row identifier (ctid) for parallel data distribution. This is very efficient for full table transfers. **For orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` **For lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with Random Method[​](#postgresql-to-mssql---parallel-transfer-with-random-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Dynamic Degree[​](#postgresql-to-mssql---dynamic-degree "Direct link to PostgreSQL to MSSQL - Dynamic Degree") Use negative degree values to automatically determine parallelism. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores to determine the actual degree of parallelism. ## PostgreSQL to MSSQL - Using Input File[​](#postgresql-to-mssql---using-input-file "Direct link to PostgreSQL to MSSQL - Using Input File") Transfer using a SQL query from an external file. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --inputfile "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ## PostgreSQL to PostgreSQL - Using Query[​](#postgresql-to-postgresql---using-query "Direct link to PostgreSQL to PostgreSQL - Using Query") Transfer between PostgreSQL databases using a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --query "select * from ""tpch_10"".orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## PostgreSQL to PostgreSQL - Using Ctid Method[​](#postgresql-to-postgresql---using-ctid-method "Direct link to PostgreSQL to PostgreSQL - Using Ctid Method") Transfer between PostgreSQL databases with parallel Ctid method. * Using pgcopy (Binary COPY) * Using pgsql (INSERT UNNEST) ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgsql" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to PostgreSQL - Using pgcopy Binary[​](#postgresql-to-postgresql---using-pgcopy-binary "Direct link to PostgreSQL to PostgreSQL - Using pgcopy Binary") High-performance transfer using PostgreSQL binary COPY protocol. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Parallel with Ctid - orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` **Parallel with Ctid - lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` ## PostgreSQL to Oracle[​](#postgresql-to-oracle "Direct link to PostgreSQL to Oracle") Transfer data from PostgreSQL to Oracle databases. * Using orabulk (Bulk Load) * Using oradirect (Direct Path) **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 1000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ## PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL (Hyper File) to MSSQL[​](#postgresql-hyper-file-to-mssql "Direct link to PostgreSQL (Hyper File) to MSSQL") Transfer data from a Tableau Hyper file (using pgsql driver) to MSSQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:8095" ` --sourcedatabase "D:\OpenData\TPCH\data\hyper\tpch_sf10.hyper" ` --sourceuser "tableau_internal_user" ` --sourcepassword "" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from ""ORDERS""" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for transferring data from and to SQL Server databases. ## MSSQL to MSSQL - Single-threaded Transfer[​](#mssql-to-mssql---single-threaded-transfer "Direct link to MSSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization for smaller datasets. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with Random Method[​](#mssql-to-mssql---parallel-transfer-with-random-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. * Windows Authentication * SQL Authentication ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with RangeId Method[​](#mssql-to-mssql---parallel-transfer-with-rangeid-method "Direct link to MSSQL to MSSQL - Parallel Transfer with RangeId Method") Transfer using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Using query with filter:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with Ntile Method[​](#mssql-to-mssql---parallel-transfer-with-ntile-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Ntile Method") Transfer using Ntile distribution for evenly distributed chunks. **Full table transfer:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Ntile" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Filtered transfer with date column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "Ntile" ` --distributeKeyColumn "o_orderdate" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mssql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MSSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values of a column or partition function. **Using partition function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "YEAR(o_orderdate)" ` --degree 7 ` --loadmode Append ``` ## MSSQL to MSSQL - Using Physloc Method[​](#mssql-to-mssql---using-physloc-method "Direct link to MSSQL to MSSQL - Using Physloc Method") Transfer using physical location (should only be used on readonly/snapshot databases). warning The Physloc method should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ` --loadmode Truncate ``` ## MSSQL to PostgreSQL[​](#mssql-to-postgresql "Direct link to MSSQL to PostgreSQL") Transfer data from SQL Server to PostgreSQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 10 ` --loadmode "Truncate" ``` ## MSSQL to MySQL[​](#mssql-to-mysql "Direct link to MSSQL to MySQL") Transfer data from SQL Server to MySQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` **With DataDriven method on partitioned table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer data from SQL Server to DuckDB. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## Using ODBC Connection[​](#using-odbc-connection "Direct link to Using ODBC Connection") Transfer using ODBC DSN for connection. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMsSQLTPCH" ` --sourcedatabase "tpch_test" ` --query "select * from dbo.orders LIMIT 1000" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## Dynamic Degree[​](#dynamic-degree "Direct link to Dynamic Degree") Use negative degree values to automatically determine parallelism based on CPU cores. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores to determine the actual degree of parallelism. ## Load Modes[​](#load-modes "Direct link to Load Modes") FastTransfer supports different load modes for the target table: * `Truncate`: Truncates the target table before loading * `Append`: Appends data to existing table (default) Example with Append mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "None" ` --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastTransfer\_Settings.json for Windows[​](#fasttransfer_settingsjson-for-windows "Direct link to FastTransfer_Settings.json for Windows") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastTransferLogs": "Server=localhost;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs\\FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastTransferLogs", "sinkOptionsSection": { "TableName": "EventLogs", "SchemaName": "dbo", "DatabaseName": "FastTransferLogs", "AutoCreateSqlDatabase": true, "AutoCreateSqlTable": true, "BatchPostingLimit": 50, "BatchPeriod": "0.00:00:05", "UseSqlBulkCopy": false }, "restrictedToMinimumLevel": "Information", "columnOptionsSection": { "disableTriggers": true, "clusteredColumnstoreIndex": false, "removeStandardColumns": [ "Id", "MessageTemplate", "Properties", "Exception" ], "additionalColumns": [ { "ColumnName": "ErrorSummary", "PropertyName": "rootcauseMessage", "DataType": "nvarchar", "DataLength": 4000 }, { "ColumnName": "EventType", "PropertyName": "EventType", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "FullTargetName", "PropertyName": "fulltargetname", "DataType": "nvarchar", "DataLength": 400 }, { "ColumnName": "Status", "PropertyName": "finalStatus", "DataType": "int" }, { "ColumnName": "Rows", "PropertyName": "loadedRows", "DataType": "bigint" }, { "ColumnName": "Columns", "PropertyName": "loadedCols", "DataType": "int" }, { "ColumnName": "ElaspedMs", "PropertyName": "loadElapsedMs", "DataType": "bigint" }, { "ColumnName": "MachineName", "PropertyName": "MachineName", "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "Application", "PropertyName": "Application", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "ProcessId", "PropertyName": "ProcessId", "DataType": "int" }, { "ColumnName": "ThreadId", "PropertyName": "ThreadId", "DataType": "int" }, { "ColumnName": "RunId", "PropertyName": "runid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "TraceId", "PropertyName": "traceid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "SpanId", "PropertyName": "SpanId", "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "Release", "PropertyName": "release", "DataType": "varchar", "DataLength": 32 }, { "ColumnName": "EnvironmentUserName", "PropertyName": "EnvironmentUserName", "DataType": "varchar", "DataLength": 200 }, { "ColumnName": "InputParameters", "PropertyName": "InputParameters", "DataType": "varchar", "DataLength": 8000 } ], "level": { "columnName": "Severity", "storeAsEnum": false, "DataType": "varchar", "DataLength": 50 }, "timeStamp": { "columnName": "EventTimestamp", "nonClusteredIndex": true, "convertToUtc": false }, "logEvent": { "excludeAdditionalProperties": false, "excludeStandardColumns": true }, "message": { "columnName": "EventMsg", "DataType": "varchar", "DataLength": 8000 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Linux\_Console\_Files.json[​](#fasttransfer_settings_linux_console_filesjson "Direct link to FastTransfer_Settings_Linux_Console_Files.json") For Linux with Console + Daily rolling Files: ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs/FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Windows.json[​](#fasttransfer_settings_map_for_windowsjson "Direct link to FastTransfer_Settings_Map_for_Windows.json") For Console and dynamically named log file targets (Windows): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "C:\\temp\\Logs\\{logdate}\\{sourcedatabase}\\{sourcetable}\\FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fasttransfer_settings_map_for_linux_and_containerjson "Direct link to FastTransfer_Settings_Map_for_Linux_and_Container.json") For Console and dynamically named log file targets (Linux/Container): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` --- # Log Database If you want to log to a database (mssql or postgresql) you can set the log database location in the setting file (default `FastTransfer_settings.json` file or a custom location and settings file name using `--settingsfile` parameter) You can change the connection string inside the settings file. ## Sample Connection String for mssql[​](#sample-connection-string-for-mssql "Direct link to Sample Connection String for mssql") ``` "MS_FastTransferLogs": "Server=localhost;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" ``` ## Custom Connection Example[​](#custom-connection-example "Direct link to Custom Connection Example") ``` "MS_FastTransferLogs": "Server=mssqlloginstance,2433;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" ``` Use a correct connection string for your log database. A complete configuration example is available in the [Configuration Examples](/0.14/documentation/logging/examples.md#fasttransfer_settingsjson-for-windows) page. Information **In case the database is not reachable, FastTransfer will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastTransfer_settings.json` file to something else (like `FastTransfer_settings.json.save`) and FastTransfer will use the console log only. --- # Log Files Names Mapping using variables You can use variables to define the log file path and files names in the ***FastTransfer\_settings.json*** In the **WriteTo** array you can use a **Map** like that : ``` { "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ] } ``` The available variables to customize log path or log filename are : | Variable Name | Description | | ------------------ | ------------------------------------------- | | `{logdate}` | Current date in yyyy-MM-dd format | | `{logtimestamp}` | Timestamp of the log entry | | `{sourcedatabase}` | Name of the source database | | `{sourceschema}` | Name of the source schema | | `{sourcetable}` | Name of the source table | | `{filename}` | Name of the file being processed | | `{runid}` | Run identifier provided in the command line | | `{traceid}` | Unique identifier generate at runtime | You can find complete configuration examples for both Windows and Linux: * **Windows**: [FastTransfer\_Settings\_Map\_for\_Windows.json](/0.14/documentation/logging/examples.md#fasttransfer_settings_map_for_windowsjson) * **Linux/Container**: [FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json](/0.14/documentation/logging/examples.md#fasttransfer_settings_map_for_linux_and_containerjson) --- # Log Levels FastTransfer uses Serilog for logging and supports multiple log levels to control the verbosity of output. You can set the loglevel using the `--loglevel` parameter followed by a value in the list of available log levels. ## Available Log Levels[​](#available-log-levels "Direct link to Available Log Levels") | Level | Description | Use Case | | --------------- | ------------------------------------ | ----------------------------------- | | **Debug** | Detailed diagnostic information | Development and troubleshooting | | **Information** | General informational messages | Normal operation (default) | | **Warning** | Potentially harmful situations | Issues that don't prevent operation | | **Error** | Error events that allow continuation | Operation failures | | **Fatal** | Severe errors causing termination | Fatal application errors | ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastTransfer_settings.json` file by modifying the `MinimumLevel` property: ``` { "Serilog": { "MinimumLevel": "Debug", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "path": "Logs\\FastTransfer_.json", "rollingInterval": "Day" } } ] } } ``` --- # Logging Overview ## Parameter Logs targets using FastTransfer\_settings.json[​](#parameter-logs-targets-using-fasttransfer_settingsjson "Direct link to Parameter Logs targets using FastTransfer_settings.json") FastTransfer can log information in 3 modes : * **[Console](/0.14/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/0.14/documentation/logging/log-database.md)** * **[File (or Map)](/0.14/documentation/logging/log-files-names-mapping-using-variables.md)** Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastTransfer_settings.json` file. By default if no custom path is provided, FastTransfer looks for the settings file in : * the current directory (the working directory) * the same directory where the FastTransfer executable is located (the executable directory). If this file is not present, FastTransfer will use the console log only. You can specify a custom path to the settings file using the `-f` or `--settingsfile` parameter. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --method "None" ` --settingsfile "D:\logs\config\FastTransfer_settings.json" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --query "select * from orders" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --method "None" \ --settingsfile "/etc/fasttransfer/FastTransfer_settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/0.14/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` Expand-Archive -Path .\FastTransfer.zip -DestinationPath .\FastTransfer ``` You can verify the installation by checking the version: ``` .\FastTransfer.exe --version ``` To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` unzip FastTransfer.zip -d FastTransfer ``` On **Linux**, you need to give execution rights to the FastTransfer binary: ``` chmod +x FastTransfer ```
You can verify the installation by checking the version: ``` ./FastTransfer --version ``` FastTransfer is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)**. Pull the latest version: ``` docker pull arpeio/fasttransfer ``` Or pull a specific version: ``` docker pull arpeio/fasttransfer:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fasttransfer:latest --version ```
**You are now ready to run FastTransfer.** License Information After the trial period you will need a valid license. By default, FastTransfer will try to find a `FastTransfer.lic` file in the same directory as the executable. You can also provide another path, a URL, or even the license content using the `--license` parameter. ## Embedded Drivers[​](#embedded-drivers "Direct link to Embedded Drivers") The following database drivers are embedded in FastTransfer: | Database | Embedded Drivers | | ------------- | ---------------- | | Clickhouse | | | DuckDB | | | MS SQL Server | | | MySQL | | | Netezza | | | Oracle | | | PostgreSQL | | | SAP HANA | | | Teradata | | Warning If you need another database not in the list, you can use ODBC or OLEDB but you will need to install your ODBC or OLEDB drivers of your favorite database. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastTransfer can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: **Image:** `arpeio/fasttransfer:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastTransfer with Airflow, you need to install the Docker provider package: ``` pip install apache-airflow-providers-docker ``` Or add it to your Airflow requirements: ``` apache-airflow-providers-docker ``` ## Configure Airflow Connections[​](#configure-airflow-connections "Direct link to Configure Airflow Connections") Airflow connections allow you to securely store and manage credentials for external systems. FastTransfer integration requires connections for your source and target databases. ### A) Source Database Connection (MSSQL Example)[​](#a-source-database-connection-mssql-example "Direct link to A) Source Database Connection (MSSQL Example)") Create an MSSQL connection for your source database: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **ODBC** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `mssql_tpch10` (or your preferred name) * **Connection Type:** `ODBC` (select this from the dropdown) * **Host:** `192.168.65.254` (your database host) * **Port:** `11433` (your database port) * **Login:** Your database username (e.g., `FastLogin`) * **Password:** Your database password * **Extra:** `{"database":"tpch10"}` tip For ODBC connections, the database name should be specified in the Extra JSON field using `{"database":"your_database_name"}`. ### B) Target Database Connection (PostgreSQL Example)[​](#b-target-database-connection-postgresql-example "Direct link to B) Target Database Connection (PostgreSQL Example)") Create a PostgreSQL connection for your target database: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Postgres** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `pg_target` (or your preferred name) * **Connection Type:** `Postgres` (select this from the dropdown) * **Host:** `192.168.65.254` (your database host) * **Port:** `25433` (your database port) * **Schema:** `postgres` *(this is the database name)* * **Login:** `postgres` (your database username) * **Password:** Your database password tip For Postgres connections, the database name is specified in the **Schema** field. ## Integration with DockerOperator[​](#integration-with-dockeroperator "Direct link to Integration with DockerOperator") The [`DockerOperator`](https://airflow.apache.org/docs/apache-airflow-providers-docker/stable/operators.html) from the Docker provider allows you to execute FastTransfer commands in a Docker container directly from your Airflow DAGs. ### Complete DAG Example[​](#complete-dag-example "Direct link to Complete DAG Example") Create a DAG file (e.g., `fasttransfer_orders_mssql_to_pg.py`) in your Airflow DAGs folder: ``` from datetime import datetime from airflow import DAG from airflow.sdk.bases.hook import BaseHook from airflow.providers.docker.operators.docker import DockerOperator def _conn_parts(conn_id: str): """ Extract connection details from Airflow connection. Works with: - ODBC connections (for MSSQL): database in Extra JSON {"database":"name"} - Postgres connections: database in Schema field Returns: tuple: (host, port, user, password, database) """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # Database in Extra {"database": "..."} (for ODBC MSSQL) or in Schema (for Postgres) db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': database not found. Add it to Extra JSON " f'{{"database":"..."}} (for ODBC) or Schema field (for Postgres).' ) return host, port, user, pwd, db with DAG( dag_id="fasttransfer_orders_mssql_to_pg", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fasttransfer", "mssql", "postgres", "docker"], ) as dag: # Extract connection details mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _conn_parts("mssql_tpch10") pg_host, pg_port, pg_user, pg_pwd, pg_db = _conn_parts("pg_target") # FastTransfer Docker task transfer_task = DockerOperator( task_id="transfer_orders", image="arpeio/fasttransfer:latest", docker_url="tcp://host.docker.internal:2375", api_version="auto", auto_remove="success", mount_tmp_dir=False, # Avoids the remote-engine tmp mount warning do_xcom_push=False, command=[ "--sourceconnectiontype", "mssql", "--sourceserver", f"{mssql_host},{mssql_port}", "--sourcedatabase", mssql_db, "--sourceuser", mssql_user, "--sourcepassword", mssql_pwd, "--sourceschema", "dbo", "--sourcetable", "orders", "--targetconnectiontype", "pgcopy", "--targetserver", f"{pg_host}:{pg_port}", "--targetdatabase", pg_db, "--targetuser", pg_user, "--targetpassword", pg_pwd, "--targetschema", "public", "--targettable", "orders", "--loadmode", "Truncate", "--mapmethod", "Name", "--method", "Ntile", "--degree", "12", "--distributekeycolumn", "o_orderkey", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastTransfer Docker image * `docker_url`: Docker daemon endpoint * `command`: List of FastTransfer CLI arguments * `auto_remove`: Automatically remove the container after successful execution * `mount_tmp_dir`: Set to `False` to avoid warnings with remote Docker daemons ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes a utility function to streamline connection management: #### `_conn_parts(conn_id)`[​](#_conn_partsconn_id "Direct link to _conn_partsconn_id") Extracts connection details from an Airflow connection. This function: * Retrieves host, port, username, and password from the connection * Extracts the database name from either the Extra JSON field (for ODBC connections) or the Schema field (for Postgres connections) * Returns all components needed to build the FastTransfer connection parameters * Validates that all required fields are present This approach ensures that credentials are managed centrally in Airflow and never hardcoded in DAG files. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Airflow and can be viewed in the Airflow UI: 1. Navigate to **DAGs** in the Airflow UI 2. Click on your DAG (e.g., `fasttransfer_orders_mssql_to_pg`) 3. Click on the task execution (green/red square in the Grid view) 4. Click the **Logs** tab ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") The logs provide detailed information about: * FastTransfer version and configuration * Source and target connection details (with masked passwords) * Data transfer progress * Performance metrics (rows/second, total time) * Exit status ``` [2026-03-02 15:51:45] INFO - Running docker container: arpeio/fasttransfer:latest [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.288 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8415ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.330 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000000 : 2999997 rows x 9 columns in 8458ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.349 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8476ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.442 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8569ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1702771 rows/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15324949 cells/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8809 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9135 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load [2026-03-02 15:51:54] INFO - Task instance in success state [2026-03-02 15:51:54] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 15:51:54] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastTransfer, a high-performance data transfer utility designed for data integration and automation workflows. ## Image Overview[​](#image-overview "Direct link to Image Overview") * **Base image**: `debian:trixie-slim` * **Entrypoint**: `/usr/local/bin/FastTransfer` * **Repository**: [arpe-io/FastTransfer-Image](https://github.com/arpe-io/FastTransfer-Image) * **DockerHub**: [arpeio/fasttransfer](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general) * **Updates**: Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * Optional: `FastTransfer_Settings.json` for custom logging configuration ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags**: Aligned with FastTransfer releases (e.g., `v0.15.0`) * **`latest` tag**: Always points to the most recent FastTransfer version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastTransfer versions are released * **Security updates**: The latest version of each minor branch is automatically rebuilt weekly (every Monday) with the latest base image and security patches ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fasttransfer:latest # Specific version docker pull arpeio/fasttransfer:v0.15.0 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fasttransfer:latest -? # Check version docker run --rm arpeio/fasttransfer:latest --version ``` ## License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.14.0, pass the license content directly via `--license "…"`: ``` export licenseContent=$(cat ./FastTransfer.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fasttransfer:latest \ --license "$licenseContent" \ [other parameters...] ``` Best Practice Prefer `--env-file`, Docker/Compose/Kubernetes secrets, or managed identities for cloud credentials. Avoid leaving the license content in shell history. ## Examples[​](#examples "Direct link to Examples") ### 1. SQL Server → SQL Server (Parallel DB-to-DB Transfer)[​](#1-sql-server--sql-server-parallel-db-to-db-transfer "Direct link to 1. SQL Server → SQL Server (Parallel DB-to-DB Transfer)") ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ arpeio/fasttransfer:latest \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "dest_db" \ --method "Ntile" \ --distributekeycolumn "id" \ --loadmode "Truncate" \ --paralleldegree 8 \ --license "$licenseContent" ``` ### 2. Import CSV Files to SQL Server in Parallel[​](#2-import-csv-files-to-sql-server-in-parallel "Direct link to 2. Import CSV Files to SQL Server in Parallel") ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ -v /local/data:/data \ arpeio/fasttransfer:latest \ --sourceconnectiontype "duckdbstream" \ --sourceserver ":memory:" \ --query "SELECT * FROM read_csv('/data/lineitem*.CSV')" \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targettrusted \ --targetdatabase "tpch_test" \ --targetschema "dbo" \ --targettable "lineitem" \ --parallelmethod "Random" \ --distributeKeyColumn "l_orderkey" \ --mapmethod "Name" \ --loadmode "Truncate" \ --degree 16 \ --license "$licenseContent" ``` ## Configuration[​](#configuration "Direct link to Configuration") ### Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` | Volume | Purpose | Access Mode | Notes | | --------- | ---------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | User-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory for file-based operations | Read-many/Write-many | Stores imported or exported data files | | `/work` | Temporary working directory (container WORKDIR) | Read-many/Write-many | Used internally for temporary processing | | `/logs` | Log output directory (per-run or aggregated logs) | Read-many/Write-many | Stores runtime and execution logs | ### Configuring FastTransfer Logging[​](#configuring-fasttransfer-logging "Direct link to Configuring FastTransfer Logging") Available from version 0.14.0 FastTransfer supports custom logging configuration through an external Serilog settings file in JSON format. #### Example: Logging to Console, Airflow, and Dynamic Log Files[​](#example-logging-to-console-airflow-and-dynamic-log-files "Direct link to Example: Logging to Console, Airflow, and Dynamic Log Files") ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context", "Serilog.Formatting.Compact" ], "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console", "applyThemeToRedirectedOutput": false } }, { "Name": "File", "Args": { "path": "/airflow/xcom/return.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" } }, { "Name": "Map", "Args": { "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/log-{filename}-{LogTimestamp}-{TraceId}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8" } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` note * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastTransfer automatically creates it. * The file `/airflow/xcom/return.json` is designed to provide run summaries compatible with Airflow's XCom mechanism. #### Available Tokens for Path or Filename Formatting[​](#available-tokens-for-path-or-filename-formatting "Direct link to Available Tokens for Path or Filename Formatting") | Token | Description | | ------------------ | -------------------------------------------- | | `{logdate}` | Current date in yyyy-MM-dd format | | `{logtimestamp}` | Full timestamp of the log entry | | `{sourcedatabase}` | Name of the source database | | `{sourceschema}` | Name of the source schema | | `{sourcetable}` | Name of the source table | | `{filename}` | Name of the file being processed | | `{runid}` | Run identifier provided in the command line | | `{traceid}` | Unique trace identifier generated at runtime | #### Mounting a Custom Settings File[​](#mounting-a-custom-settings-file "Direct link to Mounting a Custom Settings File") ``` # First, copy your config file to a volume location cp ~/FastTransfer_Settings.json /volumes/fasttransfer-config/ # Then run FastTransfer with mounted volumes docker run --rm \ -v fasttransfer-config:/config \ -v fasttransfer-logs:/logs \ arpeio/fasttransfer:latest \ --settingsfile "/config/FastTransfer_Settings.json" \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "pgcopy" \ --targetserver "host.docker.internal:5432" \ --targetuser "PgUser" \ --targetpassword "PgPass" \ --targetdatabase "pg_db" \ --targetschema "dbo" \ --targettable "orders" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --license "$licenseContent" ``` --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastTransfer data migration workflows. FastTransfer can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: **Image:** `arpeio/fasttransfer:latest`
**Repository:** ## Integration Methods[​](#integration-methods "Direct link to Integration Methods") Kestra offers two primary methods to orchestrate FastTransfer execution: ### Method 1: Using Docker Run Plugin (Recommended)[​](#method-1-using-docker-run-plugin-recommended "Direct link to Method 1: Using Docker Run Plugin (Recommended)") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastTransfer commands in a Docker container. ``` id: fasttransfer_docker_kestra_v2 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - FastLogin - --sourcepassword - FastPassword - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - postgres - --targetpassword - postgres - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --method - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastTransfer Docker image * `commands`: Array of FastTransfer CLI arguments ### Method 2: Using Shell Commands with Docker Task Runner[​](#method-2-using-shell-commands-with-docker-task-runner "Direct link to Method 2: Using Shell Commands with Docker Task Runner") Alternatively, you can use the [`io.kestra.plugin.scripts.shell.Commands`](https://kestra.io/plugins/plugin-script-shell/io.kestra.plugin.scripts.shell.commands) plugin with a Docker task runner: ``` id: fasttransfer_docker_kestra namespace: arpe.io tasks: - id: shell type: io.kestra.plugin.scripts.shell.Commands containerImage: arpeio/fasttransfer:latest taskRunner: type: io.kestra.plugin.scripts.runner.docker.Docker host: "tcp://host.docker.internal:2375" commands: - >- /usr/local/bin/FastTransfer --sourceconnectiontype mssql --sourceserver "192.168.65.254,11433" --sourcedatabase "tpch10" --sourceuser "FastLogin" --sourcepassword "FastPassword" --sourceschema "dbo" --sourcetable "orders" --targetconnectiontype pgcopy --targetserver "192.168.65.254:25433" --targetdatabase "postgres" --targetuser "postgres" --targetpassword "postgres" --targetschema "public" --targettable "orders" --loadmode Truncate --mapmethod Name --method Ntile --degree 12 --distributekeycolumn "o_orderkey" --nobanner ``` This method allows you to execute shell commands within the FastTransfer Docker container, providing more flexibility for complex workflows. ## Securing Sensitive Data with Kestra Secrets[​](#securing-sensitive-data-with-kestra-secrets "Direct link to Securing Sensitive Data with Kestra Secrets") To protect sensitive information like passwords and connection strings, Kestra provides a built-in [secrets management](https://kestra.io/docs/concepts/secret) feature. You can store credentials securely and reference them in your flows using the `{{ secret('SECRET_NAME') }}` syntax. ### Creating Secrets in Kestra[​](#creating-secrets-in-kestra "Direct link to Creating Secrets in Kestra") To create secrets in Kestra: 1. Navigate to the Kestra UI 2. Go to **Tenant** → **Secrets** 3. Add your secrets with appropriate keys: * `FASTTRANSFER_MSSQL_USER` * `FASTTRANSFER_MSSQL_PASSWORD` * `FASTTRANSFER_PG_USER` * `FASTTRANSFER_PG_PASSWORD` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fasttransfer_docker_kestra_v3 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - "{{ secret('FASTTRANSFER_MSSQL_USER') }}" - --sourcepassword - "{{ secret('FASTTRANSFER_MSSQL_PASSWORD') }}" - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - "{{ secret('FASTTRANSFER_PG_USER') }}" - --targetpassword - "{{ secret('FASTTRANSFER_PG_PASSWORD') }}" - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --method - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` This approach ensures that sensitive credentials are never exposed in your flow definitions and can be managed centrally. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Kestra and can be viewed directly in the Kestra UI. To access the logs: 1. Navigate to the Kestra UI 2. Go to **Executions** 3. Select your flow execution 4. Click on the **Logs** tab The logs provide detailed information about the transfer process, including configuration parameters, connection details, data transfer progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02 15:51:45.3752026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False 2026-03-02 15:51:45.3792026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit 2026-03-02 15:51:45.6342026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) 2026-03-02 15:51:45.8702026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms 2026-03-02 15:51:45.8722026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8842026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8912026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9002026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9112026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:54.2332026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms 2026-03-02 15:51:54.2382026-03-02T15:51:54.238 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8365ms 2026-03-02 15:51:54.2412026-03-02T15:51:54.241 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8368ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000004 : 3000001 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1766084 rows/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15894756 cells/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8494 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9142 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load 2026-03-02 15:51:54.448Command succeed with exit code 0 2026-03-02 15:51:54.450Container deleted: ca0de79e3eb4ede961668cb5080e4c20f858960c118d10731b8e0ade3ad87685 2026-03-02 15:51:54.455Volume deleted: a6b822d7677064a91d2dd555c360dc61ec49e3954149eacd5c22549c2a300850 ``` --- # PostgreSQL The **pg\_fasttransfer** extension allows you to run the FastTransfer tool directly from an SQL function, enabling fast data transfer between databases directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fasttransfer](https://github.com/arpe-io/pg_fasttransfer) * **License**: MIT * **Latest version**: v0.16.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fasttransfer Demo](/assets/images/pg_fasttransfer-830298c99dd0228e80b5337126bb0c7c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastTransfer commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get transfer statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastTransfer parameters ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * FastTransfer binaries installed on the system Important The PostgreSQL server process usually runs under the `postgres` user account. You must ensure that this user has the appropriate permissions to execute the `FastTransfer` binary and read the license file. ## Compatibility[​](#compatibility "Direct link to Compatibility") * Windows * Linux | PostgreSQL Version | Supported | | ------------------ | --------- | | PostgreSQL 18 | | | PostgreSQL 17 | | | PostgreSQL 16 | | | PostgreSQL 15 | | **Debian/Ubuntu 22.04 LTS** | PostgreSQL Version | Supported | | ------------------ | --------- | | PostgreSQL 18 | | | PostgreSQL 17 | | | PostgreSQL 16 | | | PostgreSQL 15 | | info Other distributions or PostgreSQL versions may work but have not been officially tested. ## Installation[​](#installation "Direct link to Installation") Download the Extension Download the appropriate release for your PostgreSQL version and operating system from the [pg\_fasttransfer releases page](https://github.com/arpe-io/pg_fasttransfer/releases). * Linux * Windows **Automated Installation** The easiest way to install the extension on Linux is by using the `install-linux.sh` script included in the archive. 1. Extract the contents of the archive into a folder. This folder should contain: * `pg_fasttransfer.so` * `pg_fasttransfer.control` * `pg_fasttransfer--1.0.sql` * `install-linux.sh` 2. Make the script executable: ``` chmod +x install-linux.sh ``` 3. Run the script with administrator privileges: ``` sudo ./install-linux.sh ``` The script will automatically detect your PostgreSQL installation and copy the files to the correct locations. **Manual Installation** If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service: ``` sudo systemctl stop postgresql ``` 2. Locate your PostgreSQL installation directory, typically: `/usr/lib/postgresql/` 3. Copy the files into the appropriate directories: ``` sudo cp pg_fasttransfer.so /usr/lib/postgresql//lib/ sudo cp pg_fasttransfer.control pg_fasttransfer--1.0.sql /usr/share/postgresql//extension/ ``` 4. Restart your PostgreSQL service: ``` sudo systemctl start postgresql ``` **Permissions Setup** Ensure the `postgres` user has proper permissions: ``` # Grant execute permission on the FastTransfer binary sudo chmod +x /path/to/FastTransfer sudo chown postgres:postgres /path/to/FastTransfer sudo chmod 750 /path/to/FastTransfer # Grant read permission on the license file sudo chown postgres:postgres /path/to/license.lic sudo chmod 640 /path/to/license.lic ``` **Automated Installation** 1. Extract the contents of the ZIP file into a folder. This folder should contain: * `pg_fasttransfer.dll` * `pg_fasttransfer.control` * `pg_fasttransfer--1.0.sql` * `install-win.bat` 2. Right-click on the `install-win.bat` file and select "Run as administrator" 3. The script will automatically detect your PostgreSQL installation and copy the files to the correct locations **Manual Installation** If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service 2. Locate your PostgreSQL installation folder, typically: ``` C:\Program Files\PostgreSQL\ ``` 3. Copy the `pg_fasttransfer.dll` file into the `lib` folder 4. Copy the `pg_fasttransfer.control` and `pg_fasttransfer--1.0.sql` files into the `share\extension` folder 5. Restart your PostgreSQL service **Permissions Setup** Make sure that the PostgreSQL service account (by default `NT AUTHORITY\NetworkService` or `postgres`) has: * Execute permission on the `FastTransfer.exe` binary * Read permission on the `.lic` file ## SQL Setup[​](#sql-setup "Direct link to SQL Setup") After the files are in place, you need to set up the extension in your database. ### Drop existing extension (if any)[​](#drop-existing-extension-if-any "Direct link to Drop existing extension (if any)") ``` DROP EXTENSION IF EXISTS pg_fasttransfer CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fasttransfer CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fasttransfer\_encrypt[​](#pg_fasttransfer_encrypt "Direct link to pg_fasttransfer_encrypt") This function encrypts a given text string using `pgp_sym_encrypt` and encodes the result in base64. It is useful for storing sensitive information, such as passwords, in a secure manner within your SQL scripts. The `xp_RunFastTransfer_secure` function will automatically decrypt any values passed to its `--sourcepassword` and `--targetpassword` arguments. **Syntax:** ``` pg_fasttransfer_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fasttransfer_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastTransfer\_secure[​](#xp_runfasttransfer_secure "Direct link to xp_RunFastTransfer_secure") This is the main function to execute the FastTransfer tool. It takes various parameters to configure the data transfer operation. Password arguments (`sourcepassword`, `targetpassword`) will be automatically decrypted. **Syntax:** ``` xp_RunFastTransfer_secure( sourceconnectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, sourcedsn text DEFAULT NULL, sourceprovider text DEFAULT NULL, sourceserver text DEFAULT NULL, sourceuser text DEFAULT NULL, sourcepassword text DEFAULT NULL, sourcetrusted boolean DEFAULT FALSE, sourcedatabase text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, query text DEFAULT NULL, fileinput text DEFAULT NULL, targetconnectiontype text DEFAULT NULL, targetconnectstring text DEFAULT NULL, targetserver text DEFAULT NULL, targetuser text DEFAULT NULL, targetpassword text DEFAULT NULL, targettrusted boolean DEFAULT FALSE, targetdatabase text DEFAULT NULL, targetschema text DEFAULT NULL, targettable text DEFAULT NULL, degree integer DEFAULT NULL, method text DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, loadmode text DEFAULT NULL, batchsize integer DEFAULT NULL, useworktables boolean DEFAULT FALSE, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, mapmethod text DEFAULT NULL, license text DEFAULT NULL, loglevel text DEFAULT NULL, nobanner boolean DEFAULT NULL, fasttransfer_path text DEFAULT NULL, debug boolean DEFAULT FALSE ) RETURNS TABLE ( exit_code integer, output text, error_message text, total_rows bigint, total_columns integer, transfer_time_ms bigint, total_time_ms bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to SQL Server[​](#linux-example---postgresql-to-sql-server "Direct link to Linux Example - PostgreSQL to SQL Server") Transfer data from PostgreSQL to SQL Server using the extension: ``` SELECT * FROM xp_RunFastTransfer_secure( targetconnectiontype := 'msbulk', sourceconnectiontype := 'pgsql', sourceserver := 'localhost:5432', sourceuser := 'postgres', sourcepassword := pg_fasttransfer_encrypt('MyActualPassword'), sourcedatabase := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', targetserver := 'localhost,1433', targetuser := 'migadmin', targetpassword := pg_fasttransfer_encrypt('AnotherSecurePassword'), targetdatabase := 'target_db', targetschema := 'tpch_1', targettable := 'orders', loadmode := 'Truncate', license := '/tmp/FastTransfer_linux-x64_v0.14.0/FastTransfer.lic', loglevel := 'information', nobanner := false, fasttransfer_path := '/tmp/FastTransfer_linux-x64_v0.14.0', debug := true ); ``` ### Windows Example - SQL Server to PostgreSQL[​](#windows-example---sql-server-to-postgresql "Direct link to Windows Example - SQL Server to PostgreSQL") Transfer data from SQL Server to PostgreSQL: ``` SELECT * FROM xp_RunFastTransfer_secure( sourceconnectiontype := 'mssql', sourceserver := 'localhost', sourcepassword := pg_fasttransfer_encrypt('MyWindowsPassword'), sourceuser := 'FastLogin', sourcedatabase := 'tpch10', sourceschema := 'dbo', sourcetable := 'orders', targetconnectiontype := 'pgcopy', targetserver := 'localhost:15433', targetuser := 'postgres', targetpassword := pg_fasttransfer_encrypt('MyPostgresPassword'), targetdatabase := 'postgres', targetschema := 'public', targettable := 'orders', method := 'Ntile', degree := 12, distributekeycolumn := 'o_orderkey', loadmode := 'Truncate', batchsize := 1048576, mapmethod := 'Position', loglevel := 'information', nobanner := true, fasttransfer_path := 'D:\sources\FastTransfer', debug := true ); ``` ## Function Return Structure[​](#function-return-structure "Direct link to Function Return Structure") The function returns a table with the following columns: | Column | Type | Description | | ------------------ | ------- | -------------------------------------------------------- | | `exit_code` | integer | The exit code of the FastTransfer process | | `output` | text | The full log output from FastTransfer (if debug is TRUE) | | `error_message` | text | Only the lines containing ERROR from the output | | `total_rows` | bigint | The total number of rows transferred | | `total_columns` | integer | The total number of columns transferred | | `transfer_time_ms` | bigint | Transfer time in milliseconds | | `total_time_ms` | bigint | Total execution time in milliseconds | ## Debug Parameter[​](#debug-parameter "Direct link to Debug Parameter") The `debug` parameter is a boolean flag that controls whether the full FastTransfer output is returned in the `output` column: * When `debug := true`, `output` contains the entire log from FastTransfer * When `debug := false` (default), `output` is an empty string, but `error_message` will still contain any error lines ## Resources[​](#resources "Direct link to Resources") * [pg\_fasttransfer GitHub Repository](https://github.com/arpe-io/pg_fasttransfer) * [FastTransfer Documentation](https://fasttransfer.arpe.io/) * [Get a Trial License](https://arpe.io/get-trial?product=FastTransfer) * [Report Issues](https://github.com/arpe-io/pg_fasttransfer/issues) --- # SQL Server The **FastWrappers-TSQL** project wraps FastTransfer (and FastBCP) in a CLR Assembly, allowing you to call them directly from T-SQL using extended stored procedures. This enables seamless data transfer operations without leaving your SQL Server environment. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [aetperf/FastWrappers-TSQL](https://github.com/aetperf/FastWrappers-TSQL) * **Latest version**: v0.7.0 * **Platforms**: Windows and Linux * **Compatibility**: SQL Server 2016+ info This wrapper includes both **FastTransfer** (for database-to-database transfers and file imports) and **FastBCP** (for database-to-file exports). This documentation focuses on the FastTransfer functionality. ## Features[​](#features "Direct link to Features") * **Native SQL Server Integration**: Execute FastTransfer commands directly from T-SQL * **Secure Password Management**: Built-in AES-256 encryption for sensitive credentials * **CLR Assembly Integration**: Runs as extended stored procedures * **Detailed Result Return**: Get transfer statistics and performance metrics as SQL results * **Flexible Configuration**: Support for all FastTransfer parameters and connection types * **Role-Based Security**: Predefined database roles for access control ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * SQL Server 2016 or later * CLR integration enabled * Valid FastTransfer binaries * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * Administrator privileges for initial setup Important The SQL Server service account must have read/execute permissions on the FastTransfer directory and binaries. ## Installation[​](#installation "Direct link to Installation") Download the latest release from the [Releases page](https://github.com/aetperf/FastWrappers-TSQL/releases). Choose the installation method based on your SQL Server version: ### Recommended Installation Methods[​](#recommended-installation-methods "Direct link to Recommended Installation Methods") 1. **[FastWrappers-TSQL.bak](https://github.com/aetperf/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.bak)** - SQL Server Backup file (**recommended for SQL Server 2019+** - restore using SSMS)
Requires manual CLR activation and trusted assembly configuration after restore 2. **[FastWrappers-TSQL.sql](https://github.com/aetperf/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.sql)** - Pure SQL Script (**recommended for SQL Server 2016+** - all-in-one installation)
Complete installation in a single script - execute using sqlcmd or SSMS ### Post-Installation Configuration[​](#post-installation-configuration "Direct link to Post-Installation Configuration") info This section only applies to the **.bak** installation method. The **.sql** script includes all necessary configuration steps automatically. After restoring the database, you **must** configure CLR integration. Two options are available: * Trusted Assembly (Recommended) * TRUSTWORTHY ON (Dev/Test) This approach is **more secure** as it keeps TRUSTWORTHY OFF and doesn't require changing the database owner: ``` -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Extract the assembly hash and add it to trusted assemblies DECLARE @hash VARBINARY(64); SELECT @hash = HASHBYTES('SHA2_512', content) FROM sys.assembly_files WHERE assembly_id = ( SELECT assembly_id FROM sys.assemblies WHERE name = 'FastWrappers_TSQL' ); EXEC sys.sp_add_trusted_assembly @hash = @hash, @description = N'FastWrappers_TSQL Assembly v0.7.0'; GO ``` **Advantages:** * TRUSTWORTHY remains OFF (more secure) * No need to change database owner * Only this specific assembly is trusted tip The assembly hash changes with each version. When upgrading, remove the old hash first: ``` EXEC sys.sp_drop_trusted_assembly @hash = ; ``` This approach is simpler but **less secure**. Use only for development/testing environments: ``` -- Enable TRUSTWORTHY for signed UNSAFE assemblies ALTER DATABASE [FastWrappers-TSQL] SET TRUSTWORTHY ON; GO -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Set database owner to 'sa' (required for signed UNSAFE assemblies) EXEC sp_changedbowner 'sa'; GO ``` Critical The `sp_changedbowner 'sa'` command is **required**. Without it, you will encounter error 0x80FC80F1 when executing stored procedures. ## Security Roles[​](#security-roles "Direct link to Security Roles") ### FastTransfer\_Executor[​](#fasttransfer_executor "Direct link to FastTransfer_Executor") The FastWrappers-TSQL database includes a predefined database role that grants `EXECUTE` permission on the **xp\_RunFastTransfer\_secure** stored procedure. ``` -- Add a user to the role ALTER ROLE [FastTransfer_Executor] ADD MEMBER [YourUserName]; GO ``` tip Users also need access to the **dbo.EncryptString** function to generate encrypted passwords: ``` GRANT EXECUTE ON dbo.EncryptString TO [YourUserName]; GO ``` ## Available Functions[​](#available-functions "Direct link to Available Functions") ### dbo.EncryptString - Password Encryption[​](#dboencryptstring---password-encryption "Direct link to dbo.EncryptString - Password Encryption") Encrypts passwords using AES-256 encryption for secure storage and transmission. ``` SELECT dbo.EncryptString('YourPassword') ``` **Returns:** Base64-encoded encrypted string **Example:** ``` SELECT dbo.EncryptString('MySecretPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== ``` ### dbo.xp\_RunFastTransfer\_secure - Data Transfer[​](#dboxp_runfasttransfer_secure---data-transfer "Direct link to dbo.xp_RunFastTransfer_secure - Data Transfer") Wraps the FastTransfer CLI to transfer data between databases with streaming and parallel processing. **Example:** ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'D:\FastTransfer\', @sourceConnectionType = 'mssql', @sourceServer = 'localhost,11433', @sourceUser = 'FastLogin', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = 'tpch10', @sourceSchema = 'dbo', @sourceTable = 'orders', @targetConnectionType = 'pgcopy', @targetServer = 'localhost:25433', @targetUser = 'postgres', @targetPasswordSecure = 'RAAFe/XJ7O0P1I5T0rJhjQ==', @targetDatabase = 'postgres', @targetSchema = 'public', @targetTable = 'orders', @loadmode = 'Truncate', @method = 'Ntile', @distributeKeyColumn = 'o_orderkey', @degree = 12, @mapmethod = 'Name', @debug = 1, @noBanner = 0, @useWorkTables = 0, @loglevel = 'debug' ``` ## Output and Logging[​](#output-and-logging "Direct link to Output and Logging") ### Transfer Metrics[​](#transfer-metrics "Direct link to Transfer Metrics") The **xp\_RunFastTransfer\_secure** stored procedure returns a structured result set: | Column | Type | Description | | -------------- | ------------- | ----------------------------------------- | | targetdatabase | nvarchar(128) | Target database name | | targetSchema | nvarchar(128) | Target schema name | | targetTable | nvarchar(128) | Target table name | | TotalRows | bigint | Number of rows transferred | | TotalColumns | int | Number of columns transferred | | TotalCells | bigint | Total cells transferred (rows × columns) | | TotalTimeMs | bigint | Total execution time in milliseconds | | Status | int | Exit code (0 = success, non-zero = error) | | StdErr | nvarchar(max) | Error message if Status ≠ 0 | **Example output:** ``` targetdatabase targetSchema targetTable TotalRows TotalColumns TotalCells TotalTimeMs Status postgres public orders 15000000 9 135000000 27502 0 ``` ### Debug Mode[​](#debug-mode "Direct link to Debug Mode") Set `@debug = 1` to output additional information: * Complete command line being executed (passwords masked) * Full console output from FastTransfer * Real-time progress updates * Performance metrics ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest', -- ... other parameters ... @debug = 1 -- Enable verbose logging ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### SQL Server to SQL Server (12 threads)[​](#sql-server-to-sql-server-12-threads "Direct link to SQL Server to SQL Server (12 threads)") Transfer a table between two SQL Server instances using parallel processing: ``` -- First, encrypt your password SELECT dbo.EncryptString('YourPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== -- Then execute the transfer EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = N'mssql', @sourceServer = N'localhost', @sourceUser = N'FastUser', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = N'tpch_test', @sourceSchema = N'dbo', @sourceTable = N'orders', @targetConnectionType = N'msbulk', @targetServer = N'localhost\SS2025', @targetUser = N'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = N'tpch_test', @targetSchema = N'dbo', @targetTable = N'orders_copy', @loadMode = N'Truncate', @batchSize = 130000, @method = N'RangeId', @distributeKeyColumn = N'o_orderkey', @degree = 12, @mapmethod = 'Name', @runId = N'SQL_to_SQL_Parallel_Transfer'; ``` ### Oracle to SQL Server (12 threads)[​](#oracle-to-sql-server-12-threads "Direct link to Oracle to SQL Server (12 threads)") Transfer data from Oracle to SQL Server with parallel RangeId method: ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'oraodp', @sourceServer = 'oracle-server:1521/ORCL', @sourceUser = 'oracle_user', @sourcePasswordSecure = '', @sourceSchema = 'SALES', @sourceTable = 'ORDERS', @targetConnectionType = 'msbulk', @targetServer = 'localhost\SS2025', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'tpch_test', @targetSchema = 'dbo', @targetTable = 'orders_from_oracle', @loadMode = 'Truncate', @batchSize = 130000, @method = 'RangeId', @distributeKeyColumn = 'order_id', @degree = 12, @mapmethod = 'Name', @runId = 'Oracle_to_SQL_Transfer'; ``` ### PostgreSQL to SQL Server (8 threads)[​](#postgresql-to-sql-server-8-threads "Direct link to PostgreSQL to SQL Server (8 threads)") Use PostgreSQL's native Ctid method for optimal performance: ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'pgcopy', @sourceServer = 'postgres-server:5432', @sourceUser = 'postgres', @sourcePasswordSecure = '', @sourceDatabase = 'sales_db', @sourceSchema = 'public', @sourceTable = 'customers', @targetConnectionType = 'msbulk', @targetServer = 'localhost', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'crm', @targetSchema = 'dbo', @targetTable = 'customers', @loadMode = 'Append', @batchSize = 100000, @method = 'Ctid', @degree = 8, @mapmethod = 'Name', @runId = 'PG_to_SQL_Ctid'; ``` ## Additional Resources[​](#additional-resources "Direct link to Additional Resources") * [FastTransfer Documentation](/0.14/.md) * [GitHub Repository](https://github.com/aetperf/FastWrappers-TSQL) ## Support[​](#support "Direct link to Support") For issues or questions: * FastWrappers-TSQL: [GitHub Issues](https://github.com/aetperf/FastWrappers-TSQL/issues) * FastTransfer: [Contact ARPE Support](https://arpe.io/contact) --- # Sitemap ## [Installation](/0.14/installation.md)[​](#installation "Direct link to installation") ## [Wizard GUI](/0.14/wizard.md)[​](#wizard-gui "Direct link to wizard-gui") ## Documentation[​](#documentation "Direct link to Documentation") * [Getting Started](/0.14/.md) * CLI * [Authentication](/0.14/documentation/cli/authentication.md) * [Source Connection Parameters](/0.14/documentation/cli/source_connection_parameters.md) * [Target Connection Parameters](/0.14/documentation/cli/target_connection_parameters.md) * [Transfer Parameters](/0.14/documentation/cli/transfer_parameters.md) * [Parallel Parameters](/0.14/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/0.14/documentation/cli/advanced_parameters.md) * [License](/0.14/documentation/cli/license.md) * Logging * [Overview](/0.14/documentation/logging/Overview.md) * [Logs Level](/0.14/documentation/logging/logs-level.md) * [Log Database](/0.14/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/0.14/documentation/logging/log-files-names-mapping-using-variables.md) * [Examples](/0.14/documentation/logging/examples.md) * Examples * [SQL Server Examples](/0.14/documentation/examples/sql-server.md) * [PostgreSQL Examples](/0.14/documentation/examples/postgresql.md) * [MySQL Examples](/0.14/documentation/examples/mysql.md) * [Oracle Examples](/0.14/documentation/examples/oracle.md) * [Other Databases](/0.14/documentation/examples/other-databases.md) * [CSV Import](/0.14/documentation/examples/csv-import.md) * [JSON Import](/0.14/documentation/examples/json-import.md) * [Parquet Import](/0.14/documentation/examples/parquet-import.md) * [Advanced Scenarios](/0.14/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/0.14/documentation/compatibility/sources_platforms.md) * [Operating Systems](/0.14/documentation/compatibility/operating_systems.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/0.14/integration/docker-integration.md) * [Kestra](/0.14/integration/kestra-integration.md) ## [Sitemap](/0.14/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastTransfer Command Wizard Transfer (DB to DB) Import Files (Files to DB) Expand All\[ ] ### Operating SystemWindows Windows ![Linux](/img/tux.svg)Linux ### Source Connection Parameterspgsql Connection Type ? : clickhouse duckdb duckdbstream hana msoledbsql mssql mysql nzcopy nzoledb nzsql odbc oledb oraodp pgcopy pgsql teradata | Server ? : | localhost | | ------------------ | ---------------------------------- | | Connect String ? : | Server=localhost;Database=mydb;... | | DSN ? : | | | Provider ? : | | | Database ? : | mydatabase | | Trusted ? : | \[ ] | | User ? : | username | | Password ? : | •••••••• | ### Target Connection Parametersmsbulk ### Transfer Parameters ### Parallel ParametersNone ### Advanced Parameters ### License ### Generated Command multi-line\[x] sharecopy ``` .\FastTransfer.exe ` --sourceconnectiontype pgsql ` --targetconnectiontype msbulk ` --loadmode Truncate ` --mapmethod Name ` --license "C:\MyFreeTrialLicense.lic" ``` --- # Getting Started with FastTransfer FastTransfer is a high-performance **high-performance data ingestion and transfer engine** that enables fast, parallel data movement between different database systems or from files to databases systems. If you haven't installed FastTransfer yet, please check the [Installation](/0.15/installation.md) section first. You can also build your first FastTransfer command using our interactive [Command Builder Wizard](/0.15/wizard.md). [FastTransfer Mini-Demo](https://www.youtube.com/embed/CL3031FWwqo) --- # Advanced Parameters This section covers advanced configuration options for FastTransfer, including tracing, logging, and display settings. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter allows you to specify a custom identifier for tracing the transfer process. This is useful for correlating logs and tracking operations across systems. **Example:** ``` ./FastTransfer \ ... --runid "transfer-2024-01-15-001" \ ... ``` **Syntax:** * Short form: `-R "RunSpanID"` * Long form: `--runid "RunSpanID"` **Default Value:** A random GUID is generated if not specified. Tracing Use a meaningful Run ID to make it easier to search logs and trace specific transfer operations, especially in production environments or when running multiple transfers. ## Settings File[​](#settings-file "Direct link to Settings File") Specify a custom settings file for logging and other configuration options. This allows you to use different configuration profiles for different environments or scenarios. **Example:** ``` ./FastTransfer \ ... --settingsfile "config/production-settings.json" \ ... ``` **Syntax:** * Short form: `-O "file_path"` * Long form: `--settingsfile "file_path"` **Default Value:** `FastTransfer__settings.json` in the same folder as the executable. Configuration File The settings file contains logging configuration, connection settings, and other advanced options. You can maintain separate configuration files for development, staging, and production environments. ## Log Level[​](#log-level "Direct link to Log Level") Override the log level defined in the settings file. This is useful for temporary debugging or troubleshooting without modifying the settings file. **Example:** ``` ./FastTransfer \ ... --loglevel debug \ ... ``` **Syntax:** * Long form: `--loglevel "level"` **Allowed Values:** | Log Level | Description | | ------------- | --------------------------------------------------- | | `debug` | Detailed debugging information | | `information` | General informational messages (default) | | `warning` | Warning messages for potentially harmful situations | | `error` | Error messages for failures | | `fatal` | Fatal error messages for critical failures | **Default Value:** `information` Debugging Use `--loglevel debug` when troubleshooting issues to get the most detailed logging output. Remember to switch back to `information` or `warning` for production use to avoid excessive log volume. ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastTransfer banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastTransfer \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastTransfer from scripts or CI/CD pipelines where you want to minimize console output or parse the results programmatically. ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using advanced parameters: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "sales" ` --query "select * from sales where order_date >= '2024-01-01'" ` --runid "daily-sales-sync-2024-01-15" ` --settingsfile "config/production-settings.json" ` --loglevel information ` --nobanner ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "sales" \ --query "select * from sales where order_date >= '2024-01-01'" \ --runid "daily-sales-sync-2024-01-15" \ --settingsfile "config/production-settings.json" \ --loglevel information \ --nobanner ``` This example: * Uses a custom Run ID for tracing * Loads configuration from a custom settings file * Sets the log level to information * Disables the banner for cleaner output --- # Authentication FastTransfer supports two types of authentication methods depending on your database platform. Authentication can be configured separately for source and target databases. ## Source Authentication[​](#source-authentication "Direct link to Source Authentication") ### Trusted Connection (Source)[​](#trusted-connection-source "Direct link to Trusted Connection (Source)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --sourcetrusted ` ... ``` **Syntax:** * Short form: `-a` * Long form: `--sourcetrusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### SQL Login with Username and Password (Source)[​](#sql-login-with-username-and-password-source "Direct link to SQL Login with Username and Password (Source)") Standard database authentication with explicit credentials for the source database. ``` ./FastTransfer ` ... --sourceuser "myuser" ` --sourcepassword "mypassword" ` ... ``` **Syntax:** * Username: `-u "username"` or `--sourceuser "username"` * Password: `-x "password"` or `--sourcepassword "password"` ## Target Authentication[​](#target-authentication "Direct link to Target Authentication") ### Trusted Connection (Target)[​](#trusted-connection-target "Direct link to Trusted Connection (Target)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --targettrusted ` ... ``` **Syntax:** * Short form: `-A` * Long form: `--targettrusted` ### SQL Login with Username and Password (Target)[​](#sql-login-with-username-and-password-target "Direct link to SQL Login with Username and Password (Target)") Standard database authentication with explicit credentials for the target database. ``` ./FastTransfer ` ... --targetuser "myuser" ` --targetpassword "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--targetuser "username"` * Password: `-X "password"` or `--targetpassword "password"` ## Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use connection string parameters where you pass the user and password directly in the connection string: * `--sourceconnectionstring` for source database connection - see [Source Connection Parameters](/0.15/documentation/cli/source_connection_parameters.md) * `--targetconnectionstring` for target database connection - see [Target Connection Parameters](/0.15/documentation/cli/target_connection_parameters.md) Password Security in Logs All passwords passed either through the `--sourcepassword`, `--targetpassword` parameters or within the `--sourceconnectionstring`, `--targetconnectionstring` parameters are automatically hidden in all logs (Console, Files, and Database). This ensures your credentials remain secure in logging outputs. Tips For Login/Password you can also use the environment variables like FastTransfer\_SOURCEUSER and FastTransfer\_SOURCEPASSWORD for example or store the password in an encrypted file. Up to you to decrypt the file and its content before using it in a shell variable that will be used with FastTransfer. --- # License Configure how FastTransfer retrieves and uses its license file. ## License Parameter[​](#license-parameter "Direct link to License Parameter") Use the `--license` parameter to specify the location or content of your FastTransfer license. By default, FastTransfer will try to use the license file named `FastTransfer.lic` in the same directory as the FastTransfer executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastTransfer supports multiple ways to provide a license: #### 1. File Path[​](#1-file-path "Direct link to 1. File Path") Specify a custom license file path: * Windows * Linux ``` .\FastTransfer.exe ` ... --license "C:\licenses\FastTransfer.lic" ` ... ``` ``` ./FastTransfer \ ... --license "/path/to/licenses/FastTransfer.lic" \ ... ``` #### 2. HTTP(S) Endpoint[​](#2-https-endpoint "Direct link to 2. HTTP(S) Endpoint") Retrieve the license from a remote URL where you put the license content and distribute it using https : * Windows * Linux ``` .\FastTransfer.exe ` ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" ` ... ``` ``` ./FastTransfer \ ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" \ ... ``` #### 3. License Content (Inline)[​](#3-license-content-inline "Direct link to 3. License Content (Inline)") Provide the license content directly. Using a variable or environment variable is recommended. Usefull for Docker or Lambda deployment: * Windows * Linux ``` # Using environment variable $env:FastTransfer_LICENSE = "LICENSE_CONTENT_HERE" .\FastTransfer.exe ` ... --license $env:FastTransfer_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastTransfer.lic" -Raw .\FastTransfer.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FastTransfer_LICENSE="LICENSE_CONTENT_HERE" ./FastTransfer \ ... --license "$FastTransfer_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastTransfer.lic) ./FastTransfer \ ... --license "$license" \ ... ``` **Syntax:** * Long form only: `--license ""` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using a license from a remote server with a database transfer: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" ` --parallelmethod DataDriven ` --degree 4 ` --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` ``` ./FastTransfer \ --sourceconnectiontype "pgsql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourceuser "FastUser" \ --sourcepassword "FastPassword" \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" \ --parallelmethod DataDriven \ --degree 4 \ --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` This example: * Retrieves the license from a remote UNC path * Connects to a PostgreSQL source database * Transfers data to a SQL Server target using bulk insert * Uses DataDriven parallel method with 4 threads * Filters orders from 2024 onwards --- # Parallel Parameters FastTransfer can parallelize data export to significantly improve performance. This section covers the parameters that control parallel execution. ## Parallel Method[​](#parallel-method "Direct link to Parallel Method") Use the `-M` or `--parallelmethod` parameter to specify how data will be split across parallel threads. * Windows * Linux ``` .\FastTransfer.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastTransfer \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Short form: `-m ` * Long form: `--parallelmethod ` ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallelism. **DataDriven** - Use the distinct value of the distributeKeyColumn (which can be a column or an expression) to distribute data. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ctid** - Recommended and exclusive for PostgreSQL and PostgreSQL compatible databases. Use the Ctid pseudo column (for pgsql and pgcopy source only). note Ctid parallel method is for PostgreSQL databases only. **Physloc** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the Physloc range. note Physloc parallel method is for SQL Server databases only. **Random** - Use a modulo on the distributeKeyColumn to distribute data. **Rowid** - For Oracle sources only: use rowid slices. note Rowid parallel method is for Oracle databases only. **RangeId** - Use a numeric range to distribute data (useful with an identity column or sequence without gaps. The column must be numerical). **Ntile** - Use the ntile function to distribute data evenly. Data can be numerical, date, datetime or string. **NZDataSlice** - Netezza source only. Use the data slices to distribute data retrieval. note NZDataSlice parallel method is for Netezza databases only. ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | ------------- | -------- | ------------------------ | ------------------------- | | `None` | | | Any | | `DataDriven` | | | Any | | `Ctid` | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` | | | SQL Server (mssql) | | `Random` | | | Any | | `Rowid` | | | Oracle (oraodp) | | `RangeId` | | | Any | | `Ntile` | | | Any | | `NZDataSlice` | | | Netezza | **Default Value:** `None` When to Use Parallelism If you want to use a parallel export/import use other than None. Try to use Parallelism only if you have a large amount of data to transfer (more than 1M cells). ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `-K` or `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastTransfer will use SQL queries that run in parallel against the source. Each query will have a WHERE clause that retrieves a part of the total data. Information This parameter is mandatory when using methods that require a distributed column: Random, DataDriven, RangeId, or Ntile. * Windows * Linux ``` # Using a column name .\FastTransfer.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastTransfer.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastTransfer \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastTransfer \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Short form: `-K ` * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `-P` or `--degree` parameter to control how many parallel threads will be used for the export. ### DOP Values[​](#dop-values "Direct link to DOP Values") **Positive value (e.g., 4)** - Uses exactly that number of parallel threads. If greater than the number of CPU cores/threads, it will be downscaled to match available cores. **0** - Automatically aligns with the number of cores (or threads if Hyper-Threading is enabled) on the machine. **Negative value (e.g., -2)** - Computed as `number of cores / abs(dop)`. For example, if you have 16 cores and set DOP to -2, the actual DOP will be 8. * Windows * Linux ``` # Use 8 parallel threads .\FastTransfer.exe ` ... --degree 8 ` ... # Auto-detect based on CPU cores .\FastTransfer.exe ` ... --degree 0 ` ... # Use half of available cores .\FastTransfer.exe ` ... --degree -2 ` ... ``` ``` # Use 8 parallel threads ./FastTransfer \ ... --degree 8 \ ... # Auto-detect based on CPU cores ./FastTransfer \ ... --degree 0 \ ... # Use half of available cores ./FastTransfer \ ... --degree -2 \ ... ``` **Syntax:** * Short form: `-P ` * Long form: `--degree ` **Default:** `-2` ## Data Driven Query[​](#data-driven-query "Direct link to Data Driven Query") Use the `-Q` or `--datadrivenquery` parameter when using the DataDriven method to provide a query that returns the list of values that will be used to split the data. This allows you to filter the values that will be exported and used to split the data. * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Short form: `-Q ""` * Long form only: `--datadrivenquery ""` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "select * from orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_ordermonth" ` --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" ` --degree 10 ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "select * from orders" \ --parallelmethod "DataDriven" \ --distributekeycolumn "o_ordermonth" \ --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" \ --degree 10 ``` This example: * Connects to a SQL Server source database on localhost * Transfers data to a SQL Server target database using BulkCopy * Uses trusted authentication for both source and target * Executes a custom query on the orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date (o\_ordermonth column) * Uses a custom query to generate month values (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even though there are 12 months to export) --- # Source Connection Parameters FastTransfer requires connection information to access your source database where data will be extracted. This page covers all source connection-related parameters. ## Source Connection Type[​](#source-connection-type "Direct link to Source Connection Type") Specify the type of source database connection driver to use. This parameter determines how FastTransfer connects to your source database. ``` ./FastTransfer \ ... --sourceconnectiontype mssql \ ... ``` **Syntax:** * Short form: `-c "connection_type"` * Long form: `--sourceconnectiontype "connection_type"` **Available Source Connection Types:** | Connection Type | Description | | --------------- | ---------------------------------------------- | | `clickhouse` | ClickHouse | | `duckdb` | DuckDB | | `duckdbstream` | DuckDB using streaming (more memory efficient) | | `hana` | SAP HANA (.net driver) | | `msoledbsql` | SQL Server OleDB | | `mssql` | SQL Server Native Client (.Net) | | `mysql` | MySQL | | `nzcopy` | Netezza copy (WIP) | | `nzoledb` | Netezza OleDB | | `nzsql` | Netezza Native (.net driver) | | `odbc` | ODBC datasource (DSN must be configured) | | `oledb` | Generic OleDB datasource | | `oraodp` | Oracle ODP.Net | | `pgcopy` | PostgreSQL Copy | | `pgsql` | PostgreSQL Native (.Net) | | `teradata` | Teradata (.Net) | ## Source DSN (Data Source Name)[​](#source-dsn-data-source-name "Direct link to Source DSN (Data Source Name)") If you have chosen an ODBC connection type for the source, you must define the DSN with the `-n` parameter, or alternatively define a connection string using `--sourceconnectionstring`. ``` ./FastTransfer \ ... --sourceconnectiontype odbc \ --sourcedsn "MySourceODBCDataSource" \ ... ``` **Syntax:** * Short form: `-n "DSN_name"` * Long form: `--sourcedsn "DSN_name"` ## Source Provider[​](#source-provider "Direct link to Source Provider") If you have chosen an OLEDB connection type for the source, you must define the OLEDB provider with the `-p` parameter. ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider MSOLEDBSQL \ ... ``` ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider NZOLEDB \ ... ``` **Syntax:** * Short form: `-p "provider_name"` * Long form: `--sourceprovider "provider_name"` ## Source Server[​](#source-server "Direct link to Source Server") Except if you have defined a source connection string, you must define a source server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-s "server"` * Long form: `--sourceserver "server"` ### Source Server Format Examples[​](#source-server-format-examples "Direct link to Source Server Format Examples") The source server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:2433" \ ... ``` or ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:1521/myinstance" \ ... ``` **For Oracle - TNS entry:** ``` ./FastTransfer \ ... --sourceserver "MYTNS" \ ... ``` ## Source Connection String[​](#source-connection-string "Direct link to Source Connection String") Tips You can use a connection string to define the connection to the source database. This connection string will override any other connection parameters and can be used if the other authentication modes are not enough for your case. You can use the connection string for any source connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastTransfer \ ... --sourceconnectionstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--sourceconnectionstring "connection_string"` Password Security in Logs All passwords within the `--sourceconnectionstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Source Database[​](#source-database "Direct link to Source Database") Define the source database name. **Example:** ``` ./FastTransfer \ ... --sourcedatabase "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-d "database_name"` * Long form: `--sourcedatabase "database_name"` --- # Target Connection Parameters FastTransfer requires connection information to access your target database where data will be transferred. This page covers all target connection-related parameters. ## Target Connection Type[​](#target-connection-type "Direct link to Target Connection Type") Specify the type of target database connection driver to use. This parameter determines how FastTransfer connects to your target database. ``` ./FastTransfer \ ... --targetconnectiontype mssql \ ... ``` **Syntax:** * Short form: `-C "connection_type"` * Long form: `--targetconnectiontype "connection_type"` **Available Target Connection Types:** | Connection Type | Description | | ---------------- | -------------------------------------------------------------------------------- | | `clickhousebulk` | ClickHouse BulkCopy | | `duckdb` | DuckDB | | `hanabulk` | SAP HANA | | `msbulk` | SQL Server BulkCopy | | `mysqlbulk` | MySQL BulkCopy | | `nzbulk` | Netezza BulkCopy | | `orabulk` | Oracle BulkCopy | | `oradirect` | Oracle Direct | | `pgcopy` | PostgreSQL using copy (Binary format for postgresql sources and Text for others) | | `pgsql` | PostgreSQL Native (.Net) | | `teradata` | Teradata (.Net) | ## Target Server[​](#target-server "Direct link to Target Server") Except if you have defined a target connection string, you must define a target server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-I "server"` * Long form: `--targetserver "server"` ### Target Server Format Examples[​](#target-server-format-examples "Direct link to Target Server Format Examples") The target server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:3306" \ ... ``` or ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com,1433" \ ... ``` **IP address or DNS name with named instance (SQL Server):** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com\TARGETINSTANCE" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:1521/TARGETPDB" \ ... ``` **For DuckDB - Local file path:** ``` ./FastTransfer \ ... --targetconnectiontype duckdb \ --targetserver "/path/to/target.duckdb" \ ... ``` ## Target Connection String[​](#target-connection-string "Direct link to Target Connection String") Advanced Connection Options You can use a connection string to define the connection to the target database. This connection string will override any other target connection parameters and can be used if the standard authentication modes are not sufficient for your use case. You can use the target connection string for any connection type. The connection string must be enclosed in double quotes. **Example for SQL Server:** ``` ./FastTransfer \ ... --targetconnectionstring "Server=mytargetserver;Database=mytargetdb;User ID=TargetUser;Password=TargetPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Example for PostgreSQL:** ``` ./FastTransfer \ ... --targetconnectionstring "Host=mytargetserver;Database=mytargetdb;Username=TargetUser;Password=TargetPassword;SSL Mode=Require" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--targetconnectionstring "connection_string"` Password Security in Logs All passwords within the `--targetconnectionstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Target Database[​](#target-database "Direct link to Target Database") Define the target database name. **Example:** ``` ./FastTransfer \ ... --targetdatabase "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-D "database_name"` * Long form: `--targetdatabase "database_name"` Matching Schema Requirements The target table must already exist with a compatible schema. FastTransfer does not automatically create target tables. Ensure column data types are compatible between source and target databases. --- # 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[​](#source-configuration "Direct link to Source Configuration") These parameters define what data to extract from the source database. ### Source Schema[​](#source-schema "Direct link to 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"` Required for PostgreSQL Ctid Method This parameter must be set if the PostgreSQL Ctid method is used. ### Source Table[​](#source-table "Direct link to 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"` Required for PostgreSQL Ctid Method This parameter must be set if the PostgreSQL Ctid method is used. ### Query[​](#query "Direct link to 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"` Tips When using a custom query, FastTransfer will execute this query on the source database instead of reading from a table directly. ### File Input[​](#file-input "Direct link to 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"` File Requirement The specified file must exist and contain a valid SQL query. ## Target Configuration[​](#target-configuration "Direct link to Target Configuration") These parameters define where to load the data in the target database. ### Target Schema[​](#target-schema "Direct link to Target Schema") Define the target schema name. **Example:** ``` ./FastTransfer \ ... --targetschema "dbo" \ ... ``` **Syntax:** * Short form: `-S "schema_name"` * Long form: `--targetschema "schema_name"` ### Target Table[​](#target-table "Direct link to Target Table") Define the target table name. **Example:** ``` ./FastTransfer \ ... --targettable "customers" \ ... ``` **Syntax:** * Short form: `-T "table_name"` * Long form: `--targettable "table_name"` ## Load Behavior[​](#load-behavior "Direct link to Load Behavior") These parameters control how data is loaded into the target table. ### Load Mode[​](#load-mode "Direct link to 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 "Direct link to Batch Size") Batch Size for BulkCopy operations. **Example:** ``` ./FastTransfer \ ... --batchsize 500000 \ ... ``` **Syntax:** * Short form: `-B "size"` * Long form: `--batchsize "size"` **Default Value:** `1048576` Performance Tuning 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[​](#use-work-tables "Direct link to 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` When to Use This option is useful in rare scenarios where direct loading causes issues. Work tables act as an intermediate staging area. ### Map Method[​](#map-method "Direct link to 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` Column Mapping 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. --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastTransfer. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastTransfer supports multiple AWS authentication methods, listed in order of precedence: 1. **AWS Credentials File** (recommended for local development) 2. **Environment Variables** (recommended for CI/CD) 3. **IAM Roles** (recommended for AWS infrastructure) ### 1. AWS Credentials File[​](#1-aws-credentials-file "Direct link to 1. AWS Credentials File") The most common method for local development and testing. **Location:** * **Windows:** `C:\Users\YourName\.aws\credentials` * **Linux:** `~/.aws/credentials` **Credentials File Format:** ``` [default] aws_access_key_id = AKIAIOSFODNN7EXAMPLE aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY [production] aws_access_key_id = AKIAI44QH8DHBEXAMPLE aws_secret_access_key = je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY [development] aws_access_key_id = AKIAI44QH8DHBEXAMPLE aws_secret_access_key = je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY ``` **Configuration File (Optional):** Location: `~/.aws/config` ``` [default] region = us-east-1 output = json [profile production] region = eu-west-1 output = json [profile development] region = us-west-2 output = json ``` **Using Profiles with FastTransfer:** ``` # Use default profile ./FastTransfer \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastTransfer \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastTransfer \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" \ --fileoutput "data.parquet" \ ... ``` ### 2. Environment Variables[​](#2-environment-variables "Direct link to 2. Environment Variables") Useful for CI/CD pipelines and containerized environments. * Windows (PowerShell) * Linux ``` # Set AWS credentials $env:AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" $env:AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" $env:AWS_DEFAULT_REGION="us-east-1" # Optional: Session token for temporary credentials $env:AWS_SESSION_TOKEN="FwoGZXIvYXdzEBYaD..." # Run FastTransfer .\\FastTransfer.exe ` ... --directory "s3://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set AWS credentials export AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" export AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" export AWS_DEFAULT_REGION="us-east-1" # Optional: Session token for temporary credentials export AWS_SESSION_TOKEN="FwoGZXIvYXdzEBYaD..." # Run FastTransfer ./FastTransfer \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. IAM Roles (EC2, ECS, Lambda)[​](#3-iam-roles-ec2-ecs-lambda "Direct link to 3. IAM Roles (EC2, ECS, Lambda)") When FastTransfer runs on AWS infrastructure, it can use automatically the instance's IAM role. **No credentials configuration needed!** **Supported AWS Services:** * Amazon EC2 instances * Amazon ECS tasks * AWS Lambda functions * AWS Batch jobs * Amazon EKS pods (with IAM roles for service accounts) **Example IAM Policy for FastTransfer:** ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:PutObjectAcl", "s3:GetObject" ], "Resource": "arn:aws:s3:::my-bucket/exports/*" }, { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": "arn:aws:s3:::my-bucket" } ] } ``` ## S3 URI Format[​](#s3-uri-format "Direct link to S3 URI Format") ``` s3://bucket-name/path/to/directory/ ``` ### URI Examples[​](#uri-examples "Direct link to URI Examples") ``` # Root of bucket --directory "s3://my-bucket" # Single folder level --directory "s3://my-bucket/exports" # Multiple folder levels --directory "s3://my-bucket/exports/sales/2024" # Hive-style partitioning --directory "s3://my-bucket/data/year=2024/month=01/day=15" ``` ## Complete Examples[​](#complete-examples "Direct link to Complete Examples") ### Basic Export to S3[​](#basic-export-to-s3 "Direct link to Basic Export to S3") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "SalesDB" \ --trusted \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "s3://my-bucket/exports/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" ``` ### Parallel Export with Profile[​](#parallel-export-with-profile "Direct link to Parallel Export with Profile") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "prod-sql-01" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "s3://prod-datalake/sales/orders" ` --fileoutput "orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "OrderID" ` --paralleldegree 8 ` --cloudprofile "production" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "prod-sql-01" \ --database "SalesDB" \ --trusted \ --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "s3://prod-datalake/sales/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "RangeId" \ --distributekeycolumn "OrderID" \ --paralleldegree 8 \ --cloudprofile "production" ``` ### Export with Date Partitioning[​](#export-with-date-partitioning "Direct link to Export with Date Partitioning") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "events" ` --directory "s3://analytics-bucket/events/" ` --fileoutput "events.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "eventmonth" ` --paralleldegree 10 ``` ``` ./FastTransfer \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "analytics" \ --user "postgres" \ --password "postgres" \ --sourceschema "public" \ --sourcetable "events" \ --directory "s3://analytics-bucket/events/" \ --fileoutput "events.parquet" \ --parallelmethod "DataDriven" \ --distributekeycolumn "eventmonth" \ --paralleldegree 10 ``` ## S3-Compatible Storage[​](#s3-compatible-storage "Direct link to S3-Compatible Storage") FastTransfer works with S3-compatible storage services like MinIO, DigitalOcean Spaces, Wasabi, and OVH Object Storage. ### Configuration for S3-Compatible Services[​](#configuration-for-s3-compatible-services "Direct link to Configuration for S3-Compatible Services") * Windows (PowerShell) * Linux ``` # Set endpoint URL for S3-compatible service $env:AWS_ACCESS_KEY_ID="your-access-key" $env:AWS_SECRET_ACCESS_KEY="your-secret-key" $env:S3_ENDPOINT="https://s3.your-provider.com" # For MinIO $env:S3_ENDPOINT="http://localhost:9000" ``` ``` # Set endpoint URL for S3-compatible service export AWS_ACCESS_KEY_ID="your-access-key" export AWS_SECRET_ACCESS_KEY="your-secret-key" export S3_ENDPOINT="https://s3.your-provider.com" # For MinIO export S3_ENDPOINT="http://localhost:9000" ``` ## Required Permissions[​](#required-permissions "Direct link to Required Permissions") ### Minimum Permissions[​](#minimum-permissions "Direct link to Minimum Permissions") ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject" ], "Resource": "arn:aws:s3:::my-bucket/exports/*" } ] } ``` ### Recommended Permissions[​](#recommended-permissions "Direct link to Recommended Permissions") ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:PutObjectAcl", "s3:GetObject", "s3:DeleteObject" ], "Resource": "arn:aws:s3:::my-bucket/exports/*" }, { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": "arn:aws:s3:::my-bucket", "Condition": { "StringLike": { "s3:prefix": "exports/*" } } } ] } ``` --- # Azure Configuration Complete guide for configuring Azure Blob Storage and Azure Data Lake Gen2 connectivity with FastTransfer. ## Supported Azure Storage Services[​](#supported-azure-storage-services "Direct link to Supported Azure Storage Services") | Service | Protocol | Best For | | ------------------------ | ---------- | ---------------------------------------------- | | **Azure Blob Storage** | `abs://` | General-purpose object storage | | **Azure Data Lake Gen2** | `abfss://` | Big data analytics and hierarchical namespaces | ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastTransfer supports multiple Azure authentication methods: 1. **Azure CLI** (recommended for local development) 2. **Connection String** (simple but less secure) 3. **Storage Account Key** (via environment variables) 4. **Managed Identity** (recommended for Azure infrastructure) ### 1. Azure CLI[​](#1-azure-cli "Direct link to 1. Azure CLI") The simplest method for local development and testing. **Setup:** ``` # Install Azure CLI # Windows: Download from https://aka.ms/installazurecliwindows # Linux: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # Login to Azure az login # List subscriptions az account list --output table # Set active subscription (if you have multiple) az account set --subscription "My Subscription Name" # or by ID az account set --subscription "12345678-1234-1234-1234-123456789abc" # Verify access to storage account az storage account show --name mystorageaccount --resource-group myresourcegroup ``` FastTransfer will automatically use the Azure CLI's authentication credentials. **Using with FastTransfer:** ``` # No additional configuration needed - just run FastTransfer ./FastTransfer \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" \ --fileoutput "data.parquet" \ ... ``` ### 2. Connection String[​](#2-connection-string "Direct link to 2. Connection String") Useful for CI/CD pipelines and automated workflows. **Get Connection String:** * Azure Portal * Azure CLI 1. Navigate to your Storage Account 2. Go to **Security + networking** → **Access keys** 3. Copy the **Connection string** for key1 or key2 ``` az storage account show-connection-string \ --name mystorageaccount \ --resource-group myresourcegroup \ --output tsv ``` **Set Connection String:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=xxxxx;EndpointSuffix=core.windows.net" # Run FastTransfer .\\FastTransfer.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/container/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=xxxxx;EndpointSuffix=core.windows.net" # Run FastTransfer ./FastTransfer \ ... --directory"abs://mystorageaccount.blob.core.windows.net/mycontaner/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Storage Account Key[​](#3-storage-account-key "Direct link to 3. Storage Account Key") Alternative to connection string using separate environment variables. **Get Storage Account Key:** * Azure Portal * Azure CLI 1. Navigate to your Storage Account 2. Go to **Security + networking** → **Access keys** 3. Copy **key1** or **key2** ``` az storage account keys list \ --account-name mystorageaccount \ --resource-group myresourcegroup \ --query "[0].value" \ --output tsv ``` **Set Environment Variables:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_CLIENT_ID="" $env:AZURE_TENANT_ID="" $env:AZURE_CLIENT_SECRET="" # Run FastTransfer .\\FastTransfer.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontaner/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_CLIENT_ID="" export AZURE_TENANT_ID="" export AZURE_CLIENT_SECRET="" # Run FastTransfer ./FastTransfer \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontaner/exports" \ --fileoutput "data.parquet" \ ... ``` ### 4. Managed Identity[​](#4-managed-identity "Direct link to 4. Managed Identity") When FastTransfer runs on Azure infrastructure, it can use Managed Identity automatically. **No credentials configuration needed!** **Supported Azure Services:** * Azure Virtual Machines * Azure App Service * Azure Functions * Azure Container Instances * Azure Kubernetes Service (AKS) **Enable System-Assigned Managed Identity:** * Azure Portal * Azure CLI 1. Navigate to your Azure resource (VM, App Service, etc.) 2. Go to **Identity** 3. Enable **System assigned** identity 4. Save changes ``` # For a VM az vm identity assign --name myVM --resource-group myResourceGroup # For an App Service az webapp identity assign --name myAppService --resource-group myResourceGroup ``` **Grant Storage Access:** ``` # Get the Managed Identity Object ID PRINCIPAL_ID=$(az vm show --name myVM --resource-group myResourceGroup --query identity.principalId -o tsv) # Assign Storage Blob Data Contributor role az role assignment create \ --assignee $PRINCIPAL_ID \ --role "Storage Blob Data Contributor" \ --scope "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") ### URI Format[​](#uri-format "Direct link to URI Format") ``` abs://storageaccount.blob.core.windows.net/container/path/ ``` ### URI Examples[​](#uri-examples "Direct link to URI Examples") ``` # Root of container --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/" # Folder in container --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" # Nested folders --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports/sales/2024" # Date partitioning --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/yearmonth=202401/" ``` ### Complete Examples[​](#complete-examples "Direct link to Complete Examples") **Basic Export:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Customers" ` --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports/customers" ` --fileoutput "customers.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "SalesDB" \ --trusted \ --sourceschema "dbo" \ --sourcetable "Customers" \ --directory "abs://mystorageaccount.blob.core.windows.net/container/exports/customers" \ --fileoutput "customers.parquet" ``` **Parallel Export with Query:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" ` --directory "abs://mystorageaccount.blob.core.windows.net/container/exports/orders" ` --fileoutput "orders_2024.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ``` ``` ./FastTransfer \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "ecommerce" \ --user "postgres" \ --password "postgres" \ --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" \ --directory "abs://mystorageaccount.blob.core.windows.net/container/exports/orders" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Random" \ --distributekeycolumn "order_id" \ --paralleldegree 8 ``` ## Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Azure Data Lake Storage Gen2 is recommended for analytics workloads due to hierarchical namespace support and better performance. ### URI Format[​](#uri-format-1 "Direct link to URI Format") ``` abfss://container@storageaccount.dfs.core.windows.net/path/ ``` Key Differences from Blob Storage * **Protocol:** `abfss://` instead of `abs://` * **Endpoint:** `.dfs.core.windows.net` instead of `.blob.core.windows.net` * **Features:** Hierarchical namespace, directory-level operations, better performance ### URI Examples[​](#uri-examples-1 "Direct link to URI Examples") ``` # Root of filesystem --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake" # Folder in filesystem --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake/raw/sales" # Hive-style partitioning --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake/sales/yearmonth=202401" ``` ### Complete Examples[​](#complete-examples-1 "Direct link to Complete Examples") **Basic Export:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake/raw/{sourcetable}/" ` --fileoutput "FactSales.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "DataWarehouse" \ --trusted \ --sourceschema "dbo" \ --sourcetable "FactSales" \ --directory "abfss://datalake@mystorageaccount.dfs.core.windows.net/raw/{sourcetable}/" \ --fileoutput "FactSales.parquet" ``` **Parallel Export with Partitioning:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "Analytics" ` --trusted ` --query "SELECT * FROM Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/mycontainer/{sourcedatabase}/events/" ` --fileoutput "events.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "EventDate" ` --datadrivenquery "SELECT RefDate From Calendar WHERE RefDate between '2024-01-01' and '2024-03-01'" ` --paralleldegree 12 ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "Analytics" \ --trusted \ --query "SELECT * FROM Events" \ --directory "abfss://mystorageaccount.dfs.core.windows.net/mycontainer/{sourcedatabase}/events/" \ --fileoutput "events.parquet" \ --parallelmethod "DataDriven" \ --distributekeycolumn "EventDate" \ --datadrivenquery "SELECT RefDate From Calendar WHERE RefDate between '2024-01-01' and '2024-03-01'" \ --paralleldegree 12 ``` ## Required Permissions[​](#required-permissions "Direct link to Required Permissions") ### Azure RBAC Roles[​](#azure-rbac-roles "Direct link to Azure RBAC Roles") **Recommended Role:** * **Storage Blob Data Contributor** - Full read/write access to blobs **Alternative Roles:** * **Storage Blob Data Owner** - Full access including ACL management * **Storage Blob Data Reader** - Read-only access (for verification) ### Assign Role via Azure Portal[​](#assign-role-via-azure-portal "Direct link to Assign Role via Azure Portal") 1. Navigate to your Storage Account 2. Go to **Access Control (IAM)** 3. Click **Add** → **Add role assignment** 4. Select **Storage Blob Data Contributor** 5. Select user, group, or managed identity 6. Click **Save** ### Assign Role via Azure CLI[​](#assign-role-via-azure-cli "Direct link to Assign Role via Azure CLI") ``` # For a user az role assignment create \ --assignee user@example.com \ --role "Storage Blob Data Contributor" \ --scope "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}" # For a managed identity az role assignment create \ --assignee {managed-identity-object-id} \ --role "Storage Blob Data Contributor" \ --scope "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}" ``` --- # Google Cloud Storage Configuration Complete guide for configuring Google Cloud Storage connectivity with FastTransfer. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastTransfer supports multiple Google Cloud authentication methods: 1. **gcloud CLI** (recommended for local development) 2. **Service Account Key File** (recommended for production) 3. **Default Application Credentials** (for GCP infrastructure) ### 1. gcloud CLI (Recommended)[​](#1-gcloud-cli-recommended "Direct link to 1. gcloud CLI (Recommended)") The simplest method for local development and testing. **Setup:** ``` # Install gcloud CLI # Windows: Download from https://cloud.google.com/sdk/docs/install # Linux: curl https://sdk.cloud.google.com | bash # Initialize gcloud gcloud init # Login to Google Cloud gcloud auth login # List available projects gcloud projects list # Set active project gcloud config set project my-project-id # Create application default credentials gcloud auth application-default login ``` FastTransfer will automatically use the gcloud CLI's authentication credentials. **Using with FastTransfer:** ``` # No additional configuration needed - just run FastTransfer ./FastTransfer \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 2. Service Account Key File[​](#2-service-account-key-file "Direct link to 2. Service Account Key File") Recommended for production environments, CI/CD pipelines, and automated workflows. **Create Service Account:** * Google Cloud Console * gcloud CLI 1. Go to [IAM & Admin → Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) 2. Click **Create Service Account** 3. Enter name (e.g., "FastTransfer-export") 4. Click **Create and Continue** 5. Grant **Storage Object Admin** role 6. Click **Continue** → **Done** 7. Click on the service account 8. Go to **Keys** tab 9. Click **Add Key** → **Create new key** 10. Select **JSON** format 11. Click **Create** (JSON file will download) ``` # Create service account gcloud iam service-accounts create FastTransfer-export \ --display-name="FastTransfer Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:FastTransfer-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/FastTransfer-key.json \ --iam-account=FastTransfer-export@my-project-id.iam.gserviceaccount.com ``` **Use Service Account Key:** * Windows (PowerShell) * Linux ``` # Set path to service account key file $env:GOOGLE_APPLICATION_CREDENTIALS="C:\keys\FastTransfer-key.json" # Run FastTransfer .\\FastTransfer.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/FastTransfer-key.json" # Run FastTransfer ./FastTransfer \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastTransfer runs on Google Cloud infrastructure, it automatically uses the default service account. **No credentials configuration needed!** **Supported GCP Services:** * Compute Engine instances * Google Kubernetes Engine (GKE) pods * Cloud Run services * Cloud Functions * App Engine **Verify Default Credentials:** ``` gcloud auth application-default print-access-token ``` ## GCS URI Format[​](#gcs-uri-format "Direct link to GCS URI Format") ``` gs://bucket-name/path/to/directory/ ``` ### URI Examples[​](#uri-examples "Direct link to URI Examples") ``` # Root of bucket --directory "gs://my-bucket" # Single folder level --directory "gs://my-bucket/exports" # Multiple folder levels --directory "gs://my-bucket/exports/sales/2024" # Hive-style partitioning --directory "gs://my-bucket/data/year=2024/month=01/day=15" ``` ## Complete Examples[​](#complete-examples "Direct link to Complete Examples") ### Basic Export to GCS[​](#basic-export-to-gcs "Direct link to Basic Export to GCS") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "SalesDB" \ --trusted \ --sourceschema "dbo" \ --sourcetable "Orders" \ --directory "gs://my-bucket/exports/orders" \ --fileoutput "orders.parquet" ``` ### Parallel Export with Query[​](#parallel-export-with-query "Direct link to Parallel Export with Query") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" ` --directory "gs://analytics-bucket/events/2024" ` --fileoutput "events.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ``` ``` ./FastTransfer \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "analytics" \ --user "postgres" \ --password "postgres" \ --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" \ --directory "gs://analytics-bucket/events/2024" \ --fileoutput "events.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 10 ``` ### Export with Date Partitioning[​](#export-with-date-partitioning "Direct link to Export with Date Partitioning") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "ecommerce" ` --user "root" ` --password "password" ` --sourceschema "ecommerce" ` --sourcetable "orders" ` --directory "gs://datalake-bucket/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 8 ``` ``` ./FastTransfer \ --connectiontype "mysql" \ --server "localhost" \ --port "3306" \ --database "ecommerce" \ --user "root" \ --password "password" \ --sourceschema "ecommerce" \ --sourcetable "orders" \ --directory "gs://datalake-bucket/orders/" \ --fileoutput "orders.parquet" \ --parallelmethod "DataDriven" \ --distributekeycolumn "o_orderdate" \ --paralleldegree 8 ``` ### Export from Oracle to GCS using Rowid parallelmethod[​](#export-from-oracle-to-gcs-using-rowid-parallelmethod "Direct link to Export from Oracle to GCS using Rowid parallelmethod") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "gs://warehouse-bucket/oracle-export/orders" ` --fileoutput "orders.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 8 ``` ``` ./FastTransfer \ --connectiontype "oraodp" \ --server "localhost:1521/ORCLPDB1" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "gs://warehouse-bucket/oracle-export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Rowid" \ --paralleldegree 8 \ --merge "True" ``` ## Bucket Configuration[​](#bucket-configuration "Direct link to Bucket Configuration") ### Create Bucket[​](#create-bucket "Direct link to Create Bucket") * Google Cloud Console * gcloud CLI 1. Go to [Cloud Storage → Buckets](https://console.cloud.google.com/storage/browser) 2. Click **Create Bucket** 3. Enter bucket name (globally unique) 4. Choose location type and region 5. Choose storage class (Standard, Nearline, Coldline, Archive) 6. Set access control (Uniform or Fine-grained) 7. Click **Create** ``` # Create bucket in us-central1 gsutil mb -l us-central1 gs://my-bucket # Create bucket with specific storage class gsutil mb -c STANDARD -l us-central1 gs://my-bucket # Set uniform bucket-level access gsutil uniformbucketlevelaccess set on gs://my-bucket ``` ## Required Permissions[​](#required-permissions "Direct link to Required Permissions") ### IAM Roles[​](#iam-roles "Direct link to IAM Roles") **Recommended Roles:** * **Storage Object Creator** (`roles/storage.objectCreator`) - Create objects only * **Storage Object Viewer** (`roles/storage.objectViewer`) - Read objects only ### Grant Access via Console[​](#grant-access-via-console "Direct link to Grant Access via Console") 1. Go to [Cloud Storage → Buckets](https://console.cloud.google.com/storage/browser) 2. Click bucket name 3. Go to **Permissions** tab 4. Click **Grant Access** 5. Enter principal (user, service account, or group) 6. Select role (e.g., **Storage Object Admin**) 7. Click **Save** ### Grant Access via gcloud CLI[​](#grant-access-via-gcloud-cli "Direct link to Grant Access via gcloud CLI") ``` # Grant to service account gsutil iam ch serviceAccount:FastTransfer-export@my-project-id.iam.gserviceaccount.com:roles/storage.objectAdmin gs://my-bucket ``` ### Minimal Permissions[​](#minimal-permissions "Direct link to Minimal Permissions") Minimum permissions for FastTransfer instead of bucket storage admin: * `storage.objects.create` - Upload objects * `storage.objects.delete` - Delete objects (for overwrite) * `storage.objects.get` - Read objects (for verification) * `storage.objects.list` - List objects in bucket --- # OneLake Configuration * 1 - In Entra : Create an application account in your tenant * 2 - In Entra : Create a secret for this application * 3 - In Entra : Grant the application on PowerBI Service in API Permission * 4 - In Fabric : Give the Service principal created in step 1, the Admin Role in your workspace in you shell set environment variables * Windows * Linux ``` $env:AZURE_TENANT_ID="YOUR_TENANT_ID" $env:AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" $env:AZURE_CLIENT_SECRET="Your_AZCLient_Secret" .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "sales" ` --sourcetable "orders" ` --query "SELECT * FROM orders WHERE order_date between '2024-01-01' and '2024-12-31'" ` --directory "onelakes://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" ` --fileoutput "orders_2024.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 8 ``` ``` export AZURE_TENANT_ID="YOUR_TENANT_ID" export AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" export AZURE_CLIENT_SECRET="Your_AZCLient_Secret" ./FastTransfer ` --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "ecommerce" \ --user "postgres" \ --password "postgres" \ --sourceschema "sales"\ --sourcetable "orders" \ --query "SELECT * FROM orders WHERE order_date between '2024-01-01' and '2024-12-31'" \ --directory "onelakes://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastTransfer provides native support for exporting data directly to major cloud storage platforms without requiring intermediate local storage. ## Supported Platforms[​](#supported-platforms "Direct link to Supported Platforms") | Platform | Protocol | Authentication Methods | | ------------------------- | ------------ | ----------------------------------------------------------- | | **AWS S3** | `s3://` | Credentials file, Environment variables, IAM roles | | **Azure Blob Storage** | `abs://` | Azure CLI, Connection string, Access keys, Managed Identity | | **Azure Data Lake Gen2** | `abfss://` | Azure CLI, Connection string, Access keys, Managed Identity | | **Google Cloud Storage** | `gs://` | gcloud CLI, Service account, Default credentials | | **S3-Compatible Storage** | `s3://` | Credentials file, Environment variables | | **OneLake** | `onelake://` | Azure CLI, Connection string, Access keys, Managed Identity | ## Key Features[​](#key-features "Direct link to Key Features") ### Direct Upload[​](#direct-upload "Direct link to Direct Upload") Export data directly to cloud storage without local disk space requirements. note FastTransfer will use multi-part uploads for all cloud provider Warning Since FastTransfer can be cancelled, killed, or crash unexpectedly, any multipart uploads it initiates may remain incomplete. These unfinished multipart uploads continue to occupy storage and may incur additional costs. To prevent this, **you should configure a lifecycle management rule on your bucket to automatically delete incomplete multipart uploads older than x days**. ### Multiple Authentication Methods[​](#multiple-authentication-methods "Direct link to Multiple Authentication Methods") FastTransfer supports multiple authentication mechanisms, including CLI profiles, credentials files, environment variables, and cloud-native identity solutions. Authentication is resolved through a fallback chain, in the following order: * The `--cloudprofile` option is used first, if provided. * Standard authentication environment variables are used as the first fallback. * Managed Identity is used as the second fallback. * An IAM role/profile is used as the final fallback. ### Profile Management[​](#profile-management "Direct link to Profile Management") Use the `--cloudprofile` parameter can allow you to switch between different cloud accounts and environments (development, staging, production). ### Automatic Retry[​](#automatic-retry "Direct link to Automatic Retry") Built-in retry logic for network failures and transient cloud service errors. ## Quick Start[​](#quick-start "Direct link to Quick Start") ### 1. Configure Cloud Authentication[​](#1-configure-cloud-authentication "Direct link to 1. Configure Cloud Authentication") Choose your cloud provider and follow the setup guide: * [AWS S3 Setup](/0.15/documentation/cloud-connectivity/aws-s3.md) * [Azure Setup](/0.15/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage Setup](/0.15/documentation/cloud-connectivity/google-cloud.md) ### 2. Export to Cloud[​](#2-export-to-cloud "Direct link to 2. Export to Cloud") Use the appropriate URI scheme in the `--directory` parameter: ``` # AWS S3 & S3-Compatible ./FastTransfer / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastTransfer \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastTransfer \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastTransfer \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastTransfer \ ... --directory "onelake://MyWorSpace/MyLakeHouse/MyDir/" \ --fileoutput "data.parquet" \ ... ``` ### 3. Use Profiles[​](#3-use-profiles "Direct link to 3. Use Profiles") Switch between different cloud accounts: ``` ./FastTransfer \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastTransfer \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastTransfer supports Windows, Linux, and macOS across different architectures. ## Supported Operating Systems[​](#supported-operating-systems "Direct link to Supported Operating Systems") * Windows * Linux | OS | Versions | Architectures | Supported | | ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------- | --------- | | Nano Server | 2025, 2022, 2019 | x64 | | | Windows | 11 24H2 (IoT), 11 24H2 (E), 11 24H2, 11 23H2, 11 22H2 (E), 10 22H2, 10 21H2 (E), 10 21H2 (IoT), 10 1809 (E), 10 1607 (E) | x64 | | | Windows Server | 2025, 23H2, 2022, 2019, 2016, 2012-R2, 2012 | x64 | | | Windows Server Core | 2025, 2022, 2019, 2016, 2012-R2, 2012 | x64 | | | OS | Versions | Architectures | Supported | | ------------------------ | -------------------------- | ------------- | --------- | | Alpine | 3.21, 3.20, 3.19, 3.18 | Arm64, x64 | | | Azure Linux | 3.0 | Arm64, x64 | | | CentOS Stream | 10, 9 | Arm64, x64 | | | Debian | 12 | Arm64, x64 | | | Fedora | 41, 40 | Arm64, x64 | | | openSUSE Leap | 15.6 | Arm64, x64 | | | Red Hat Enterprise Linux | 10, 9, 8 | Arm64, x64 | | | SUSE Enterprise Linux | 15.6 | Arm64, x64 | | | Ubuntu | 24.10, 24.04, 22.04, 20.04 | Arm64, x64 | | --- # Database Sources & Platforms FastTransfer supports a wide range of database systems across different platforms. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") | Source | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **ClickHouse** | | | | | **DuckDB** | | | | | **MySQL** | | | | | **Netezza** | | | | | **ODBC** | | | | | **OLEDB** | | | | | **Oracle** | | | | | **PostgreSQL** | | | | | **SQL Server** | | | | | **SAP Hana** | | | | | **Teradata** | | | | ## Supported Targets[​](#supported-targets "Direct link to Supported Targets") | Target | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **ClickHouse** | | | | | **DuckDB** | | | | | **MySQL** | | | | | **Netezza** | | | | | **ODBC** | | | | | **OLEDB** | | | | | **Oracle** | | | | | **PostgreSQL** | | | | | **SQL Server** | | | | | **SAP Hana** | | | | | **Teradata** | | | | --- # Advanced Scenarios Advanced use cases including DuckDB integration, ClickHouse, SAP HANA, Teradata, and other complex transfer scenarios. ## DuckDB Integration[​](#duckdb-integration "Direct link to DuckDB Integration") DuckDB provides powerful data transformation capabilities with FastTransfer. ### DuckDB Memory - Parquet with Nested Fields to MSSQL[​](#duckdb-memory---parquet-with-nested-fields-to-mssql "Direct link to DuckDB Memory - Parquet with Nested Fields to MSSQL") Process complex nested JSON/Parquet files with DuckDB's in-memory engine: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdb" ` --sourceserver ":memory:" ` --query "select * EXCLUDE(Risques, Interlocuteurs),unnest(interlocuteurs,recursive := true ) from (select day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) from read_parquet('D:\CLIENTS\ENEDIS\BI4ALL\CHANTIER\**\*.parquet', hive_partitioning=true)) t_row_unest" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "ENDSBI4ALL" ` --targetschema "bi4all" ` --targettable "DuckChantiers_hpart" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "day" ` --loadmode "Truncate" ` --degree 8 ``` DuckDB Memory Mode Use `:memory:` as the server to process data without persisting a DuckDB database file. Perfect for ETL transformations. ### DuckDB Stream - Multiple CSV Files with DataDriven[​](#duckdb-stream---multiple-csv-files-with-datadriven "Direct link to DuckDB Stream - Multiple CSV Files with DataDriven") Process multiple CSV files in parallel using filename as distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - Single Large CSV with Random Method[​](#duckdb-stream---single-large-csv-with-random-method "Direct link to DuckDB Stream - Single Large CSV with Random Method") Process a single large CSV file with parallel Random distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributeKeyColumn "l_orderkey" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - CSV with Column Slicing[​](#duckdb-stream---csv-with-column-slicing "Direct link to DuckDB Stream - CSV with Column Slicing") Use calculated column slices for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --loadmode "Truncate" ` --degree 13 ``` ### DuckDB Stream - CSV with Custom Format[​](#duckdb-stream---csv-with-custom-format "Direct link to DuckDB Stream - CSV with Custom Format") Specify CSV format parameters when auto-detection isn't sufficient: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(id/10000)::int" ` --loadmode "Truncate" ` --degree 12 ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributeKeyColumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## ClickHouse Integration[​](#clickhouse-integration "Direct link to ClickHouse Integration") ### PostgreSQL to ClickHouse - Single-threaded[​](#postgresql-to-clickhouse---single-threaded "Direct link to PostgreSQL to ClickHouse - Single-threaded") Transfer data to ClickHouse without parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ### PostgreSQL to ClickHouse - Parallel with Ctid[​](#postgresql-to-clickhouse---parallel-with-ctid "Direct link to PostgreSQL to ClickHouse - Parallel with Ctid") High-performance transfer using PostgreSQL's Ctid method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL - Multiple Methods[​](#clickhouse-to-postgresql---multiple-methods "Direct link to ClickHouse to PostgreSQL - Multiple Methods") Transfer from ClickHouse to PostgreSQL using various distribution methods: * Single-threaded * RangeId Method * DataDriven Method ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## SAP HANA Integration[​](#sap-hana-integration "Direct link to SAP HANA Integration") ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data to SAP HANA using the HANA bulk loader: **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer from SAP HANA to PostgreSQL: ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## Teradata Integration[​](#teradata-integration "Direct link to Teradata Integration") ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data to Teradata with parallel Ctid method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## Netezza Integration[​](#netezza-integration "Direct link to Netezza Integration") Transfer from Netezza to MSSQL using DATASLICEID for optimal parallelism: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "DATASLICEID" ` --degree 6 ``` Netezza DATASLICEID Use DATASLICEID as the distribution column to leverage Netezza's internal data distribution for optimal parallel extraction. ## Advanced SQL Server Techniques[​](#advanced-sql-server-techniques "Direct link to Advanced SQL Server Techniques") ### Using Partition Functions[​](#using-partition-functions "Direct link to Using Partition Functions") Leverage SQL Server partition functions for efficient parallel transfers: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` Partition Function Syntax Use `` `$PARTITION.FunctionName(ColumnName) `` to reference a partition function. The backtick (`` ` ``) escapes the dollar sign in PowerShell. ### Using Physloc Method[​](#using-physloc-method "Direct link to Using Physloc Method") Use physical location for parallel distribution (readonly tables only): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` Physloc Method The Physloc method should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Dynamic Degree with Negative Values[​](#dynamic-degree-with-negative-values "Direct link to Dynamic Degree with Negative Values") Use negative degree values to automatically calculate parallelism based on CPU cores: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree -4 ` --loadmode "Truncate" ``` Dynamic Degree A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores. With 8 cores, `-4` results in 32 parallel threads. ### Batch Size Optimization[​](#batch-size-optimization "Direct link to Batch Size Optimization") Adjust batch size based on connection type for optimal performance: * **MSSQL (msbulk)**: 10,000 - 100,000 rows * **PostgreSQL (pgcopy)**: 10,000 - 50,000 rows * **Oracle (orabulk)**: 100,000 - 500,000 rows * **Oracle (oradirect)**: 1,000 - 10,000 rows * **ClickHouse**: 10,000 - 1,000,000 rows * **SAP HANA**: 5,000 - 10,000 rows ### Debug Logging[​](#debug-logging "Direct link to Debug Logging") Enable detailed logging for troubleshooting: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` Debug Mode Use `--loglevel "debug"` to see detailed execution steps, connection information, and query generation details for troubleshooting. ## Using Input Files[​](#using-input-files "Direct link to Using Input Files") Process SQL queries from external files: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourcefile "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ## Column Mapping[​](#column-mapping "Direct link to Column Mapping") ### Map by Name[​](#map-by-name "Direct link to Map by Name") Automatically map columns by name (default): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # CSV Import FastTransfer leverages a powerful `read_csv` function to efficiently import CSV files into any supported database. DuckDB provides advanced features like automatic schema detection, parallel processing, and support for complex CSV formats. FastTransfer offers several advantages for CSV processing: * **Automatic schema detection** - No need to manually define column types * **High performance** - Optimized CSV parser with parallel reading * **Flexible formatting** - Handle various delimiters, quotes, and escape characters * **Multi-file support** - Process multiple CSV files with glob patterns * **In-memory processing** - No need for a persistent database file ## Basic CSV Import[​](#basic-csv-import "Direct link to Basic CSV Import") ### Single Small CSV File[​](#single-small-csv-file "Direct link to Single Small CSV File") Import a single CSV file using a streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Using :memory: The `:memory:` server parameter tells FastTransfer to operate in-memory without creating a database file. This is perfect for one-time CSV imports. ### Medium CSV File - Single Thread[​](#medium-csv-file---single-thread "Direct link to Medium CSV File - Single Thread") Import a medium-sized CSV file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel CSV Import[​](#parallel-csv-import "Direct link to Parallel CSV Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(id/10000)::int` divides the ID column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large CSV[​](#random-method-on-large-csv "Direct link to Random Method on Large CSV") Process a large CSV file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributeKeyColumn "l_orderkey" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 13 ``` ## Multiple CSV Files[​](#multiple-csv-files "Direct link to Multiple CSV Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple CSV files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_csv()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Advanced CSV Formats[​](#advanced-csv-formats "Direct link to Advanced CSV Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") When automatic detection doesn't work, specify the CSV format explicitly: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` **Format Parameters:** * `auto_detect=false` - Disable automatic schema detection * `delim=','` - Field delimiter (comma) * `quote='"'` - Quote character for fields containing delimiters * `escape='"'` - Escape character for quotes within quoted fields * `new_line='\n'` - Line terminator * `skip=0` - Number of lines to skip at the start * `comment=''` - Character indicating comment lines to ignore * `header=true` - First line contains column names * `columns={...}` - Explicit column names and types ### CSV with Vector Data to SQL Server[​](#csv-with-vector-data-to-sql-server "Direct link to CSV with Vector Data to SQL Server") Import CSV containing vector embeddings as VARCHAR: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id,url,title,text,title_vector::varchar tv,content_vector::varchar cv,vector_id from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') limit 100" ` --targetconnectiontype "msbulk" ` --targetserver "localhost\SS2025" ` --targettrusted ` --targetdatabase "wikipedia" ` --targetschema "dbo" ` --targettable "wikipedia_articles_embeddings_as_vector" ` --mapmethod "Name" ` --loadmode "Append" ``` ## Common CSV Scenarios[​](#common-csv-scenarios "Direct link to Common CSV Scenarios") ### Tab-Delimited Files[​](#tab-delimited-files "Direct link to Tab-Delimited Files") For tab-separated values (TSV): ``` --query "SELECT * FROM read_csv('file.tsv', delim='\t')" ``` ### CSV with Different Encodings[​](#csv-with-different-encodings "Direct link to CSV with Different Encodings") ``` --query "SELECT * FROM read_csv('file.csv', encoding='UTF-8')" ``` ### CSV with Custom Quote Character[​](#csv-with-custom-quote-character "Direct link to CSV with Custom Quote Character") ``` --query "SELECT * FROM read_csv('file.csv', quote='''', escape='''')" ``` ### CSV Without Headers[​](#csv-without-headers "Direct link to CSV Without Headers") ``` --query "SELECT * FROM read_csv('file.csv', header=false, columns={'col1': 'VARCHAR', 'col2': 'INTEGER'})" ``` ### Skip Header Lines[​](#skip-header-lines "Direct link to Skip Header Lines") ``` --query "SELECT * FROM read_csv('file.csv', skip=3)" ``` --- # JSON Import FastTransfer leverages a powerful `read_json` function to efficiently import JSON files into any supported database. DuckDB provides advanced features like automatic schema detection, nested structure handling, and support for both JSON objects and JSON Lines (JSONL/NDJSON) formats. FastTransfer offers several advantages for JSON processing: * **Automatic schema detection** - Automatically infers column types from JSON structure * **High performance** - Optimized JSON parser with parallel reading * **Nested structure support** - Handle complex nested objects and arrays * **Multiple formats** - Support for JSON, JSON Lines (JSONL), and NDJSON * **Array flattening** - Use `unnest()` to flatten nested arrays * **In-memory processing** - No need for a persistent database file ## Basic JSON Import[​](#basic-json-import "Direct link to Basic JSON Import") ### Single JSON File[​](#single-json-file "Direct link to Single JSON File") Import a single JSON file using a streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\users.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "AppDB" ` --targetschema "dbo" ` --targettable "users" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` JSON Formats FastTransfer automatically detects the JSON format: * **JSON Array**: `[{...}, {...}]` - Array of objects * **JSON Lines (JSONL)**: One JSON object per line * **NDJSON**: Newline-delimited JSON objects ### JSON Lines File - Single Thread[​](#json-lines-file---single-thread "Direct link to JSON Lines File - Single Thread") Import a JSON Lines file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\events.jsonl', format='newline_delimited')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "analytics" ` --targetschema "public" ` --targettable "events" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel JSON Import[​](#parallel-json-import "Direct link to Parallel JSON Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\orders.jsonl')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(order_id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(order_id/10000)::int` divides the order\_id column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large JSON File[​](#random-method-on-large-json-file "Direct link to Random Method on Large JSON File") Process a large JSON Lines file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\transactions.jsonl')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "Random" ` --distributeKeyColumn "transaction_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\logs.jsonl') rjson" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(event_timestamp::date)" ` --datadrivenquery "select distinct event_timestamp::date from read_json('D:\DATA\logs.jsonl') rjson" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple JSON Files[​](#multiple-json-files "Direct link to Multiple JSON Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple JSON files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_json('D:\DATA\daily\*.jsonl', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_metrics" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.jsonl')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_json()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Nested JSON Structures[​](#nested-json-structures "Direct link to Nested JSON Structures") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested JSON structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, user.name as user_name, user.email as user_email, order_date, total_amount FROM read_json('D:\DATA\orders.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within JSON objects: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(items, recursive := true) FROM read_json('D:\DATA\orders_with_items.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structure[​](#complex-nested-structure "Direct link to Complex Nested Structure") Handle deeply nested JSON with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, address.street as street, address.city as city, address.country as country, contacts[1] as primary_contact FROM read_json('D:\DATA\customers.json')" ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "crm" ` --targetuser "crmuser" ` --targetpassword "YourPassword" ` --targetschema "crm" ` --targettable "customers" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Advanced JSON Formats[​](#advanced-json-formats "Direct link to Advanced JSON Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") Specify JSON format explicitly when needed: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\data.json', format='array', maximum_depth=10)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "raw_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` **Format Parameters:** * `format='array'` - JSON array of objects * `format='newline_delimited'` - JSON Lines (JSONL/NDJSON) * `format='auto'` - Automatic detection (default) * `maximum_depth` - Maximum nesting depth to parse * `records='true'` - Parse records format * `columns={...}` - Explicit column names and types ### Compressed JSON Files[​](#compressed-json-files "Direct link to Compressed JSON Files") Import gzip-compressed JSON files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\logs.jsonl.gz', compression='gzip')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "compressed_logs" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Compression Support DuckDB automatically detects compression from file extensions: * `.gz` - Gzip compression * `.json.gz` or `.jsonl.gz` - Compressed JSON files ## JSON Type Conversions[​](#json-type-conversions "Direct link to JSON Type Conversions") ### Converting JSON Fields[​](#converting-json-fields "Direct link to Converting JSON Fields") Transform JSON data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, CAST(amount AS DECIMAL(10,2)) as amount, status FROM read_json('D:\DATA\payments.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "payments" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### JSON String to Array[​](#json-string-to-array "Direct link to JSON String to Array") Convert JSON string fields to arrays: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, json_extract(tags, '$') as tags_array FROM read_json('D:\DATA\products.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "catalog" ` --targetschema "public" ` --targettable "products" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # MySQL Examples Examples for transferring data from and to MySQL databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") MySQL transfers support: * **mysql**: Standard MySQL protocol for reading * **mysqlbulk**: MySQL bulk loader for high-performance target loading ## MySQL to MSSQL - Single-threaded Transfer[​](#mysql-to-mssql---single-threaded-transfer "Direct link to MySQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with Random Method[​](#mysql-to-mssql---parallel-transfer-with-random-method "Direct link to MySQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mysql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MySQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values. **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year(o_orderdate)" ` --degree 10 ` --loadmode Truncate ``` **Using partitioned table with year column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "o_orderdate_year" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "FREEPDB1" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## MSSQL to MySQL - Single-threaded Transfer[​](#mssql-to-mysql---single-threaded-transfer "Direct link to MSSQL to MySQL - Single-threaded Transfer") Transfer data from SQL Server to MySQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Parallel Transfer with Random Method[​](#mssql-to-mysql---parallel-transfer-with-random-method "Direct link to MSSQL to MySQL - Parallel Transfer with Random Method") Transfer with Random distribution. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Using Partition Function[​](#mssql-to-mysql---using-partition-function "Direct link to MSSQL to MySQL - Using Partition Function") Transfer with DataDriven method using SQL Server partition function. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Adding Computed Column[​](#mssql-to-mysql---adding-computed-column "Direct link to MSSQL to MySQL - Adding Computed Column") Transfer with additional computed column and DataDriven method. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select *,null as o_orderdate_year from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores to determine the actual degree of parallelism. ## Using ODBC Connection to MySQL[​](#using-odbc-connection-to-mysql "Direct link to Using ODBC Connection to MySQL") Transfer using ODBC DSN for MySQL connection. ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcename "DSNMySQLTPCH" ` --sourcedatabase "tpch" ` --query "select * from tpch.orders_part LIMIT 10" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for transferring data from and to Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle transfers support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended for source) * **orabulk**: Oracle Bulk Loader for high-performance target loading * **oradirect**: Oracle Direct Path for target loading * **odbc**: Using ODBC DSN ## Oracle to MSSQL - Single-threaded Transfer[​](#oracle-to-mssql---single-threaded-transfer "Direct link to Oracle to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "localhost:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ``` ## Oracle to MSSQL - Parallel Transfer with Rowid Method[​](#oracle-to-mssql---parallel-transfer-with-rowid-method "Direct link to Oracle to MSSQL - Parallel Transfer with Rowid Method") Oracle-specific parallel transfer using physical row identifier (ROWID). Oracle-Specific The Rowid method is unique to Oracle and uses the physical row identifier for parallel data distribution. This is very efficient for full table transfers. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "LOCALHOST:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS_FLAT" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Rowid" ` --loadmode "Truncate" ` --degree 12 ``` ## PostgreSQL to Oracle - Using orabulk (Bulk Loader)[​](#postgresql-to-oracle---using-orabulk-bulk-loader "Direct link to PostgreSQL to Oracle - Using orabulk (Bulk Loader)") Transfer data from PostgreSQL to Oracle using Oracle bulk loader. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## PostgreSQL to Oracle - Using oradirect (Direct Path)[​](#postgresql-to-oracle---using-oradirect-direct-path "Direct link to PostgreSQL to Oracle - Using oradirect (Direct Path)") Transfer data from PostgreSQL to Oracle using Oracle direct path loading. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 1000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "FREEPDB1" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## Using ODBC Connection to Oracle[​](#using-odbc-connection-to-oracle "Direct link to Using ODBC Connection to Oracle") Transfer using ODBC DSN for Oracle connection. **To MSSQL - single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNORA23CFREEPDB1" ` --sourcedatabase "FREEPDB1" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for transferring data from and to ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB databases. ## ClickHouse[​](#clickhouse "Direct link to ClickHouse") Transfer data from and to ClickHouse database. ### PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse using the bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL[​](#clickhouse-to-postgresql "Direct link to ClickHouse to PostgreSQL") Transfer data from ClickHouse to PostgreSQL with various parallelization methods. **Single-threaded:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with RangeId:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Ntile:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Ntile" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Random:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with DataDriven:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ClickHouse Connection Types * **clickhouse**: Standard connection for reading * **clickhousebulk**: High-performance bulk loader for writing ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Transfer data from and to SAP HANA database. ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA using the HANA bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Batch Size For SAP HANA, use batch sizes between 5,000 and 10,000 rows for optimal performance. ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer data from SAP HANA to PostgreSQL. ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Connection Types * **hana**: Standard connection for reading from SAP HANA * **hanabulk**: Bulk loader for writing to SAP HANA ## Netezza[​](#netezza "Direct link to Netezza") Transfer data from Netezza using the DATASLICEID for optimal parallelism. ### Netezza to MSSQL[​](#netezza-to-mssql "Direct link to Netezza to MSSQL") Transfer from Netezza to SQL Server using DataDriven method on DATASLICEID: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "DATASLICEID" ` --degree 6 ` --loadmode Truncate ``` Netezza DATASLICEID The DATASLICEID column in Netezza represents the internal data distribution. Using it as the distribution key provides optimal parallel extraction by leveraging Netezza's data placement. ## Teradata[​](#teradata "Direct link to Teradata") Transfer data from and to Teradata database. ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer data from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## DuckDB[​](#duckdb "Direct link to DuckDB") Transfer data from and to DuckDB database files or in-memory. ### MSSQL to DuckDB File[​](#mssql-to-duckdb-file "Direct link to MSSQL to DuckDB File") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributeKeyColumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### DuckDB Stream - CSV Files[​](#duckdb-stream---csv-files "Direct link to DuckDB Stream - CSV Files") Process CSV files using DuckDB's in-memory engine and load into SQL Server: **Single CSV file:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Multiple CSV files with parallel processing:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` DuckDB Connection Types * **duckdb**: Direct connection to DuckDB file * **duckdbstream**: Streaming connection for in-memory processing or file-based operations * Use `:memory:` as server for in-memory processing tip Build your command with the [Wizard](/latest/wizard.md) --- # Parquet Import with DuckDB FastTransfer leverages DuckDB's powerful `read_parquet` function to efficiently import Parquet files into any supported database. Parquet is a columnar storage format optimized for analytics, and DuckDB provides excellent performance and feature support for reading Parquet files. DuckDB offers several advantages for Parquet processing: * **Columnar access** - Read only the columns you need for optimal performance * **Predicate pushdown** - Filter data at the file level before loading * **Automatic schema detection** - Column types preserved from Parquet metadata * **High performance** - Optimized Parquet reader with parallel processing * **Compression support** - Handles all Parquet compression codecs (Snappy, Gzip, LZ4, Zstd) * **Nested structure support** - Handle complex nested objects, arrays, and maps * **Multi-file support** - Process multiple Parquet files with glob patterns * **Partition support** - Hive-style partitioning for efficient data access ## Basic Parquet Import[​](#basic-parquet-import "Direct link to Basic Parquet Import") ### Single Parquet File[​](#single-parquet-file "Direct link to Single Parquet File") Import a single Parquet file using DuckDB's in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\sales.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "SalesDB" ` --targetschema "dbo" ` --targettable "sales" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Column Selection For optimal performance, select only the columns you need: ``` --query "SELECT customer_id, order_date, total_amount FROM read_parquet('file.parquet')" ``` This reduces I/O and memory usage significantly. ### Multiple Parquet Files - Single Thread[​](#multiple-parquet-files---single-thread "Direct link to Multiple Parquet Files - Single Thread") Import multiple Parquet files using glob pattern: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\orders\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel Parquet Import[​](#parallel-parquet-import "Direct link to Parallel Parquet Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\transactions\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "finance" ` --targetschema "public" ` --targettable "transactions" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(transaction_id/100000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(transaction_id/100000)::int` divides the ID by 100,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large Parquet Files[​](#random-method-on-large-parquet-files "Direct link to Random Method on Large Parquet Files") Process large Parquet files with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "events" ` --parallelmethod "Random" ` --distributeKeyColumn "event_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\logs\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "CAST(event_date AS VARCHAR)" ` --datadrivenquery "select distinct CAST(event_date AS VARCHAR) from read_parquet('D:\DATA\logs\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple Parquet Files[​](#multiple-parquet-files "Direct link to Multiple Parquet Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple Parquet files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_parquet('D:\DATA\daily\*.parquet', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_reports" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_parquet()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Hive-Style Partitioning[​](#hive-style-partitioning "Direct link to Hive-Style Partitioning") ### Reading Partitioned Data[​](#reading-partitioned-data "Direct link to Reading Partitioned Data") Read Parquet files with Hive-style partitioning: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\partitioned\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "warehouse" ` --targetschema "dbo" ` --targettable "partitioned_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Hive Partitioning For data organized like `year=2024/month=01/data.parquet`, DuckDB automatically extracts partition columns: * Partition columns become regular columns in the result * Use `hive_partitioning=true` to enable this feature * Excellent for partition pruning and efficient queries ### Parallel Processing on Partitioned Data[​](#parallel-processing-on-partitioned-data "Direct link to Parallel Processing on Partitioned Data") Use partition columns for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "sales_data" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year || '-' || month" ` --datadrivenquery "select distinct year || '-' || month as partition_key from read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` ## Nested Structures in Parquet[​](#nested-structures-in-parquet "Direct link to Nested Structures in Parquet") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested Parquet structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, customer.name as customer_name, customer.email as customer_email, order_date, total FROM read_parquet('D:\DATA\orders.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(line_items, recursive := true) FROM read_parquet('D:\DATA\orders_nested.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structures[​](#complex-nested-structures "Direct link to Complex Nested Structures") Handle complex nested Parquet data with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) FROM read_parquet('D:\DATA\chantier\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "construction" ` --targetschema "dbo" ` --targettable "site_details" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "day" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 8 ``` ## Advanced Filtering[​](#advanced-filtering "Direct link to Advanced Filtering") ### Predicate Pushdown[​](#predicate-pushdown "Direct link to Predicate Pushdown") Apply filters to reduce data read from Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet') WHERE event_date >= '2024-01-01' AND event_type = 'purchase'" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "purchases" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Append" ``` Predicate Pushdown Benefits DuckDB pushes filters down to the Parquet reader, which: * Skips entire row groups that don't match the filter * Reduces memory usage * Significantly improves performance for selective queries * Works best with filters on partition columns or columns with statistics ### Column Pruning with Selection[​](#column-pruning-with-selection "Direct link to Column Pruning with Selection") Select only needed columns for maximum performance: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT customer_id, order_date, total_amount, status FROM read_parquet('D:\DATA\orders_large.parquet') WHERE order_date >= '2024-01-01'" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "recent_orders" ` --parallelmethod "Random" ` --distributeKeyColumn "customer_id" ` --mapmethod "Name" ` --loadmode "Append" ` --degree 12 ``` ## Schema and Metadata[​](#schema-and-metadata "Direct link to Schema and Metadata") ### Union Multiple Parquet Files[​](#union-multiple-parquet-files "Direct link to Union Multiple Parquet Files") Union Parquet files with compatible schemas: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet(['D:\DATA\2023\*.parquet', 'D:\DATA\2024\*.parquet'], union_by_name=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "archive" ` --targetschema "dbo" ` --targettable "historical_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Union By Name `union_by_name=true` allows reading files with different column orders or optional columns: * Columns are matched by name instead of position * Missing columns are filled with NULL * Extra columns are ignored * Useful for schema evolution scenarios ### Type Conversion[​](#type-conversion "Direct link to Type Conversion") Convert Parquet data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, amount::DECIMAL(18,2) as amount, status FROM read_parquet('D:\DATA\transactions.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # PostgreSQL Examples Comprehensive examples for transferring data from and to PostgreSQL databases using native connectors. ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL transfers support multiple connection types: * **pgsql**: Standard PostgreSQL protocol for reading/writing * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk transfers, binary format) ## PostgreSQL to MSSQL - Single-threaded Transfer[​](#postgresql-to-mssql---single-threaded-transfer "Direct link to PostgreSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization using a SQL query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## PostgreSQL to MSSQL - Using Schema and Table[​](#postgresql-to-mssql---using-schema-and-table "Direct link to PostgreSQL to MSSQL - Using Schema and Table") Transfer specifying schema and table names instead of a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#postgresql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on a calculated column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "FLOOR(o_orderkey/10000000)" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Parallel Transfer with Ctid Method[​](#postgresql-to-mssql---parallel-transfer-with-ctid-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Ctid Method") PostgreSQL-specific parallel transfer using physical row identifier (ctid). PostgreSQL-Specific The Ctid method is unique to PostgreSQL and uses the physical row identifier (ctid) for parallel data distribution. This is very efficient for full table transfers. **For orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` **For lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with Random Method[​](#postgresql-to-mssql---parallel-transfer-with-random-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Dynamic Degree[​](#postgresql-to-mssql---dynamic-degree "Direct link to PostgreSQL to MSSQL - Dynamic Degree") Use negative degree values to automatically determine parallelism. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores to determine the actual degree of parallelism. ## PostgreSQL to MSSQL - Using Input File[​](#postgresql-to-mssql---using-input-file "Direct link to PostgreSQL to MSSQL - Using Input File") Transfer using a SQL query from an external file. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --inputfile "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ## PostgreSQL to PostgreSQL - Using Query[​](#postgresql-to-postgresql---using-query "Direct link to PostgreSQL to PostgreSQL - Using Query") Transfer between PostgreSQL databases using a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --query "select * from ""tpch_10"".orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## PostgreSQL to PostgreSQL - Using Ctid Method[​](#postgresql-to-postgresql---using-ctid-method "Direct link to PostgreSQL to PostgreSQL - Using Ctid Method") Transfer between PostgreSQL databases with parallel Ctid method. * Using pgcopy (Binary COPY) * Using pgsql (INSERT UNNEST) ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgsql" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to PostgreSQL - Using pgcopy Binary[​](#postgresql-to-postgresql---using-pgcopy-binary "Direct link to PostgreSQL to PostgreSQL - Using pgcopy Binary") High-performance transfer using PostgreSQL binary COPY protocol. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Parallel with Ctid - orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` **Parallel with Ctid - lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` ## PostgreSQL to Oracle[​](#postgresql-to-oracle "Direct link to PostgreSQL to Oracle") Transfer data from PostgreSQL to Oracle databases. * Using orabulk (Bulk Load) * Using oradirect (Direct Path) **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 1000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ## PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL (Hyper File) to MSSQL[​](#postgresql-hyper-file-to-mssql "Direct link to PostgreSQL (Hyper File) to MSSQL") Transfer data from a Tableau Hyper file (using pgsql driver) to MSSQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:8095" ` --sourcedatabase "D:\OpenData\TPCH\data\hyper\tpch_sf10.hyper" ` --sourceuser "tableau_internal_user" ` --sourcepassword "" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from ""ORDERS""" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for transferring data from and to SQL Server databases. ## MSSQL to MSSQL - Single-threaded Transfer[​](#mssql-to-mssql---single-threaded-transfer "Direct link to MSSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization for smaller datasets. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with Random Method[​](#mssql-to-mssql---parallel-transfer-with-random-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. * Windows Authentication * SQL Authentication ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with RangeId Method[​](#mssql-to-mssql---parallel-transfer-with-rangeid-method "Direct link to MSSQL to MSSQL - Parallel Transfer with RangeId Method") Transfer using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Using query with filter:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with Ntile Method[​](#mssql-to-mssql---parallel-transfer-with-ntile-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Ntile Method") Transfer using Ntile distribution for evenly distributed chunks. **Full table transfer:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Ntile" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Filtered transfer with date column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "Ntile" ` --distributeKeyColumn "o_orderdate" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mssql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MSSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values of a column or partition function. **Using partition function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "YEAR(o_orderdate)" ` --degree 7 ` --loadmode Append ``` ## MSSQL to MSSQL - Using Physloc Method[​](#mssql-to-mssql---using-physloc-method "Direct link to MSSQL to MSSQL - Using Physloc Method") Transfer using physical location (should only be used on readonly/snapshot databases). warning The Physloc method should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ` --loadmode Truncate ``` ## MSSQL to PostgreSQL[​](#mssql-to-postgresql "Direct link to MSSQL to PostgreSQL") Transfer data from SQL Server to PostgreSQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 10 ` --loadmode "Truncate" ``` ## MSSQL to MySQL[​](#mssql-to-mysql "Direct link to MSSQL to MySQL") Transfer data from SQL Server to MySQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` **With DataDriven method on partitioned table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer data from SQL Server to DuckDB. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## Using ODBC Connection[​](#using-odbc-connection "Direct link to Using ODBC Connection") Transfer using ODBC DSN for connection. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMsSQLTPCH" ` --sourcedatabase "tpch_test" ` --query "select * from dbo.orders LIMIT 1000" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## Dynamic Degree[​](#dynamic-degree "Direct link to Dynamic Degree") Use negative degree values to automatically determine parallelism based on CPU cores. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value divide the number of CPU cores of the machine by the absolute value of the degree to determine the actual degree of parallelism. e.g., * `-4` : will use a quarter of the CPU count * \`-2' : will use half of the CPU count * `0` : will use all the CPUs ## Load Modes[​](#load-modes "Direct link to Load Modes") FastTransfer supports different load modes for the target table: * `Truncate`: Truncates the target table before loading * `Append`: Appends data to existing table (default) Example with Append mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "None" ` --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastTransfer\_Settings.json for Windows[​](#fasttransfer_settingsjson-for-windows "Direct link to FastTransfer_Settings.json for Windows") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastTransferLogs": "Server=localhost;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs\\FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastTransferLogs", "sinkOptionsSection": { "TableName": "EventLogs", "SchemaName": "dbo", "DatabaseName": "FastTransferLogs", "AutoCreateSqlDatabase": true, "AutoCreateSqlTable": true, "BatchPostingLimit": 50, "BatchPeriod": "0.00:00:05", "UseSqlBulkCopy": false }, "restrictedToMinimumLevel": "Information", "columnOptionsSection": { "disableTriggers": true, "clusteredColumnstoreIndex": false, "removeStandardColumns": [ "Id", "MessageTemplate", "Properties", "Exception" ], "additionalColumns": [ { "ColumnName": "ErrorSummary", "PropertyName": "rootcauseMessage", "DataType": "nvarchar", "DataLength": 4000 }, { "ColumnName": "EventType", "PropertyName": "EventType", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "FullTargetName", "PropertyName": "fulltargetname", "DataType": "nvarchar", "DataLength": 400 }, { "ColumnName": "Status", "PropertyName": "finalStatus", "DataType": "int" }, { "ColumnName": "Rows", "PropertyName": "loadedRows", "DataType": "bigint" }, { "ColumnName": "Columns", "PropertyName": "loadedCols", "DataType": "int" }, { "ColumnName": "ElaspedMs", "PropertyName": "loadElapsedMs", "DataType": "bigint" }, { "ColumnName": "MachineName", "PropertyName": "MachineName", "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "Application", "PropertyName": "Application", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "ProcessId", "PropertyName": "ProcessId", "DataType": "int" }, { "ColumnName": "ThreadId", "PropertyName": "ThreadId", "DataType": "int" }, { "ColumnName": "RunId", "PropertyName": "runid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "TraceId", "PropertyName": "traceid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "SpanId", "PropertyName": "SpanId", "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "Release", "PropertyName": "release", "DataType": "varchar", "DataLength": 32 }, { "ColumnName": "EnvironmentUserName", "PropertyName": "EnvironmentUserName", "DataType": "varchar", "DataLength": 200 }, { "ColumnName": "InputParameters", "PropertyName": "InputParameters", "DataType": "varchar", "DataLength": 8000 } ], "level": { "columnName": "Severity", "storeAsEnum": false, "DataType": "varchar", "DataLength": 50 }, "timeStamp": { "columnName": "EventTimestamp", "nonClusteredIndex": true, "convertToUtc": false }, "logEvent": { "excludeAdditionalProperties": false, "excludeStandardColumns": true }, "message": { "columnName": "EventMsg", "DataType": "varchar", "DataLength": 8000 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Linux\_Console\_Files.json[​](#fasttransfer_settings_linux_console_filesjson "Direct link to FastTransfer_Settings_Linux_Console_Files.json") For Linux with Console + Daily rolling Files: ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs/FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Windows.json[​](#fasttransfer_settings_map_for_windowsjson "Direct link to FastTransfer_Settings_Map_for_Windows.json") For Console and dynamically named log file targets (Windows): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "C:\\temp\\Logs\\{logdate}\\{sourcedatabase}\\{sourcetable}\\FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fasttransfer_settings_map_for_linux_and_containerjson "Direct link to FastTransfer_Settings_Map_for_Linux_and_Container.json") For Console and dynamically named log file targets (Linux/Container): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` --- # Log Database If you want to log to a database (mssql or postgresql) you can set the log database location in the setting file (default `FastTransfer_settings.json` file or a custom location and settings file name using `--settingsfile` parameter) You can change the connection string inside the settings file. ## Sample Connection String for mssql[​](#sample-connection-string-for-mssql "Direct link to Sample Connection String for mssql") ``` "MS_FastTransferLogs": "Server=localhost;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" ``` ## Custom Connection Example[​](#custom-connection-example "Direct link to Custom Connection Example") ``` "MS_FastTransferLogs": "Server=mssqlloginstance,2433;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" ``` Use a correct connection string for your log database. A complete configuration example is available in the [Configuration Examples](/0.15/documentation/logging/examples.md#fasttransfer_settingsjson-for-windows) page. Information **In case the database is not reachable, FastTransfer will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastTransfer_settings.json` file to something else (like `FastTransfer_settings.json.save`) and FastTransfer will use the console log only. --- # Log Files Names Mapping using variables You can use variables to define the log file path and files names in the ***FastTransfer\_settings.json*** In the **WriteTo** array you can use a **Map** like that : ``` { "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ] } ``` The available variables to customize log path or log filename are : | Variable Name | Description | | ------------------ | ------------------------------------------- | | `{logdate}` | Current date in yyyy-MM-dd format | | `{logtimestamp}` | Timestamp of the log entry | | `{sourcedatabase}` | Name of the source database | | `{sourceschema}` | Name of the source schema | | `{sourcetable}` | Name of the source table | | `{filename}` | Name of the file being processed | | `{runid}` | Run identifier provided in the command line | | `{traceid}` | Unique identifier generate at runtime | You can find complete configuration examples for both Windows and Linux: * **Windows**: [FastTransfer\_Settings\_Map\_for\_Windows.json](/0.15/documentation/logging/examples.md#fasttransfer_settings_map_for_windowsjson) * **Linux/Container**: [FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json](/0.15/documentation/logging/examples.md#fasttransfer_settings_map_for_linux_and_containerjson) --- # Log Levels FastTransfer uses Serilog for logging and supports multiple log levels to control the verbosity of output. You can set the loglevel using the `--loglevel` parameter followed by a value in the list of available log levels. ## Available Log Levels[​](#available-log-levels "Direct link to Available Log Levels") | Level | Description | Use Case | | --------------- | ------------------------------------ | ----------------------------------- | | **Debug** | Detailed diagnostic information | Development and troubleshooting | | **Information** | General informational messages | Normal operation (default) | | **Warning** | Potentially harmful situations | Issues that don't prevent operation | | **Error** | Error events that allow continuation | Operation failures | | **Fatal** | Severe errors causing termination | Fatal application errors | ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastTransfer_settings.json` file by modifying the `MinimumLevel` property: ``` { "Serilog": { "MinimumLevel": "Debug", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "path": "Logs\\FastTransfer_.json", "rollingInterval": "Day" } } ] } } ``` --- # Logging Overview ## Parameter Logs targets using FastTransfer\_settings.json[​](#parameter-logs-targets-using-fasttransfer_settingsjson "Direct link to Parameter Logs targets using FastTransfer_settings.json") FastTransfer can log information in 3 modes : * **[Console](/0.15/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/0.15/documentation/logging/log-database.md)** * **[File (or Map)](/0.15/documentation/logging/log-files-names-mapping-using-variables.md)** Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastTransfer_settings.json` file. By default if no custom path is provided, FastTransfer looks for the settings file in : * the current directory (the working directory) * the same directory where the FastTransfer executable is located (the executable directory). If this file is not present, FastTransfer will use the console log only. You can specify a custom path to the settings file using the `-f` or `--settingsfile` parameter. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --method "None" ` --settingsfile "D:\logs\config\FastTransfer_settings.json" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --query "select * from orders" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --method "None" \ --settingsfile "/etc/fasttransfer/FastTransfer_settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/0.15/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` Expand-Archive -Path .\FastTransfer.zip -DestinationPath .\FastTransfer ``` You can verify the installation by checking the version: ``` .\FastTransfer.exe --version ``` To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` unzip FastTransfer.zip -d FastTransfer ``` On **Linux**, you need to give execution rights to the FastTransfer binary: ``` chmod +x FastTransfer ```
You can verify the installation by checking the version: ``` ./FastTransfer --version ``` FastTransfer is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)**. Pull the latest version: ``` docker pull arpeio/fasttransfer ``` Or pull a specific version: ``` docker pull arpeio/fasttransfer:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fasttransfer:latest --version ```
**You are now ready to run FastTransfer.** License Information After the trial period you will need a valid license. By default, FastTransfer will try to find a `FastTransfer.lic` file in the same directory as the executable. You can also provide another path, a URL, or even the license content using the `--license` parameter. ## Embedded Drivers[​](#embedded-drivers "Direct link to Embedded Drivers") The following database drivers are embedded in FastTransfer: | Database | Embedded Drivers | | ------------- | ---------------- | | Clickhouse | | | DuckDB | | | MS SQL Server | | | MySQL | | | Netezza | | | Oracle | | | PostgreSQL | | | SAP HANA | | | Teradata | | Warning If you need another database not in the list, you can use ODBC or OLEDB but you will need to install your ODBC or OLEDB drivers of your favorite database. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastTransfer can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: **Image:** `arpeio/fasttransfer:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastTransfer with Airflow, you need to install the Docker provider package: ``` pip install apache-airflow-providers-docker ``` Or add it to your Airflow requirements: ``` apache-airflow-providers-docker ``` ## Configure Airflow Connections[​](#configure-airflow-connections "Direct link to Configure Airflow Connections") Airflow connections allow you to securely store and manage credentials for external systems. FastTransfer integration requires connections for your source and target databases. ### A) Source Database Connection (MSSQL Example)[​](#a-source-database-connection-mssql-example "Direct link to A) Source Database Connection (MSSQL Example)") Create an MSSQL connection for your source database: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **ODBC** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `mssql_tpch10` (or your preferred name) * **Connection Type:** `ODBC` (select this from the dropdown) * **Host:** `192.168.65.254` (your database host) * **Port:** `11433` (your database port) * **Login:** Your database username (e.g., `FastLogin`) * **Password:** Your database password * **Extra:** `{"database":"tpch10"}` tip For ODBC connections, the database name should be specified in the Extra JSON field using `{"database":"your_database_name"}`. ### B) Target Database Connection (PostgreSQL Example)[​](#b-target-database-connection-postgresql-example "Direct link to B) Target Database Connection (PostgreSQL Example)") Create a PostgreSQL connection for your target database: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Postgres** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `pg_target` (or your preferred name) * **Connection Type:** `Postgres` (select this from the dropdown) * **Host:** `192.168.65.254` (your database host) * **Port:** `25433` (your database port) * **Schema:** `postgres` *(this is the database name)* * **Login:** `postgres` (your database username) * **Password:** Your database password tip For Postgres connections, the database name is specified in the **Schema** field. ## Integration with DockerOperator[​](#integration-with-dockeroperator "Direct link to Integration with DockerOperator") The [`DockerOperator`](https://airflow.apache.org/docs/apache-airflow-providers-docker/stable/operators.html) from the Docker provider allows you to execute FastTransfer commands in a Docker container directly from your Airflow DAGs. ### Complete DAG Example[​](#complete-dag-example "Direct link to Complete DAG Example") Create a DAG file (e.g., `fasttransfer_orders_mssql_to_pg.py`) in your Airflow DAGs folder: ``` from datetime import datetime from airflow import DAG from airflow.sdk.bases.hook import BaseHook from airflow.providers.docker.operators.docker import DockerOperator def _conn_parts(conn_id: str): """ Extract connection details from Airflow connection. Works with: - ODBC connections (for MSSQL): database in Extra JSON {"database":"name"} - Postgres connections: database in Schema field Returns: tuple: (host, port, user, password, database) """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # Database in Extra {"database": "..."} (for ODBC MSSQL) or in Schema (for Postgres) db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': database not found. Add it to Extra JSON " f'{{"database":"..."}} (for ODBC) or Schema field (for Postgres).' ) return host, port, user, pwd, db with DAG( dag_id="fasttransfer_orders_mssql_to_pg", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fasttransfer", "mssql", "postgres", "docker"], ) as dag: # Extract connection details mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _conn_parts("mssql_tpch10") pg_host, pg_port, pg_user, pg_pwd, pg_db = _conn_parts("pg_target") # FastTransfer Docker task transfer_task = DockerOperator( task_id="transfer_orders", image="arpeio/fasttransfer:latest", docker_url="tcp://host.docker.internal:2375", api_version="auto", auto_remove="success", mount_tmp_dir=False, # Avoids the remote-engine tmp mount warning do_xcom_push=False, command=[ "--sourceconnectiontype", "mssql", "--sourceserver", f"{mssql_host},{mssql_port}", "--sourcedatabase", mssql_db, "--sourceuser", mssql_user, "--sourcepassword", mssql_pwd, "--sourceschema", "dbo", "--sourcetable", "orders", "--targetconnectiontype", "pgcopy", "--targetserver", f"{pg_host}:{pg_port}", "--targetdatabase", pg_db, "--targetuser", pg_user, "--targetpassword", pg_pwd, "--targetschema", "public", "--targettable", "orders", "--loadmode", "Truncate", "--mapmethod", "Name", "--method", "Ntile", "--degree", "12", "--distributekeycolumn", "o_orderkey", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastTransfer Docker image * `docker_url`: Docker daemon endpoint * `command`: List of FastTransfer CLI arguments * `auto_remove`: Automatically remove the container after successful execution * `mount_tmp_dir`: Set to `False` to avoid warnings with remote Docker daemons ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes a utility function to streamline connection management: #### `_conn_parts(conn_id)`[​](#_conn_partsconn_id "Direct link to _conn_partsconn_id") Extracts connection details from an Airflow connection. This function: * Retrieves host, port, username, and password from the connection * Extracts the database name from either the Extra JSON field (for ODBC connections) or the Schema field (for Postgres connections) * Returns all components needed to build the FastTransfer connection parameters * Validates that all required fields are present This approach ensures that credentials are managed centrally in Airflow and never hardcoded in DAG files. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Airflow and can be viewed in the Airflow UI: 1. Navigate to **DAGs** in the Airflow UI 2. Click on your DAG (e.g., `fasttransfer_orders_mssql_to_pg`) 3. Click on the task execution (green/red square in the Grid view) 4. Click the **Logs** tab ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") The logs provide detailed information about: * FastTransfer version and configuration * Source and target connection details (with masked passwords) * Data transfer progress * Performance metrics (rows/second, total time) * Exit status ``` [2026-03-02 15:51:45] INFO - Running docker container: arpeio/fasttransfer:latest [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.288 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8415ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.330 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000000 : 2999997 rows x 9 columns in 8458ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.349 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8476ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.442 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8569ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1702771 rows/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15324949 cells/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8809 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9135 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load [2026-03-02 15:51:54] INFO - Task instance in success state [2026-03-02 15:51:54] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 15:51:54] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastTransfer, a high-performance data transfer utility designed for data integration and automation workflows. ## Image Overview[​](#image-overview "Direct link to Image Overview") * **Base image**: `debian:trixie-slim` * **Entrypoint**: `/usr/local/bin/FastTransfer` * **Repository**: [arpe-io/FastTransfer-Image](https://github.com/arpe-io/FastTransfer-Image) * **DockerHub**: [arpeio/fasttransfer](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general) * **Updates**: Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * Optional: `FastTransfer_Settings.json` for custom logging configuration ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags**: Aligned with FastTransfer releases (e.g., `v0.15.0`) * **`latest` tag**: Always points to the most recent FastTransfer version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastTransfer versions are released * **Security updates**: The latest version of each minor branch is automatically rebuilt weekly (every Monday) with the latest base image and security patches ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fasttransfer:latest # Specific version docker pull arpeio/fasttransfer:v0.15.0 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fasttransfer:latest -? # Check version docker run --rm arpeio/fasttransfer:latest --version ``` ## License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.14.0, pass the license content directly via `--license "…"`: ``` export licenseContent=$(cat ./FastTransfer.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fasttransfer:latest \ --license "$licenseContent" \ [other parameters...] ``` Best Practice Prefer `--env-file`, Docker/Compose/Kubernetes secrets, or managed identities for cloud credentials. Avoid leaving the license content in shell history. ## Examples[​](#examples "Direct link to Examples") ### 1. SQL Server → SQL Server (Parallel DB-to-DB Transfer)[​](#1-sql-server--sql-server-parallel-db-to-db-transfer "Direct link to 1. SQL Server → SQL Server (Parallel DB-to-DB Transfer)") ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ arpeio/fasttransfer:latest \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "dest_db" \ --method "Ntile" \ --distributekeycolumn "id" \ --loadmode "Truncate" \ --paralleldegree 8 \ --license "$licenseContent" ``` ### 2. Import CSV Files to SQL Server in Parallel[​](#2-import-csv-files-to-sql-server-in-parallel "Direct link to 2. Import CSV Files to SQL Server in Parallel") ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ -v /local/data:/data \ arpeio/fasttransfer:latest \ --sourceconnectiontype "duckdbstream" \ --sourceserver ":memory:" \ --query "SELECT * FROM read_csv('/data/lineitem*.CSV')" \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targettrusted \ --targetdatabase "tpch_test" \ --targetschema "dbo" \ --targettable "lineitem" \ --parallelmethod "Random" \ --distributeKeyColumn "l_orderkey" \ --mapmethod "Name" \ --loadmode "Truncate" \ --degree 16 \ --license "$licenseContent" ``` ## Configuration[​](#configuration "Direct link to Configuration") ### Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` | Volume | Purpose | Access Mode | Notes | | --------- | ---------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | User-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory for file-based operations | Read-many/Write-many | Stores imported or exported data files | | `/work` | Temporary working directory (container WORKDIR) | Read-many/Write-many | Used internally for temporary processing | | `/logs` | Log output directory (per-run or aggregated logs) | Read-many/Write-many | Stores runtime and execution logs | ### Configuring FastTransfer Logging[​](#configuring-fasttransfer-logging "Direct link to Configuring FastTransfer Logging") Available from version 0.14.0 FastTransfer supports custom logging configuration through an external Serilog settings file in JSON format. #### Example: Logging to Console, Airflow, and Dynamic Log Files[​](#example-logging-to-console-airflow-and-dynamic-log-files "Direct link to Example: Logging to Console, Airflow, and Dynamic Log Files") ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context", "Serilog.Formatting.Compact" ], "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console", "applyThemeToRedirectedOutput": false } }, { "Name": "File", "Args": { "path": "/airflow/xcom/return.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" } }, { "Name": "Map", "Args": { "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/log-{filename}-{LogTimestamp}-{TraceId}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8" } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` note * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastTransfer automatically creates it. * The file `/airflow/xcom/return.json` is designed to provide run summaries compatible with Airflow's XCom mechanism. #### Available Tokens for Path or Filename Formatting[​](#available-tokens-for-path-or-filename-formatting "Direct link to Available Tokens for Path or Filename Formatting") | Token | Description | | ------------------ | -------------------------------------------- | | `{logdate}` | Current date in yyyy-MM-dd format | | `{logtimestamp}` | Full timestamp of the log entry | | `{sourcedatabase}` | Name of the source database | | `{sourceschema}` | Name of the source schema | | `{sourcetable}` | Name of the source table | | `{filename}` | Name of the file being processed | | `{runid}` | Run identifier provided in the command line | | `{traceid}` | Unique trace identifier generated at runtime | #### Mounting a Custom Settings File[​](#mounting-a-custom-settings-file "Direct link to Mounting a Custom Settings File") ``` # First, copy your config file to a volume location cp ~/FastTransfer_Settings.json /volumes/fasttransfer-config/ # Then run FastTransfer with mounted volumes docker run --rm \ -v fasttransfer-config:/config \ -v fasttransfer-logs:/logs \ arpeio/fasttransfer:latest \ --settingsfile "/config/FastTransfer_Settings.json" \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "pgcopy" \ --targetserver "host.docker.internal:5432" \ --targetuser "PgUser" \ --targetpassword "PgPass" \ --targetdatabase "pg_db" \ --targetschema "dbo" \ --targettable "orders" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --license "$licenseContent" ``` --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastTransfer data migration workflows. FastTransfer can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: **Image:** `arpeio/fasttransfer:latest`
**Repository:** ## Integration Methods[​](#integration-methods "Direct link to Integration Methods") Kestra offers two primary methods to orchestrate FastTransfer execution: ### Method 1: Using Docker Run Plugin (Recommended)[​](#method-1-using-docker-run-plugin-recommended "Direct link to Method 1: Using Docker Run Plugin (Recommended)") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastTransfer commands in a Docker container. ``` id: fasttransfer_docker_kestra_v2 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - FastLogin - --sourcepassword - FastPassword - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - postgres - --targetpassword - postgres - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --method - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastTransfer Docker image * `commands`: Array of FastTransfer CLI arguments ### Method 2: Using Shell Commands with Docker Task Runner[​](#method-2-using-shell-commands-with-docker-task-runner "Direct link to Method 2: Using Shell Commands with Docker Task Runner") Alternatively, you can use the [`io.kestra.plugin.scripts.shell.Commands`](https://kestra.io/plugins/plugin-script-shell/io.kestra.plugin.scripts.shell.commands) plugin with a Docker task runner: ``` id: fasttransfer_docker_kestra namespace: arpe.io tasks: - id: shell type: io.kestra.plugin.scripts.shell.Commands containerImage: arpeio/fasttransfer:latest taskRunner: type: io.kestra.plugin.scripts.runner.docker.Docker host: "tcp://host.docker.internal:2375" commands: - >- /usr/local/bin/FastTransfer --sourceconnectiontype mssql --sourceserver "192.168.65.254,11433" --sourcedatabase "tpch10" --sourceuser "FastLogin" --sourcepassword "FastPassword" --sourceschema "dbo" --sourcetable "orders" --targetconnectiontype pgcopy --targetserver "192.168.65.254:25433" --targetdatabase "postgres" --targetuser "postgres" --targetpassword "postgres" --targetschema "public" --targettable "orders" --loadmode Truncate --mapmethod Name --method Ntile --degree 12 --distributekeycolumn "o_orderkey" --nobanner ``` This method allows you to execute shell commands within the FastTransfer Docker container, providing more flexibility for complex workflows. ## Securing Sensitive Data with Kestra Secrets[​](#securing-sensitive-data-with-kestra-secrets "Direct link to Securing Sensitive Data with Kestra Secrets") To protect sensitive information like passwords and connection strings, Kestra provides a built-in [secrets management](https://kestra.io/docs/concepts/secret) feature. You can store credentials securely and reference them in your flows using the `{{ secret('SECRET_NAME') }}` syntax. ### Creating Secrets in Kestra[​](#creating-secrets-in-kestra "Direct link to Creating Secrets in Kestra") To create secrets in Kestra: 1. Navigate to the Kestra UI 2. Go to **Tenant** → **Secrets** 3. Add your secrets with appropriate keys: * `FASTTRANSFER_MSSQL_USER` * `FASTTRANSFER_MSSQL_PASSWORD` * `FASTTRANSFER_PG_USER` * `FASTTRANSFER_PG_PASSWORD` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fasttransfer_docker_kestra_v3 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - "{{ secret('FASTTRANSFER_MSSQL_USER') }}" - --sourcepassword - "{{ secret('FASTTRANSFER_MSSQL_PASSWORD') }}" - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - "{{ secret('FASTTRANSFER_PG_USER') }}" - --targetpassword - "{{ secret('FASTTRANSFER_PG_PASSWORD') }}" - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --method - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` This approach ensures that sensitive credentials are never exposed in your flow definitions and can be managed centrally. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Kestra and can be viewed directly in the Kestra UI. To access the logs: 1. Navigate to the Kestra UI 2. Go to **Executions** 3. Select your flow execution 4. Click on the **Logs** tab The logs provide detailed information about the transfer process, including configuration parameters, connection details, data transfer progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02 15:51:45.3752026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False 2026-03-02 15:51:45.3792026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit 2026-03-02 15:51:45.6342026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) 2026-03-02 15:51:45.8702026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms 2026-03-02 15:51:45.8722026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8842026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8912026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9002026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9112026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:54.2332026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms 2026-03-02 15:51:54.2382026-03-02T15:51:54.238 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8365ms 2026-03-02 15:51:54.2412026-03-02T15:51:54.241 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8368ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000004 : 3000001 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1766084 rows/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15894756 cells/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8494 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9142 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load 2026-03-02 15:51:54.448Command succeed with exit code 0 2026-03-02 15:51:54.450Container deleted: ca0de79e3eb4ede961668cb5080e4c20f858960c118d10731b8e0ade3ad87685 2026-03-02 15:51:54.455Volume deleted: a6b822d7677064a91d2dd555c360dc61ec49e3954149eacd5c22549c2a300850 ``` --- # PostgreSQL The **pg\_fasttransfer** extension allows you to run the FastTransfer tool directly from an SQL function, enabling fast data transfer between databases directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fasttransfer](https://github.com/arpe-io/pg_fasttransfer) * **License**: MIT * **Latest version**: v0.16.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fasttransfer Demo](/assets/images/pg_fasttransfer-830298c99dd0228e80b5337126bb0c7c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastTransfer commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get transfer statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastTransfer parameters ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * FastTransfer binaries installed on the system Important The PostgreSQL server process usually runs under the `postgres` user account. You must ensure that this user has the appropriate permissions to execute the `FastTransfer` binary and read the license file. ## Compatibility[​](#compatibility "Direct link to Compatibility") * Windows * Linux | PostgreSQL Version | Supported | | ------------------ | --------- | | PostgreSQL 18 | | | PostgreSQL 17 | | | PostgreSQL 16 | | | PostgreSQL 15 | | **Debian/Ubuntu 22.04 LTS** | PostgreSQL Version | Supported | | ------------------ | --------- | | PostgreSQL 18 | | | PostgreSQL 17 | | | PostgreSQL 16 | | | PostgreSQL 15 | | info Other distributions or PostgreSQL versions may work but have not been officially tested. ## Installation[​](#installation "Direct link to Installation") Download the Extension Download the appropriate release for your PostgreSQL version and operating system from the [pg\_fasttransfer releases page](https://github.com/arpe-io/pg_fasttransfer/releases). * Linux * Windows **Automated Installation** The easiest way to install the extension on Linux is by using the `install-linux.sh` script included in the archive. 1. Extract the contents of the archive into a folder. This folder should contain: * `pg_fasttransfer.so` * `pg_fasttransfer.control` * `pg_fasttransfer--1.0.sql` * `install-linux.sh` 2. Make the script executable: ``` chmod +x install-linux.sh ``` 3. Run the script with administrator privileges: ``` sudo ./install-linux.sh ``` The script will automatically detect your PostgreSQL installation and copy the files to the correct locations. **Manual Installation** If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service: ``` sudo systemctl stop postgresql ``` 2. Locate your PostgreSQL installation directory, typically: `/usr/lib/postgresql/` 3. Copy the files into the appropriate directories: ``` sudo cp pg_fasttransfer.so /usr/lib/postgresql//lib/ sudo cp pg_fasttransfer.control pg_fasttransfer--1.0.sql /usr/share/postgresql//extension/ ``` 4. Restart your PostgreSQL service: ``` sudo systemctl start postgresql ``` **Permissions Setup** Ensure the `postgres` user has proper permissions: ``` # Grant execute permission on the FastTransfer binary sudo chmod +x /path/to/FastTransfer sudo chown postgres:postgres /path/to/FastTransfer sudo chmod 750 /path/to/FastTransfer # Grant read permission on the license file sudo chown postgres:postgres /path/to/license.lic sudo chmod 640 /path/to/license.lic ``` **Automated Installation** 1. Extract the contents of the ZIP file into a folder. This folder should contain: * `pg_fasttransfer.dll` * `pg_fasttransfer.control` * `pg_fasttransfer--1.0.sql` * `install-win.bat` 2. Right-click on the `install-win.bat` file and select "Run as administrator" 3. The script will automatically detect your PostgreSQL installation and copy the files to the correct locations **Manual Installation** If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service 2. Locate your PostgreSQL installation folder, typically: ``` C:\Program Files\PostgreSQL\ ``` 3. Copy the `pg_fasttransfer.dll` file into the `lib` folder 4. Copy the `pg_fasttransfer.control` and `pg_fasttransfer--1.0.sql` files into the `share\extension` folder 5. Restart your PostgreSQL service **Permissions Setup** Make sure that the PostgreSQL service account (by default `NT AUTHORITY\NetworkService` or `postgres`) has: * Execute permission on the `FastTransfer.exe` binary * Read permission on the `.lic` file ## SQL Setup[​](#sql-setup "Direct link to SQL Setup") After the files are in place, you need to set up the extension in your database. ### Drop existing extension (if any)[​](#drop-existing-extension-if-any "Direct link to Drop existing extension (if any)") ``` DROP EXTENSION IF EXISTS pg_fasttransfer CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fasttransfer CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fasttransfer\_encrypt[​](#pg_fasttransfer_encrypt "Direct link to pg_fasttransfer_encrypt") This function encrypts a given text string using `pgp_sym_encrypt` and encodes the result in base64. It is useful for storing sensitive information, such as passwords, in a secure manner within your SQL scripts. The `xp_RunFastTransfer_secure` function will automatically decrypt any values passed to its `--sourcepassword` and `--targetpassword` arguments. **Syntax:** ``` pg_fasttransfer_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fasttransfer_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastTransfer\_secure[​](#xp_runfasttransfer_secure "Direct link to xp_RunFastTransfer_secure") This is the main function to execute the FastTransfer tool. It takes various parameters to configure the data transfer operation. Password arguments (`sourcepassword`, `targetpassword`) will be automatically decrypted. **Syntax:** ``` xp_RunFastTransfer_secure( sourceconnectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, sourcedsn text DEFAULT NULL, sourceprovider text DEFAULT NULL, sourceserver text DEFAULT NULL, sourceuser text DEFAULT NULL, sourcepassword text DEFAULT NULL, sourcetrusted boolean DEFAULT FALSE, sourcedatabase text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, query text DEFAULT NULL, fileinput text DEFAULT NULL, targetconnectiontype text DEFAULT NULL, targetconnectstring text DEFAULT NULL, targetserver text DEFAULT NULL, targetuser text DEFAULT NULL, targetpassword text DEFAULT NULL, targettrusted boolean DEFAULT FALSE, targetdatabase text DEFAULT NULL, targetschema text DEFAULT NULL, targettable text DEFAULT NULL, degree integer DEFAULT NULL, method text DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, loadmode text DEFAULT NULL, batchsize integer DEFAULT NULL, useworktables boolean DEFAULT FALSE, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, mapmethod text DEFAULT NULL, license text DEFAULT NULL, loglevel text DEFAULT NULL, nobanner boolean DEFAULT NULL, fasttransfer_path text DEFAULT NULL, debug boolean DEFAULT FALSE ) RETURNS TABLE ( exit_code integer, output text, error_message text, total_rows bigint, total_columns integer, transfer_time_ms bigint, total_time_ms bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to SQL Server[​](#linux-example---postgresql-to-sql-server "Direct link to Linux Example - PostgreSQL to SQL Server") Transfer data from PostgreSQL to SQL Server using the extension: ``` SELECT * FROM xp_RunFastTransfer_secure( targetconnectiontype := 'msbulk', sourceconnectiontype := 'pgsql', sourceserver := 'localhost:5432', sourceuser := 'postgres', sourcepassword := pg_fasttransfer_encrypt('MyActualPassword'), sourcedatabase := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', targetserver := 'localhost,1433', targetuser := 'migadmin', targetpassword := pg_fasttransfer_encrypt('AnotherSecurePassword'), targetdatabase := 'target_db', targetschema := 'tpch_1', targettable := 'orders', loadmode := 'Truncate', license := '/tmp/FastTransfer_linux-x64_v0.15.0/FastTransfer.lic', loglevel := 'information', nobanner := false, fasttransfer_path := '/tmp/FastTransfer_linux-x64_v0.15.0', debug := true ); ``` ### Windows Example - SQL Server to PostgreSQL[​](#windows-example---sql-server-to-postgresql "Direct link to Windows Example - SQL Server to PostgreSQL") Transfer data from SQL Server to PostgreSQL: ``` SELECT * FROM xp_RunFastTransfer_secure( sourceconnectiontype := 'mssql', sourceserver := 'localhost', sourcepassword := pg_fasttransfer_encrypt('MyWindowsPassword'), sourceuser := 'FastLogin', sourcedatabase := 'tpch10', sourceschema := 'dbo', sourcetable := 'orders', targetconnectiontype := 'pgcopy', targetserver := 'localhost:15433', targetuser := 'postgres', targetpassword := pg_fasttransfer_encrypt('MyPostgresPassword'), targetdatabase := 'postgres', targetschema := 'public', targettable := 'orders', method := 'Ntile', degree := 12, distributekeycolumn := 'o_orderkey', loadmode := 'Truncate', batchsize := 1048576, mapmethod := 'Position', loglevel := 'information', nobanner := true, fasttransfer_path := 'D:\sources\FastTransfer', debug := true ); ``` ## Function Return Structure[​](#function-return-structure "Direct link to Function Return Structure") The function returns a table with the following columns: | Column | Type | Description | | ------------------ | ------- | -------------------------------------------------------- | | `exit_code` | integer | The exit code of the FastTransfer process | | `output` | text | The full log output from FastTransfer (if debug is TRUE) | | `error_message` | text | Only the lines containing ERROR from the output | | `total_rows` | bigint | The total number of rows transferred | | `total_columns` | integer | The total number of columns transferred | | `transfer_time_ms` | bigint | Transfer time in milliseconds | | `total_time_ms` | bigint | Total execution time in milliseconds | ## Debug Parameter[​](#debug-parameter "Direct link to Debug Parameter") The `debug` parameter is a boolean flag that controls whether the full FastTransfer output is returned in the `output` column: * When `debug := true`, `output` contains the entire log from FastTransfer * When `debug := false` (default), `output` is an empty string, but `error_message` will still contain any error lines ## Resources[​](#resources "Direct link to Resources") * [pg\_fasttransfer GitHub Repository](https://github.com/arpe-io/pg_fasttransfer) * [FastTransfer Documentation](https://fasttransfer.arpe.io/) * [Get a Trial License](https://arpe.io/get-trial?product=FastTransfer) * [Report Issues](https://github.com/arpe-io/pg_fasttransfer/issues) --- # SQL Server The **FastWrappers-TSQL** project wraps FastTransfer (and FastBCP) in a CLR Assembly, allowing you to call them directly from T-SQL using extended stored procedures. This enables seamless data transfer operations without leaving your SQL Server environment. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [aetperf/FastWrappers-TSQL](https://github.com/aetperf/FastWrappers-TSQL) * **Latest version**: v0.7.0 * **Platforms**: Windows and Linux * **Compatibility**: SQL Server 2016+ info This wrapper includes both **FastTransfer** (for database-to-database transfers and file imports) and **FastBCP** (for database-to-file exports). This documentation focuses on the FastTransfer functionality. ## Features[​](#features "Direct link to Features") * **Native SQL Server Integration**: Execute FastTransfer commands directly from T-SQL * **Secure Password Management**: Built-in AES-256 encryption for sensitive credentials * **CLR Assembly Integration**: Runs as extended stored procedures * **Detailed Result Return**: Get transfer statistics and performance metrics as SQL results * **Flexible Configuration**: Support for all FastTransfer parameters and connection types * **Role-Based Security**: Predefined database roles for access control ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * SQL Server 2016 or later * CLR integration enabled * Valid FastTransfer binaries * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * Administrator privileges for initial setup Important The SQL Server service account must have read/execute permissions on the FastTransfer directory and binaries. ## Installation[​](#installation "Direct link to Installation") Download the latest release from the [Releases page](https://github.com/aetperf/FastWrappers-TSQL/releases). Choose the installation method based on your SQL Server version: ### Recommended Installation Methods[​](#recommended-installation-methods "Direct link to Recommended Installation Methods") 1. **[FastWrappers-TSQL.bak](https://github.com/aetperf/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.bak)** - SQL Server Backup file (**recommended for SQL Server 2019+** - restore using SSMS)
Requires manual CLR activation and trusted assembly configuration after restore 2. **[FastWrappers-TSQL.sql](https://github.com/aetperf/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.sql)** - Pure SQL Script (**recommended for SQL Server 2016+** - all-in-one installation)
Complete installation in a single script - execute using sqlcmd or SSMS ### Post-Installation Configuration[​](#post-installation-configuration "Direct link to Post-Installation Configuration") info This section only applies to the **.bak** installation method. The **.sql** script includes all necessary configuration steps automatically. After restoring the database, you **must** configure CLR integration. Two options are available: * Trusted Assembly (Recommended) * TRUSTWORTHY ON (Dev/Test) This approach is **more secure** as it keeps TRUSTWORTHY OFF and doesn't require changing the database owner: ``` -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Extract the assembly hash and add it to trusted assemblies DECLARE @hash VARBINARY(64); SELECT @hash = HASHBYTES('SHA2_512', content) FROM sys.assembly_files WHERE assembly_id = ( SELECT assembly_id FROM sys.assemblies WHERE name = 'FastWrappers_TSQL' ); EXEC sys.sp_add_trusted_assembly @hash = @hash, @description = N'FastWrappers_TSQL Assembly v0.7.0'; GO ``` **Advantages:** * TRUSTWORTHY remains OFF (more secure) * No need to change database owner * Only this specific assembly is trusted tip The assembly hash changes with each version. When upgrading, remove the old hash first: ``` EXEC sys.sp_drop_trusted_assembly @hash = ; ``` This approach is simpler but **less secure**. Use only for development/testing environments: ``` -- Enable TRUSTWORTHY for signed UNSAFE assemblies ALTER DATABASE [FastWrappers-TSQL] SET TRUSTWORTHY ON; GO -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Set database owner to 'sa' (required for signed UNSAFE assemblies) EXEC sp_changedbowner 'sa'; GO ``` Critical The `sp_changedbowner 'sa'` command is **required**. Without it, you will encounter error 0x80FC80F1 when executing stored procedures. ## Security Roles[​](#security-roles "Direct link to Security Roles") ### FastTransfer\_Executor[​](#fasttransfer_executor "Direct link to FastTransfer_Executor") The FastWrappers-TSQL database includes a predefined database role that grants `EXECUTE` permission on the **xp\_RunFastTransfer\_secure** stored procedure. ``` -- Add a user to the role ALTER ROLE [FastTransfer_Executor] ADD MEMBER [YourUserName]; GO ``` tip Users also need access to the **dbo.EncryptString** function to generate encrypted passwords: ``` GRANT EXECUTE ON dbo.EncryptString TO [YourUserName]; GO ``` ## Available Functions[​](#available-functions "Direct link to Available Functions") ### dbo.EncryptString - Password Encryption[​](#dboencryptstring---password-encryption "Direct link to dbo.EncryptString - Password Encryption") Encrypts passwords using AES-256 encryption for secure storage and transmission. ``` SELECT dbo.EncryptString('YourPassword') ``` **Returns:** Base64-encoded encrypted string **Example:** ``` SELECT dbo.EncryptString('MySecretPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== ``` ### dbo.xp\_RunFastTransfer\_secure - Data Transfer[​](#dboxp_runfasttransfer_secure---data-transfer "Direct link to dbo.xp_RunFastTransfer_secure - Data Transfer") Wraps the FastTransfer CLI to transfer data between databases with streaming and parallel processing. **Example:** ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'D:\FastTransfer\', @sourceConnectionType = 'mssql', @sourceServer = 'localhost,11433', @sourceUser = 'FastLogin', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = 'tpch10', @sourceSchema = 'dbo', @sourceTable = 'orders', @targetConnectionType = 'pgcopy', @targetServer = 'localhost:25433', @targetUser = 'postgres', @targetPasswordSecure = 'RAAFe/XJ7O0P1I5T0rJhjQ==', @targetDatabase = 'postgres', @targetSchema = 'public', @targetTable = 'orders', @loadmode = 'Truncate', @method = 'Ntile', @distributeKeyColumn = 'o_orderkey', @degree = 12, @mapmethod = 'Name', @debug = 1, @noBanner = 0, @useWorkTables = 0, @loglevel = 'debug' ``` ## Output and Logging[​](#output-and-logging "Direct link to Output and Logging") ### Transfer Metrics[​](#transfer-metrics "Direct link to Transfer Metrics") The **xp\_RunFastTransfer\_secure** stored procedure returns a structured result set: | Column | Type | Description | | -------------- | ------------- | ----------------------------------------- | | targetdatabase | nvarchar(128) | Target database name | | targetSchema | nvarchar(128) | Target schema name | | targetTable | nvarchar(128) | Target table name | | TotalRows | bigint | Number of rows transferred | | TotalColumns | int | Number of columns transferred | | TotalCells | bigint | Total cells transferred (rows × columns) | | TotalTimeMs | bigint | Total execution time in milliseconds | | Status | int | Exit code (0 = success, non-zero = error) | | StdErr | nvarchar(max) | Error message if Status ≠ 0 | **Example output:** ``` targetdatabase targetSchema targetTable TotalRows TotalColumns TotalCells TotalTimeMs Status postgres public orders 15000000 9 135000000 27502 0 ``` ### Debug Mode[​](#debug-mode "Direct link to Debug Mode") Set `@debug = 1` to output additional information: * Complete command line being executed (passwords masked) * Full console output from FastTransfer * Real-time progress updates * Performance metrics ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest', -- ... other parameters ... @debug = 1 -- Enable verbose logging ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### SQL Server to SQL Server (12 threads)[​](#sql-server-to-sql-server-12-threads "Direct link to SQL Server to SQL Server (12 threads)") Transfer a table between two SQL Server instances using parallel processing: ``` -- First, encrypt your password SELECT dbo.EncryptString('YourPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== -- Then execute the transfer EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = N'mssql', @sourceServer = N'localhost', @sourceUser = N'FastUser', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = N'tpch_test', @sourceSchema = N'dbo', @sourceTable = N'orders', @targetConnectionType = N'msbulk', @targetServer = N'localhost\SS2025', @targetUser = N'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = N'tpch_test', @targetSchema = N'dbo', @targetTable = N'orders_copy', @loadMode = N'Truncate', @batchSize = 130000, @method = N'RangeId', @distributeKeyColumn = N'o_orderkey', @degree = 12, @mapmethod = 'Name', @runId = N'SQL_to_SQL_Parallel_Transfer'; ``` ### Oracle to SQL Server (12 threads)[​](#oracle-to-sql-server-12-threads "Direct link to Oracle to SQL Server (12 threads)") Transfer data from Oracle to SQL Server with parallel RangeId method: ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'oraodp', @sourceServer = 'oracle-server:1521/ORCL', @sourceUser = 'oracle_user', @sourcePasswordSecure = '', @sourceSchema = 'SALES', @sourceTable = 'ORDERS', @targetConnectionType = 'msbulk', @targetServer = 'localhost\SS2025', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'tpch_test', @targetSchema = 'dbo', @targetTable = 'orders_from_oracle', @loadMode = 'Truncate', @batchSize = 130000, @method = 'RangeId', @distributeKeyColumn = 'order_id', @degree = 12, @mapmethod = 'Name', @runId = 'Oracle_to_SQL_Transfer'; ``` ### PostgreSQL to SQL Server (8 threads)[​](#postgresql-to-sql-server-8-threads "Direct link to PostgreSQL to SQL Server (8 threads)") Use PostgreSQL's native Ctid method for optimal performance: ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'pgcopy', @sourceServer = 'postgres-server:5432', @sourceUser = 'postgres', @sourcePasswordSecure = '', @sourceDatabase = 'sales_db', @sourceSchema = 'public', @sourceTable = 'customers', @targetConnectionType = 'msbulk', @targetServer = 'localhost', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'crm', @targetSchema = 'dbo', @targetTable = 'customers', @loadMode = 'Append', @batchSize = 100000, @method = 'Ctid', @degree = 8, @mapmethod = 'Name', @runId = 'PG_to_SQL_Ctid'; ``` ## Additional Resources[​](#additional-resources "Direct link to Additional Resources") * [FastTransfer Documentation](/0.15/.md) * [GitHub Repository](https://github.com/aetperf/FastWrappers-TSQL) ## Support[​](#support "Direct link to Support") For issues or questions: * FastWrappers-TSQL: [GitHub Issues](https://github.com/aetperf/FastWrappers-TSQL/issues) * FastTransfer: [Contact ARPE Support](https://arpe.io/contact) --- # Release Notes 0.15 ## New Parameters[​](#new-parameters "Direct link to New Parameters") ### No Banner Option[​](#no-banner-option "Direct link to No Banner Option") Added the `--nobanner` parameter to suppress the FastTransfer banner and version information at startup. See [Advanced Parameters](/0.15/documentation/cli/advanced_parameters.md) for complete details. --- # Sitemap ## [Installation](/0.15/installation.md)[​](#installation "Direct link to installation") ## [Wizard GUI](/0.15/wizard.md)[​](#wizard-gui "Direct link to wizard-gui") ## Documentation[​](#documentation "Direct link to Documentation") * [Getting Started](/0.15/.md) * CLI * [Authentication](/0.15/documentation/cli/authentication.md) * [Source Connection Parameters](/0.15/documentation/cli/source_connection_parameters.md) * [Target Connection Parameters](/0.15/documentation/cli/target_connection_parameters.md) * [Transfer Parameters](/0.15/documentation/cli/transfer_parameters.md) * [Parallel Parameters](/0.15/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/0.15/documentation/cli/advanced_parameters.md) * [License](/0.15/documentation/cli/license.md) * Logging * [Overview](/0.15/documentation/logging/Overview.md) * [Logs Level](/0.15/documentation/logging/logs-level.md) * [Log Database](/0.15/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/0.15/documentation/logging/log-files-names-mapping-using-variables.md) * [Examples](/0.15/documentation/logging/examples.md) * Examples * [SQL Server Examples](/0.15/documentation/examples/sql-server.md) * [PostgreSQL Examples](/0.15/documentation/examples/postgresql.md) * [MySQL Examples](/0.15/documentation/examples/mysql.md) * [Oracle Examples](/0.15/documentation/examples/oracle.md) * [Other Databases](/0.15/documentation/examples/other-databases.md) * [CSV Import](/0.15/documentation/examples/csv-import.md) * [JSON Import](/0.15/documentation/examples/json-import.md) * [Parquet Import](/0.15/documentation/examples/parquet-import.md) * [Advanced Scenarios](/0.15/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/0.15/documentation/compatibility/sources_platforms.md) * [Operating Systems](/0.15/documentation/compatibility/operating_systems.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/0.15/integration/docker-integration.md) * [Kestra](/0.15/integration/kestra-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 0.15](/0.15/release-notes/release-notes-0.15.md) ## [Sitemap](/0.15/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastTransfer Command Wizard Transfer (DB to DB) Import Files (Files to DB) Expand All\[ ] ### Operating SystemWindows Windows ![Linux](/img/tux.svg)Linux ### Source Connection Parameterspgsql Connection Type ? : clickhouse duckdb duckdbstream hana msoledbsql mssql mysql nzcopy nzoledb nzsql odbc oledb oraodp pgcopy pgsql teradata | Server ? : | localhost | | ------------------ | ---------------------------------- | | Connect String ? : | Server=localhost;Database=mydb;... | | DSN ? : | | | Provider ? : | | | Database ? : | mydatabase | | Trusted ? : | \[ ] | | User ? : | username | | Password ? : | •••••••• | ### Target Connection Parametersmsbulk ### Transfer Parameters ### Parallel ParametersNone ### Advanced Parameters ### License ### Generated Command multi-line\[x] sharecopy ``` .\FastTransfer.exe ` --sourceconnectiontype pgsql ` --targetconnectiontype msbulk ` --loadmode Truncate ` --mapmethod Name ` --license "C:\MyFreeTrialLicense.lic" ``` --- # Getting Started with FastTransfer FastTransfer is a high-performance **high-performance data ingestion and transfer engine** that enables fast, parallel data movement between different database systems or from files to databases systems. If you haven't installed FastTransfer yet, please check the [Installation](/0.16/installation.md) section first. You can also build your first FastTransfer command using our interactive [Command Builder Wizard](/0.16/wizard.md). [FastTransfer Mini-Demo](https://www.youtube.com/embed/CL3031FWwqo) --- # Advanced Parameters This section covers advanced configuration options for FastTransfer, including tracing, logging, and display settings. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter allows you to specify a custom identifier for tracing the transfer process. This is useful for correlating logs and tracking operations across systems. **Example:** ``` ./FastTransfer \ ... --runid "transfer-2024-01-15-001" \ ... ``` **Syntax:** * Short form: `-R "RunSpanID"` * Long form: `--runid "RunSpanID"` **Default Value:** A random GUID is generated if not specified. Tracing Use a meaningful Run ID to make it easier to search logs and trace specific transfer operations, especially in production environments or when running multiple transfers. ## Settings File[​](#settings-file "Direct link to Settings File") Specify a custom settings file for logging and other configuration options. This allows you to use different configuration profiles for different environments or scenarios. **Example:** ``` ./FastTransfer \ ... --settingsfile "config/production-settings.json" \ ... ``` **Syntax:** * Short form: `-O "file_path"` * Long form: `--settingsfile "file_path"` **Default Value:** `FastTransfer__settings.json` in the same folder as the executable. Configuration File The settings file contains logging configuration, connection settings, and other advanced options. You can maintain separate configuration files for development, staging, and production environments. ## Log Level[​](#log-level "Direct link to Log Level") Override the log level defined in the settings file. This is useful for temporary debugging or troubleshooting without modifying the settings file. **Example:** ``` ./FastTransfer \ ... --loglevel debug \ ... ``` **Syntax:** * Long form: `--loglevel "level"` **Allowed Values:** | Log Level | Description | | ------------- | --------------------------------------------------- | | `debug` | Detailed debugging information | | `information` | General informational messages (default) | | `warning` | Warning messages for potentially harmful situations | | `error` | Error messages for failures | | `fatal` | Fatal error messages for critical failures | **Default Value:** `information` Debugging Use `--loglevel debug` when troubleshooting issues to get the most detailed logging output. Remember to switch back to `information` or `warning` for production use to avoid excessive log volume. ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastTransfer banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastTransfer \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastTransfer from scripts or CI/CD pipelines where you want to minimize console output or parse the results programmatically. ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using advanced parameters: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "sales" ` --query "select * from sales where order_date >= '2024-01-01'" ` --runid "daily-sales-sync-2024-01-15" ` --settingsfile "config/production-settings.json" ` --loglevel information ` --nobanner ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "sales" \ --query "select * from sales where order_date >= '2024-01-01'" \ --runid "daily-sales-sync-2024-01-15" \ --settingsfile "config/production-settings.json" \ --loglevel information \ --nobanner ``` This example: * Uses a custom Run ID for tracing * Loads configuration from a custom settings file * Sets the log level to information * Disables the banner for cleaner output --- # Authentication FastTransfer supports two types of authentication methods depending on your database platform. Authentication can be configured separately for source and target databases. ## Source Authentication[​](#source-authentication "Direct link to Source Authentication") ### Trusted Connection (Source)[​](#trusted-connection-source "Direct link to Trusted Connection (Source)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --sourcetrusted ` ... ``` **Syntax:** * Short form: `-a` * Long form: `--sourcetrusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### SQL Login with Username and Password (Source)[​](#sql-login-with-username-and-password-source "Direct link to SQL Login with Username and Password (Source)") Standard database authentication with explicit credentials for the source database. ``` ./FastTransfer ` ... --sourceuser "myuser" ` --sourcepassword "mypassword" ` ... ``` **Syntax:** * Username: `-u "username"` or `--sourceuser "username"` * Password: `-x "password"` or `--sourcepassword "password"` ## Target Authentication[​](#target-authentication "Direct link to Target Authentication") ### Trusted Connection (Target)[​](#trusted-connection-target "Direct link to Trusted Connection (Target)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --targettrusted ` ... ``` **Syntax:** * Short form: `-A` * Long form: `--targettrusted` ### SQL Login with Username and Password (Target)[​](#sql-login-with-username-and-password-target "Direct link to SQL Login with Username and Password (Target)") Standard database authentication with explicit credentials for the target database. ``` ./FastTransfer ` ... --targetuser "myuser" ` --targetpassword "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--targetuser "username"` * Password: `-X "password"` or `--targetpassword "password"` ## Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use connection string parameters where you pass the user and password directly in the connection string: * `--sourceconnectionstring` for source database connection - see [Source Connection Parameters](/0.16/documentation/cli/source_connection_parameters.md) * `--targetconnectionstring` for target database connection - see [Target Connection Parameters](/0.16/documentation/cli/target_connection_parameters.md) Password Security in Logs All passwords passed either through the `--sourcepassword`, `--targetpassword` parameters or within the `--sourceconnectionstring`, `--targetconnectionstring` parameters are automatically hidden in all logs (Console, Files, and Database). This ensures your credentials remain secure in logging outputs. Tips For Login/Password you can also use the environment variables like FastTransfer\_SOURCEUSER and FastTransfer\_SOURCEPASSWORD for example or store the password in an encrypted file. Up to you to decrypt the file and its content before using it in a shell variable that will be used with FastTransfer. --- # License Configure how FastTransfer retrieves and uses its license file. ## License Parameter[​](#license-parameter "Direct link to License Parameter") Use the `--license` parameter to specify the location or content of your FastTransfer license. By default, FastTransfer will try to use the license file named `FastTransfer.lic` in the same directory as the FastTransfer executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastTransfer supports multiple ways to provide a license: #### 1. File Path[​](#1-file-path "Direct link to 1. File Path") Specify a custom license file path: * Windows * Linux ``` .\FastTransfer.exe ` ... --license "C:\licenses\FastTransfer.lic" ` ... ``` ``` ./FastTransfer \ ... --license "/path/to/licenses/FastTransfer.lic" \ ... ``` #### 2. HTTP(S) Endpoint[​](#2-https-endpoint "Direct link to 2. HTTP(S) Endpoint") Retrieve the license from a remote URL where you put the license content and distribute it using https : * Windows * Linux ``` .\FastTransfer.exe ` ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" ` ... ``` ``` ./FastTransfer \ ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" \ ... ``` #### 3. License Content (Inline)[​](#3-license-content-inline "Direct link to 3. License Content (Inline)") Provide the license content directly. Using a variable or environment variable is recommended. Usefull for Docker or Lambda deployment: * Windows * Linux ``` # Using environment variable $env:FastTransfer_LICENSE = "LICENSE_CONTENT_HERE" .\FastTransfer.exe ` ... --license $env:FastTransfer_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastTransfer.lic" -Raw .\FastTransfer.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FastTransfer_LICENSE="LICENSE_CONTENT_HERE" ./FastTransfer \ ... --license "$FastTransfer_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastTransfer.lic) ./FastTransfer \ ... --license "$license" \ ... ``` **Syntax:** * Long form only: `--license ""` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using a license from a remote server with a database transfer: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" ` --parallelmethod DataDriven ` --degree 4 ` --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` ``` ./FastTransfer \ --sourceconnectiontype "pgsql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourceuser "FastUser" \ --sourcepassword "FastPassword" \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" \ --parallelmethod DataDriven \ --degree 4 \ --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` This example: * Retrieves the license from a remote UNC path * Connects to a PostgreSQL source database * Transfers data to a SQL Server target using bulk insert * Uses DataDriven parallel method with 4 threads * Filters orders from 2024 onwards --- # Parallel Parameters FastTransfer can parallelize data export to significantly improve performance. This section covers the parameters that control parallel execution. ## Parallel Method[​](#parallel-method "Direct link to Parallel Method") Use the `-M` or `--parallelmethod` parameter to specify how data will be split across parallel threads. * Windows * Linux ``` .\FastTransfer.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastTransfer \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Short form: `-m ` * Long form: `--parallelmethod ` ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallelism. **DataDriven** - Use the distinct value of the distributeKeyColumn (which can be a column or an expression) to distribute data. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ctid** - Recommended and exclusive for PostgreSQL and PostgreSQL compatible databases. Use the Ctid pseudo column (for pgsql and pgcopy source only). note Ctid parallel method is for PostgreSQL databases only. **Physloc** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the Physloc range. note Physloc parallel method is for SQL Server databases only. **Random** - Use a modulo on the distributeKeyColumn to distribute data. **Rowid** - For Oracle sources only: use rowid slices. note Rowid parallel method is for Oracle databases only. **RangeId** - Use a numeric range to distribute data (useful with an identity column or sequence without gaps. The column must be numerical). **Ntile** - Use the ntile function to distribute data evenly. Data can be numerical, date, datetime or string. **NZDataSlice** - Netezza source only. Use the data slices to distribute data retrieval. note NZDataSlice parallel method is for Netezza databases only. ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | ------------- | -------- | ------------------------ | ------------------------- | | `None` | | | Any | | `DataDriven` | | | Any | | `Ctid` | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` | | | SQL Server (mssql) | | `Random` | | | Any | | `Rowid` | | | Oracle (oraodp) | | `RangeId` | | | Any | | `Ntile` | | | Any | | `NZDataSlice` | | | Netezza | **Default Value:** `None` When to Use Parallelism If you want to use a parallel export/import use other than None. Try to use Parallelism only if you have a large amount of data to transfer (more than 1M cells). ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `-K` or `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastTransfer will use SQL queries that run in parallel against the source. Each query will have a WHERE clause that retrieves a part of the total data. Information This parameter is mandatory when using methods that require a distributed column: Random, DataDriven, RangeId, or Ntile. * Windows * Linux ``` # Using a column name .\FastTransfer.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastTransfer.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastTransfer \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastTransfer \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Short form: `-K ` * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `-P` or `--degree` parameter to control how many parallel threads will be used for the export. ### DOP Values[​](#dop-values "Direct link to DOP Values") **Positive value (e.g., 4)** - Uses exactly that number of parallel threads. If greater than the number of CPU cores/threads, it will be downscaled to match available cores. **0** - Automatically aligns with the number of cores (or threads if Hyper-Threading is enabled) on the machine. **Negative value (e.g., -2)** - Computed as `number of cores / abs(dop)`. For example, if you have 16 cores and set DOP to -2, the actual DOP will be 8. * Windows * Linux ``` # Use 8 parallel threads .\FastTransfer.exe ` ... --degree 8 ` ... # Auto-detect based on CPU cores .\FastTransfer.exe ` ... --degree 0 ` ... # Use half of available cores .\FastTransfer.exe ` ... --degree -2 ` ... ``` ``` # Use 8 parallel threads ./FastTransfer \ ... --degree 8 \ ... # Auto-detect based on CPU cores ./FastTransfer \ ... --degree 0 \ ... # Use half of available cores ./FastTransfer \ ... --degree -2 \ ... ``` **Syntax:** * Short form: `-P ` * Long form: `--degree ` **Default:** `-2` ## Data Driven Query[​](#data-driven-query "Direct link to Data Driven Query") Use the `-Q` or `--datadrivenquery` parameter when using the DataDriven method to provide a query that returns the list of values that will be used to split the data. This allows you to filter the values that will be exported and used to split the data. * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Short form: `-Q ""` * Long form only: `--datadrivenquery ""` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "select * from orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_ordermonth" ` --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" ` --degree 10 ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "select * from orders" \ --parallelmethod "DataDriven" \ --distributekeycolumn "o_ordermonth" \ --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" \ --degree 10 ``` This example: * Connects to a SQL Server source database on localhost * Transfers data to a SQL Server target database using BulkCopy * Uses trusted authentication for both source and target * Executes a custom query on the orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date (o\_ordermonth column) * Uses a custom query to generate month values (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even though there are 12 months to export) --- # Source Connection Parameters FastTransfer requires connection information to access your source database where data will be extracted. This page covers all source connection-related parameters. ## Source Connection Type[​](#source-connection-type "Direct link to Source Connection Type") Specify the type of source database connection driver to use. This parameter determines how FastTransfer connects to your source database. ``` ./FastTransfer \ ... --sourceconnectiontype mssql \ ... ``` **Syntax:** * Short form: `-c "connection_type"` * Long form: `--sourceconnectiontype "connection_type"` **Available Source Connection Types:** | Connection Type | Description | | --------------- | ---------------------------------------------- | | `clickhouse` | ClickHouse | | `duckdb` | DuckDB | | `duckdbstream` | DuckDB using streaming (more memory efficient) | | `hana` | SAP HANA (.net driver) | | `msoledbsql` | SQL Server OleDB | | `mssql` | SQL Server Native Client (.Net) | | `mysql` | MySQL | | `nzcopy` | Netezza copy (WIP) | | `nzoledb` | Netezza OleDB | | `nzsql` | Netezza Native (.net driver) | | `odbc` | ODBC datasource (DSN must be configured) | | `oledb` | Generic OleDB datasource | | `oraodp` | Oracle ODP.Net | | `pgcopy` | PostgreSQL Copy | | `pgsql` | PostgreSQL Native (.Net) | | `teradata` | Teradata (.Net) | ## Source DSN (Data Source Name)[​](#source-dsn-data-source-name "Direct link to Source DSN (Data Source Name)") If you have chosen an ODBC connection type for the source, you must define the DSN with the `-n` parameter, or alternatively define a connection string using `--sourceconnectionstring`. ``` ./FastTransfer \ ... --sourceconnectiontype odbc \ --sourcedsn "MySourceODBCDataSource" \ ... ``` **Syntax:** * Short form: `-n "DSN_name"` * Long form: `--sourcedsn "DSN_name"` ## Source Provider[​](#source-provider "Direct link to Source Provider") If you have chosen an OLEDB connection type for the source, you must define the OLEDB provider with the `-p` parameter. ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider MSOLEDBSQL \ ... ``` ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider NZOLEDB \ ... ``` **Syntax:** * Short form: `-p "provider_name"` * Long form: `--sourceprovider "provider_name"` ## Source Server[​](#source-server "Direct link to Source Server") Except if you have defined a source connection string, you must define a source server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-s "server"` * Long form: `--sourceserver "server"` ### Source Server Format Examples[​](#source-server-format-examples "Direct link to Source Server Format Examples") The source server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:2433" \ ... ``` or ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:1521/myinstance" \ ... ``` **For Oracle - TNS entry:** ``` ./FastTransfer \ ... --sourceserver "MYTNS" \ ... ``` ## Source Connection String[​](#source-connection-string "Direct link to Source Connection String") Tips You can use a connection string to define the connection to the source database. This connection string will override any other connection parameters and can be used if the other authentication modes are not enough for your case. You can use the connection string for any source connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastTransfer \ ... --sourceconnectionstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--sourceconnectionstring "connection_string"` Password Security in Logs All passwords within the `--sourceconnectionstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Source Database[​](#source-database "Direct link to Source Database") Define the source database name. **Example:** ``` ./FastTransfer \ ... --sourcedatabase "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-d "database_name"` * Long form: `--sourcedatabase "database_name"` --- # Target Connection Parameters FastTransfer requires connection information to access your target database where data will be transferred. This page covers all target connection-related parameters. ## Target Connection Type[​](#target-connection-type "Direct link to Target Connection Type") Specify the type of target database connection driver to use. This parameter determines how FastTransfer connects to your target database. ``` ./FastTransfer \ ... --targetconnectiontype mssql \ ... ``` **Syntax:** * Short form: `-C "connection_type"` * Long form: `--targetconnectiontype "connection_type"` **Available Target Connection Types:** | Connection Type | Description | | ---------------- | -------------------------------------------------------------------------------- | | `clickhousebulk` | ClickHouse BulkCopy | | `duckdb` | DuckDB | | `hanabulk` | SAP HANA | | `msbulk` | SQL Server BulkCopy | | `mysqlbulk` | MySQL BulkCopy | | `nzbulk` | Netezza BulkCopy | | `orabulk` | Oracle BulkCopy | | `oradirect` | Oracle Direct | | `pgcopy` | PostgreSQL using copy (Binary format for postgresql sources and Text for others) | | `pgsql` | PostgreSQL Native (.Net) | | `teradata` | Teradata (.Net) | ## Target Server[​](#target-server "Direct link to Target Server") Except if you have defined a target connection string, you must define a target server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-I "server"` * Long form: `--targetserver "server"` ### Target Server Format Examples[​](#target-server-format-examples "Direct link to Target Server Format Examples") The target server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:3306" \ ... ``` or ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com,1433" \ ... ``` **IP address or DNS name with named instance (SQL Server):** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com\TARGETINSTANCE" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:1521/TARGETPDB" \ ... ``` **For DuckDB - Local file path:** ``` ./FastTransfer \ ... --targetconnectiontype duckdb \ --targetserver "/path/to/target.duckdb" \ ... ``` ## Target Connection String[​](#target-connection-string "Direct link to Target Connection String") Advanced Connection Options You can use a connection string to define the connection to the target database. This connection string will override any other target connection parameters and can be used if the standard authentication modes are not sufficient for your use case. You can use the target connection string for any connection type. The connection string must be enclosed in double quotes. **Example for SQL Server:** ``` ./FastTransfer \ ... --targetconnectionstring "Server=mytargetserver;Database=mytargetdb;User ID=TargetUser;Password=TargetPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Example for PostgreSQL:** ``` ./FastTransfer \ ... --targetconnectionstring "Host=mytargetserver;Database=mytargetdb;Username=TargetUser;Password=TargetPassword;SSL Mode=Require" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--targetconnectionstring "connection_string"` Password Security in Logs All passwords within the `--targetconnectionstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Target Database[​](#target-database "Direct link to Target Database") Define the target database name. **Example:** ``` ./FastTransfer \ ... --targetdatabase "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-D "database_name"` * Long form: `--targetdatabase "database_name"` Matching Schema Requirements The target table must already exist with a compatible schema. FastTransfer does not automatically create target tables. Ensure column data types are compatible between source and target databases. --- # 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[​](#source-configuration "Direct link to Source Configuration") These parameters define what data to extract from the source database. ### Source Schema[​](#source-schema "Direct link to 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"` Required for PostgreSQL Ctid Method This parameter must be set if the PostgreSQL Ctid method is used. ### Source Table[​](#source-table "Direct link to 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"` Required for PostgreSQL Ctid Method This parameter must be set if the PostgreSQL Ctid method is used. ### Query[​](#query "Direct link to 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"` Tips When using a custom query, FastTransfer will execute this query on the source database instead of reading from a table directly. ### File Input[​](#file-input "Direct link to 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"` File Requirement The specified file must exist and contain a valid SQL query. ## Target Configuration[​](#target-configuration "Direct link to Target Configuration") These parameters define where to load the data in the target database. ### Target Schema[​](#target-schema "Direct link to Target Schema") Define the target schema name. **Example:** ``` ./FastTransfer \ ... --targetschema "dbo" \ ... ``` **Syntax:** * Short form: `-S "schema_name"` * Long form: `--targetschema "schema_name"` ### Target Table[​](#target-table "Direct link to Target Table") Define the target table name. **Example:** ``` ./FastTransfer \ ... --targettable "customers" \ ... ``` **Syntax:** * Short form: `-T "table_name"` * Long form: `--targettable "table_name"` ## Load Behavior[​](#load-behavior "Direct link to Load Behavior") These parameters control how data is loaded into the target table. ### Load Mode[​](#load-mode "Direct link to 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 "Direct link to Batch Size") Batch Size for BulkCopy operations. **Example:** ``` ./FastTransfer \ ... --batchsize 500000 \ ... ``` **Syntax:** * Short form: `-B "size"` * Long form: `--batchsize "size"` **Default Value:** `1048576` Performance Tuning 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[​](#use-work-tables "Direct link to 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` When to Use This option is useful in rare scenarios where direct loading causes issues. Work tables act as an intermediate staging area. ### Map Method[​](#map-method "Direct link to 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` Column Mapping 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. --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastTransfer. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastTransfer supports multiple AWS authentication methods, listed in order of precedence: 1. **AWS Credentials File** (recommended for local development) 2. **Environment Variables** (recommended for CI/CD) 3. **IAM Roles** (recommended for AWS infrastructure) ### 1. AWS Credentials File[​](#1-aws-credentials-file "Direct link to 1. AWS Credentials File") The most common method for local development and testing. **Location:** * **Windows:** `C:\Users\YourName\.aws\credentials` * **Linux:** `~/.aws/credentials` **Credentials File Format:** ``` [default] aws_access_key_id = AKIAIOSFODNN7EXAMPLE aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY [production] aws_access_key_id = AKIAI44QH8DHBEXAMPLE aws_secret_access_key = je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY [development] aws_access_key_id = AKIAI44QH8DHBEXAMPLE aws_secret_access_key = je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY ``` **Configuration File (Optional):** Location: `~/.aws/config` ``` [default] region = us-east-1 output = json [profile production] region = eu-west-1 output = json [profile development] region = us-west-2 output = json ``` **Using Profiles with FastTransfer:** ``` # Use default profile ./FastTransfer \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastTransfer \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastTransfer \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" \ --fileoutput "data.parquet" \ ... ``` ### 2. Environment Variables[​](#2-environment-variables "Direct link to 2. Environment Variables") Useful for CI/CD pipelines and containerized environments. * Windows (PowerShell) * Linux ``` # Set AWS credentials $env:AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" $env:AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" $env:AWS_DEFAULT_REGION="us-east-1" # Optional: Session token for temporary credentials $env:AWS_SESSION_TOKEN="FwoGZXIvYXdzEBYaD..." # Run FastTransfer .\\FastTransfer.exe ` ... --directory "s3://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set AWS credentials export AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" export AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" export AWS_DEFAULT_REGION="us-east-1" # Optional: Session token for temporary credentials export AWS_SESSION_TOKEN="FwoGZXIvYXdzEBYaD..." # Run FastTransfer ./FastTransfer \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. IAM Roles (EC2, ECS, Lambda)[​](#3-iam-roles-ec2-ecs-lambda "Direct link to 3. IAM Roles (EC2, ECS, Lambda)") When FastTransfer runs on AWS infrastructure, it can use automatically the instance's IAM role. **No credentials configuration needed!** **Supported AWS Services:** * Amazon EC2 instances * Amazon ECS tasks * AWS Lambda functions * AWS Batch jobs * Amazon EKS pods (with IAM roles for service accounts) **Example IAM Policy for FastTransfer:** ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:PutObjectAcl", "s3:GetObject" ], "Resource": "arn:aws:s3:::my-bucket/exports/*" }, { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": "arn:aws:s3:::my-bucket" } ] } ``` ## S3 URI Format[​](#s3-uri-format "Direct link to S3 URI Format") ``` s3://bucket-name/path/to/directory/ ``` ### URI Examples[​](#uri-examples "Direct link to URI Examples") ``` # Root of bucket --directory "s3://my-bucket" # Single folder level --directory "s3://my-bucket/exports" # Multiple folder levels --directory "s3://my-bucket/exports/sales/2024" # Hive-style partitioning --directory "s3://my-bucket/data/year=2024/month=01/day=15" ``` ## Complete Examples[​](#complete-examples "Direct link to Complete Examples") ### Basic Export to S3[​](#basic-export-to-s3 "Direct link to Basic Export to S3") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "SalesDB" \ --trusted \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "s3://my-bucket/exports/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" ``` ### Parallel Export with Profile[​](#parallel-export-with-profile "Direct link to Parallel Export with Profile") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "prod-sql-01" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "s3://prod-datalake/sales/orders" ` --fileoutput "orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "OrderID" ` --paralleldegree 8 ` --cloudprofile "production" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "prod-sql-01" \ --database "SalesDB" \ --trusted \ --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "s3://prod-datalake/sales/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "RangeId" \ --distributekeycolumn "OrderID" \ --paralleldegree 8 \ --cloudprofile "production" ``` ### Export with Date Partitioning[​](#export-with-date-partitioning "Direct link to Export with Date Partitioning") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "events" ` --directory "s3://analytics-bucket/events/" ` --fileoutput "events.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "eventmonth" ` --paralleldegree 10 ``` ``` ./FastTransfer \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "analytics" \ --user "postgres" \ --password "postgres" \ --sourceschema "public" \ --sourcetable "events" \ --directory "s3://analytics-bucket/events/" \ --fileoutput "events.parquet" \ --parallelmethod "DataDriven" \ --distributekeycolumn "eventmonth" \ --paralleldegree 10 ``` ## S3-Compatible Storage[​](#s3-compatible-storage "Direct link to S3-Compatible Storage") FastTransfer works with S3-compatible storage services like MinIO, DigitalOcean Spaces, Wasabi, and OVH Object Storage. ### Configuration for S3-Compatible Services[​](#configuration-for-s3-compatible-services "Direct link to Configuration for S3-Compatible Services") * Windows (PowerShell) * Linux ``` # Set endpoint URL for S3-compatible service $env:AWS_ACCESS_KEY_ID="your-access-key" $env:AWS_SECRET_ACCESS_KEY="your-secret-key" $env:S3_ENDPOINT="https://s3.your-provider.com" # For MinIO $env:S3_ENDPOINT="http://localhost:9000" ``` ``` # Set endpoint URL for S3-compatible service export AWS_ACCESS_KEY_ID="your-access-key" export AWS_SECRET_ACCESS_KEY="your-secret-key" export S3_ENDPOINT="https://s3.your-provider.com" # For MinIO export S3_ENDPOINT="http://localhost:9000" ``` ## Required Permissions[​](#required-permissions "Direct link to Required Permissions") ### Minimum Permissions[​](#minimum-permissions "Direct link to Minimum Permissions") ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject" ], "Resource": "arn:aws:s3:::my-bucket/exports/*" } ] } ``` ### Recommended Permissions[​](#recommended-permissions "Direct link to Recommended Permissions") ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:PutObjectAcl", "s3:GetObject", "s3:DeleteObject" ], "Resource": "arn:aws:s3:::my-bucket/exports/*" }, { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": "arn:aws:s3:::my-bucket", "Condition": { "StringLike": { "s3:prefix": "exports/*" } } } ] } ``` --- # Azure Configuration Complete guide for configuring Azure Blob Storage and Azure Data Lake Gen2 connectivity with FastTransfer. ## Supported Azure Storage Services[​](#supported-azure-storage-services "Direct link to Supported Azure Storage Services") | Service | Protocol | Best For | | ------------------------ | ---------- | ---------------------------------------------- | | **Azure Blob Storage** | `abs://` | General-purpose object storage | | **Azure Data Lake Gen2** | `abfss://` | Big data analytics and hierarchical namespaces | ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastTransfer supports multiple Azure authentication methods: 1. **Azure CLI** (recommended for local development) 2. **Connection String** (simple but less secure) 3. **Storage Account Key** (via environment variables) 4. **Managed Identity** (recommended for Azure infrastructure) ### 1. Azure CLI[​](#1-azure-cli "Direct link to 1. Azure CLI") The simplest method for local development and testing. **Setup:** ``` # Install Azure CLI # Windows: Download from https://aka.ms/installazurecliwindows # Linux: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # Login to Azure az login # List subscriptions az account list --output table # Set active subscription (if you have multiple) az account set --subscription "My Subscription Name" # or by ID az account set --subscription "12345678-1234-1234-1234-123456789abc" # Verify access to storage account az storage account show --name mystorageaccount --resource-group myresourcegroup ``` FastTransfer will automatically use the Azure CLI's authentication credentials. **Using with FastTransfer:** ``` # No additional configuration needed - just run FastTransfer ./FastTransfer \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" \ --fileoutput "data.parquet" \ ... ``` ### 2. Connection String[​](#2-connection-string "Direct link to 2. Connection String") Useful for CI/CD pipelines and automated workflows. **Get Connection String:** * Azure Portal * Azure CLI 1. Navigate to your Storage Account 2. Go to **Security + networking** → **Access keys** 3. Copy the **Connection string** for key1 or key2 ``` az storage account show-connection-string \ --name mystorageaccount \ --resource-group myresourcegroup \ --output tsv ``` **Set Connection String:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=xxxxx;EndpointSuffix=core.windows.net" # Run FastTransfer .\\FastTransfer.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/container/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=xxxxx;EndpointSuffix=core.windows.net" # Run FastTransfer ./FastTransfer \ ... --directory"abs://mystorageaccount.blob.core.windows.net/mycontaner/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Storage Account Key[​](#3-storage-account-key "Direct link to 3. Storage Account Key") Alternative to connection string using separate environment variables. **Get Storage Account Key:** * Azure Portal * Azure CLI 1. Navigate to your Storage Account 2. Go to **Security + networking** → **Access keys** 3. Copy **key1** or **key2** ``` az storage account keys list \ --account-name mystorageaccount \ --resource-group myresourcegroup \ --query "[0].value" \ --output tsv ``` **Set Environment Variables:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_CLIENT_ID="" $env:AZURE_TENANT_ID="" $env:AZURE_CLIENT_SECRET="" # Run FastTransfer .\\FastTransfer.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontaner/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_CLIENT_ID="" export AZURE_TENANT_ID="" export AZURE_CLIENT_SECRET="" # Run FastTransfer ./FastTransfer \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontaner/exports" \ --fileoutput "data.parquet" \ ... ``` ### 4. Managed Identity[​](#4-managed-identity "Direct link to 4. Managed Identity") When FastTransfer runs on Azure infrastructure, it can use Managed Identity automatically. **No credentials configuration needed!** **Supported Azure Services:** * Azure Virtual Machines * Azure App Service * Azure Functions * Azure Container Instances * Azure Kubernetes Service (AKS) **Enable System-Assigned Managed Identity:** * Azure Portal * Azure CLI 1. Navigate to your Azure resource (VM, App Service, etc.) 2. Go to **Identity** 3. Enable **System assigned** identity 4. Save changes ``` # For a VM az vm identity assign --name myVM --resource-group myResourceGroup # For an App Service az webapp identity assign --name myAppService --resource-group myResourceGroup ``` **Grant Storage Access:** ``` # Get the Managed Identity Object ID PRINCIPAL_ID=$(az vm show --name myVM --resource-group myResourceGroup --query identity.principalId -o tsv) # Assign Storage Blob Data Contributor role az role assignment create \ --assignee $PRINCIPAL_ID \ --role "Storage Blob Data Contributor" \ --scope "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") ### URI Format[​](#uri-format "Direct link to URI Format") ``` abs://storageaccount.blob.core.windows.net/container/path/ ``` ### URI Examples[​](#uri-examples "Direct link to URI Examples") ``` # Root of container --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/" # Folder in container --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" # Nested folders --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports/sales/2024" # Date partitioning --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/yearmonth=202401/" ``` ### Complete Examples[​](#complete-examples "Direct link to Complete Examples") **Basic Export:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Customers" ` --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports/customers" ` --fileoutput "customers.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "SalesDB" \ --trusted \ --sourceschema "dbo" \ --sourcetable "Customers" \ --directory "abs://mystorageaccount.blob.core.windows.net/container/exports/customers" \ --fileoutput "customers.parquet" ``` **Parallel Export with Query:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" ` --directory "abs://mystorageaccount.blob.core.windows.net/container/exports/orders" ` --fileoutput "orders_2024.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ``` ``` ./FastTransfer \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "ecommerce" \ --user "postgres" \ --password "postgres" \ --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" \ --directory "abs://mystorageaccount.blob.core.windows.net/container/exports/orders" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Random" \ --distributekeycolumn "order_id" \ --paralleldegree 8 ``` ## Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Azure Data Lake Storage Gen2 is recommended for analytics workloads due to hierarchical namespace support and better performance. ### URI Format[​](#uri-format-1 "Direct link to URI Format") ``` abfss://container@storageaccount.dfs.core.windows.net/path/ ``` Key Differences from Blob Storage * **Protocol:** `abfss://` instead of `abs://` * **Endpoint:** `.dfs.core.windows.net` instead of `.blob.core.windows.net` * **Features:** Hierarchical namespace, directory-level operations, better performance ### URI Examples[​](#uri-examples-1 "Direct link to URI Examples") ``` # Root of filesystem --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake" # Folder in filesystem --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake/raw/sales" # Hive-style partitioning --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake/sales/yearmonth=202401" ``` ### Complete Examples[​](#complete-examples-1 "Direct link to Complete Examples") **Basic Export:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datalake/raw/{sourcetable}/" ` --fileoutput "FactSales.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "DataWarehouse" \ --trusted \ --sourceschema "dbo" \ --sourcetable "FactSales" \ --directory "abfss://datalake@mystorageaccount.dfs.core.windows.net/raw/{sourcetable}/" \ --fileoutput "FactSales.parquet" ``` **Parallel Export with Partitioning:** * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "Analytics" ` --trusted ` --query "SELECT * FROM Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/mycontainer/{sourcedatabase}/events/" ` --fileoutput "events.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "EventDate" ` --datadrivenquery "SELECT RefDate From Calendar WHERE RefDate between '2024-01-01' and '2024-03-01'" ` --paralleldegree 12 ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "Analytics" \ --trusted \ --query "SELECT * FROM Events" \ --directory "abfss://mystorageaccount.dfs.core.windows.net/mycontainer/{sourcedatabase}/events/" \ --fileoutput "events.parquet" \ --parallelmethod "DataDriven" \ --distributekeycolumn "EventDate" \ --datadrivenquery "SELECT RefDate From Calendar WHERE RefDate between '2024-01-01' and '2024-03-01'" \ --paralleldegree 12 ``` ## Required Permissions[​](#required-permissions "Direct link to Required Permissions") ### Azure RBAC Roles[​](#azure-rbac-roles "Direct link to Azure RBAC Roles") **Recommended Role:** * **Storage Blob Data Contributor** - Full read/write access to blobs **Alternative Roles:** * **Storage Blob Data Owner** - Full access including ACL management * **Storage Blob Data Reader** - Read-only access (for verification) ### Assign Role via Azure Portal[​](#assign-role-via-azure-portal "Direct link to Assign Role via Azure Portal") 1. Navigate to your Storage Account 2. Go to **Access Control (IAM)** 3. Click **Add** → **Add role assignment** 4. Select **Storage Blob Data Contributor** 5. Select user, group, or managed identity 6. Click **Save** ### Assign Role via Azure CLI[​](#assign-role-via-azure-cli "Direct link to Assign Role via Azure CLI") ``` # For a user az role assignment create \ --assignee user@example.com \ --role "Storage Blob Data Contributor" \ --scope "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}" # For a managed identity az role assignment create \ --assignee {managed-identity-object-id} \ --role "Storage Blob Data Contributor" \ --scope "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}" ``` --- # Google Cloud Storage Configuration Complete guide for configuring Google Cloud Storage connectivity with FastTransfer. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastTransfer supports multiple Google Cloud authentication methods: 1. **gcloud CLI** (recommended for local development) 2. **Service Account Key File** (recommended for production) 3. **Default Application Credentials** (for GCP infrastructure) ### 1. gcloud CLI (Recommended)[​](#1-gcloud-cli-recommended "Direct link to 1. gcloud CLI (Recommended)") The simplest method for local development and testing. **Setup:** ``` # Install gcloud CLI # Windows: Download from https://cloud.google.com/sdk/docs/install # Linux: curl https://sdk.cloud.google.com | bash # Initialize gcloud gcloud init # Login to Google Cloud gcloud auth login # List available projects gcloud projects list # Set active project gcloud config set project my-project-id # Create application default credentials gcloud auth application-default login ``` FastTransfer will automatically use the gcloud CLI's authentication credentials. **Using with FastTransfer:** ``` # No additional configuration needed - just run FastTransfer ./FastTransfer \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 2. Service Account Key File[​](#2-service-account-key-file "Direct link to 2. Service Account Key File") Recommended for production environments, CI/CD pipelines, and automated workflows. **Create Service Account:** * Google Cloud Console * gcloud CLI 1. Go to [IAM & Admin → Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) 2. Click **Create Service Account** 3. Enter name (e.g., "FastTransfer-export") 4. Click **Create and Continue** 5. Grant **Storage Object Admin** role 6. Click **Continue** → **Done** 7. Click on the service account 8. Go to **Keys** tab 9. Click **Add Key** → **Create new key** 10. Select **JSON** format 11. Click **Create** (JSON file will download) ``` # Create service account gcloud iam service-accounts create FastTransfer-export \ --display-name="FastTransfer Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:FastTransfer-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/FastTransfer-key.json \ --iam-account=FastTransfer-export@my-project-id.iam.gserviceaccount.com ``` **Use Service Account Key:** * Windows (PowerShell) * Linux ``` # Set path to service account key file $env:GOOGLE_APPLICATION_CREDENTIALS="C:\keys\FastTransfer-key.json" # Run FastTransfer .\\FastTransfer.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/FastTransfer-key.json" # Run FastTransfer ./FastTransfer \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastTransfer runs on Google Cloud infrastructure, it automatically uses the default service account. **No credentials configuration needed!** **Supported GCP Services:** * Compute Engine instances * Google Kubernetes Engine (GKE) pods * Cloud Run services * Cloud Functions * App Engine **Verify Default Credentials:** ``` gcloud auth application-default print-access-token ``` ## GCS URI Format[​](#gcs-uri-format "Direct link to GCS URI Format") ``` gs://bucket-name/path/to/directory/ ``` ### URI Examples[​](#uri-examples "Direct link to URI Examples") ``` # Root of bucket --directory "gs://my-bucket" # Single folder level --directory "gs://my-bucket/exports" # Multiple folder levels --directory "gs://my-bucket/exports/sales/2024" # Hive-style partitioning --directory "gs://my-bucket/data/year=2024/month=01/day=15" ``` ## Complete Examples[​](#complete-examples "Direct link to Complete Examples") ### Basic Export to GCS[​](#basic-export-to-gcs "Direct link to Basic Export to GCS") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastTransfer \ --connectiontype "mssql" \ --server "localhost" \ --database "SalesDB" \ --trusted \ --sourceschema "dbo" \ --sourcetable "Orders" \ --directory "gs://my-bucket/exports/orders" \ --fileoutput "orders.parquet" ``` ### Parallel Export with Query[​](#parallel-export-with-query "Direct link to Parallel Export with Query") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" ` --directory "gs://analytics-bucket/events/2024" ` --fileoutput "events.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ``` ``` ./FastTransfer \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "analytics" \ --user "postgres" \ --password "postgres" \ --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" \ --directory "gs://analytics-bucket/events/2024" \ --fileoutput "events.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 10 ``` ### Export with Date Partitioning[​](#export-with-date-partitioning "Direct link to Export with Date Partitioning") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "ecommerce" ` --user "root" ` --password "password" ` --sourceschema "ecommerce" ` --sourcetable "orders" ` --directory "gs://datalake-bucket/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 8 ``` ``` ./FastTransfer \ --connectiontype "mysql" \ --server "localhost" \ --port "3306" \ --database "ecommerce" \ --user "root" \ --password "password" \ --sourceschema "ecommerce" \ --sourcetable "orders" \ --directory "gs://datalake-bucket/orders/" \ --fileoutput "orders.parquet" \ --parallelmethod "DataDriven" \ --distributekeycolumn "o_orderdate" \ --paralleldegree 8 ``` ### Export from Oracle to GCS using Rowid parallelmethod[​](#export-from-oracle-to-gcs-using-rowid-parallelmethod "Direct link to Export from Oracle to GCS using Rowid parallelmethod") * Windows * Linux ``` .\\FastTransfer.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "gs://warehouse-bucket/oracle-export/orders" ` --fileoutput "orders.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 8 ``` ``` ./FastTransfer \ --connectiontype "oraodp" \ --server "localhost:1521/ORCLPDB1" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "gs://warehouse-bucket/oracle-export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Rowid" \ --paralleldegree 8 \ --merge "True" ``` ## Bucket Configuration[​](#bucket-configuration "Direct link to Bucket Configuration") ### Create Bucket[​](#create-bucket "Direct link to Create Bucket") * Google Cloud Console * gcloud CLI 1. Go to [Cloud Storage → Buckets](https://console.cloud.google.com/storage/browser) 2. Click **Create Bucket** 3. Enter bucket name (globally unique) 4. Choose location type and region 5. Choose storage class (Standard, Nearline, Coldline, Archive) 6. Set access control (Uniform or Fine-grained) 7. Click **Create** ``` # Create bucket in us-central1 gsutil mb -l us-central1 gs://my-bucket # Create bucket with specific storage class gsutil mb -c STANDARD -l us-central1 gs://my-bucket # Set uniform bucket-level access gsutil uniformbucketlevelaccess set on gs://my-bucket ``` ## Required Permissions[​](#required-permissions "Direct link to Required Permissions") ### IAM Roles[​](#iam-roles "Direct link to IAM Roles") **Recommended Roles:** * **Storage Object Creator** (`roles/storage.objectCreator`) - Create objects only * **Storage Object Viewer** (`roles/storage.objectViewer`) - Read objects only ### Grant Access via Console[​](#grant-access-via-console "Direct link to Grant Access via Console") 1. Go to [Cloud Storage → Buckets](https://console.cloud.google.com/storage/browser) 2. Click bucket name 3. Go to **Permissions** tab 4. Click **Grant Access** 5. Enter principal (user, service account, or group) 6. Select role (e.g., **Storage Object Admin**) 7. Click **Save** ### Grant Access via gcloud CLI[​](#grant-access-via-gcloud-cli "Direct link to Grant Access via gcloud CLI") ``` # Grant to service account gsutil iam ch serviceAccount:FastTransfer-export@my-project-id.iam.gserviceaccount.com:roles/storage.objectAdmin gs://my-bucket ``` ### Minimal Permissions[​](#minimal-permissions "Direct link to Minimal Permissions") Minimum permissions for FastTransfer instead of bucket storage admin: * `storage.objects.create` - Upload objects * `storage.objects.delete` - Delete objects (for overwrite) * `storage.objects.get` - Read objects (for verification) * `storage.objects.list` - List objects in bucket --- # OneLake Configuration * 1 - In Entra : Create an application account in your tenant * 2 - In Entra : Create a secret for this application * 3 - In Entra : Grant the application on PowerBI Service in API Permission * 4 - In Fabric : Give the Service principal created in step 1, the Admin Role in your workspace in you shell set environment variables * Windows * Linux ``` $env:AZURE_TENANT_ID="YOUR_TENANT_ID" $env:AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" $env:AZURE_CLIENT_SECRET="Your_AZCLient_Secret" .\\FastTransfer.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "sales" ` --sourcetable "orders" ` --query "SELECT * FROM orders WHERE order_date between '2024-01-01' and '2024-12-31'" ` --directory "onelakes://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" ` --fileoutput "orders_2024.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 8 ``` ``` export AZURE_TENANT_ID="YOUR_TENANT_ID" export AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" export AZURE_CLIENT_SECRET="Your_AZCLient_Secret" ./FastTransfer ` --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "ecommerce" \ --user "postgres" \ --password "postgres" \ --sourceschema "sales"\ --sourcetable "orders" \ --query "SELECT * FROM orders WHERE order_date between '2024-01-01' and '2024-12-31'" \ --directory "onelakes://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastTransfer provides native support for exporting data directly to major cloud storage platforms without requiring intermediate local storage. ## Supported Platforms[​](#supported-platforms "Direct link to Supported Platforms") | Platform | Protocol | Authentication Methods | | ------------------------- | ------------ | ----------------------------------------------------------- | | **AWS S3** | `s3://` | Credentials file, Environment variables, IAM roles | | **Azure Blob Storage** | `abs://` | Azure CLI, Connection string, Access keys, Managed Identity | | **Azure Data Lake Gen2** | `abfss://` | Azure CLI, Connection string, Access keys, Managed Identity | | **Google Cloud Storage** | `gs://` | gcloud CLI, Service account, Default credentials | | **S3-Compatible Storage** | `s3://` | Credentials file, Environment variables | | **OneLake** | `onelake://` | Azure CLI, Connection string, Access keys, Managed Identity | ## Key Features[​](#key-features "Direct link to Key Features") ### Direct Upload[​](#direct-upload "Direct link to Direct Upload") Export data directly to cloud storage without local disk space requirements. note FastTransfer will use multi-part uploads for all cloud provider Warning Since FastTransfer can be cancelled, killed, or crash unexpectedly, any multipart uploads it initiates may remain incomplete. These unfinished multipart uploads continue to occupy storage and may incur additional costs. To prevent this, **you should configure a lifecycle management rule on your bucket to automatically delete incomplete multipart uploads older than x days**. ### Multiple Authentication Methods[​](#multiple-authentication-methods "Direct link to Multiple Authentication Methods") FastTransfer supports multiple authentication mechanisms, including CLI profiles, credentials files, environment variables, and cloud-native identity solutions. Authentication is resolved through a fallback chain, in the following order: * The `--cloudprofile` option is used first, if provided. * Standard authentication environment variables are used as the first fallback. * Managed Identity is used as the second fallback. * An IAM role/profile is used as the final fallback. ### Profile Management[​](#profile-management "Direct link to Profile Management") Use the `--cloudprofile` parameter can allow you to switch between different cloud accounts and environments (development, staging, production). ### Automatic Retry[​](#automatic-retry "Direct link to Automatic Retry") Built-in retry logic for network failures and transient cloud service errors. ## Quick Start[​](#quick-start "Direct link to Quick Start") ### 1. Configure Cloud Authentication[​](#1-configure-cloud-authentication "Direct link to 1. Configure Cloud Authentication") Choose your cloud provider and follow the setup guide: * [AWS S3 Setup](/0.16/documentation/cloud-connectivity/aws-s3.md) * [Azure Setup](/0.16/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage Setup](/0.16/documentation/cloud-connectivity/google-cloud.md) ### 2. Export to Cloud[​](#2-export-to-cloud "Direct link to 2. Export to Cloud") Use the appropriate URI scheme in the `--directory` parameter: ``` # AWS S3 & S3-Compatible ./FastTransfer / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastTransfer \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastTransfer \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastTransfer \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastTransfer \ ... --directory "onelake://MyWorSpace/MyLakeHouse/MyDir/" \ --fileoutput "data.parquet" \ ... ``` ### 3. Use Profiles[​](#3-use-profiles "Direct link to 3. Use Profiles") Switch between different cloud accounts: ``` ./FastTransfer \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastTransfer \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastTransfer supports Windows, Linux, and macOS across different architectures. ## Supported Operating Systems[​](#supported-operating-systems "Direct link to Supported Operating Systems") * Windows * Linux | OS | Versions | Architectures | Supported | | ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------- | --------- | | Nano Server | 2025, 2022, 2019 | x64 | | | Windows | 11 24H2 (IoT), 11 24H2 (E), 11 24H2, 11 23H2, 11 22H2 (E), 10 22H2, 10 21H2 (E), 10 21H2 (IoT), 10 1809 (E), 10 1607 (E) | x64 | | | Windows Server | 2025, 23H2, 2022, 2019, 2016, 2012-R2, 2012 | x64 | | | Windows Server Core | 2025, 2022, 2019, 2016, 2012-R2, 2012 | x64 | | | OS | Versions | Architectures | Supported | | ------------------------ | -------------------------- | ------------- | --------- | | Alpine | 3.21, 3.20, 3.19, 3.18 | Arm64, x64 | | | Azure Linux | 3.0 | Arm64, x64 | | | CentOS Stream | 10, 9 | Arm64, x64 | | | Debian | 12 | Arm64, x64 | | | Fedora | 41, 40 | Arm64, x64 | | | openSUSE Leap | 15.6 | Arm64, x64 | | | Red Hat Enterprise Linux | 10, 9, 8 | Arm64, x64 | | | SUSE Enterprise Linux | 15.6 | Arm64, x64 | | | Ubuntu | 24.10, 24.04, 22.04, 20.04 | Arm64, x64 | | --- # Database Sources & Platforms FastTransfer supports a wide range of database systems across different platforms. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") | Source | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **ClickHouse** | | | | | **DuckDB** | | | | | **MySQL** | | | | | **Netezza** | | | | | **ODBC** | | | | | **OLEDB** | | | | | **Oracle** | | | | | **PostgreSQL** | | | | | **SQL Server** | | | | | **SAP Hana** | | | | | **Teradata** | | | | ## Supported Targets[​](#supported-targets "Direct link to Supported Targets") | Target | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **ClickHouse** | | | | | **DuckDB** | | | | | **MySQL** | | | | | **Netezza** | | | | | **ODBC** | | | | | **OLEDB** | | | | | **Oracle** | | | | | **PostgreSQL** | | | | | **SQL Server** | | | | | **SAP Hana** | | | | | **Teradata** | | | | --- # Advanced Scenarios Advanced use cases including DuckDB integration, ClickHouse, SAP HANA, Teradata, and other complex transfer scenarios. ## DuckDB Integration[​](#duckdb-integration "Direct link to DuckDB Integration") DuckDB provides powerful data transformation capabilities with FastTransfer. ### DuckDB Memory - Parquet with Nested Fields to MSSQL[​](#duckdb-memory---parquet-with-nested-fields-to-mssql "Direct link to DuckDB Memory - Parquet with Nested Fields to MSSQL") Process complex nested JSON/Parquet files with DuckDB's in-memory engine: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdb" ` --sourceserver ":memory:" ` --query "select * EXCLUDE(Risques, Interlocuteurs),unnest(interlocuteurs,recursive := true ) from (select day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) from read_parquet('D:\CLIENTS\ENEDIS\BI4ALL\CHANTIER\**\*.parquet', hive_partitioning=true)) t_row_unest" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "ENDSBI4ALL" ` --targetschema "bi4all" ` --targettable "DuckChantiers_hpart" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "day" ` --loadmode "Truncate" ` --degree 8 ``` DuckDB Memory Mode Use `:memory:` as the server to process data without persisting a DuckDB database file. Perfect for ETL transformations. ### DuckDB Stream - Multiple CSV Files with DataDriven[​](#duckdb-stream---multiple-csv-files-with-datadriven "Direct link to DuckDB Stream - Multiple CSV Files with DataDriven") Process multiple CSV files in parallel using filename as distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - Single Large CSV with Random Method[​](#duckdb-stream---single-large-csv-with-random-method "Direct link to DuckDB Stream - Single Large CSV with Random Method") Process a single large CSV file with parallel Random distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributeKeyColumn "l_orderkey" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - CSV with Column Slicing[​](#duckdb-stream---csv-with-column-slicing "Direct link to DuckDB Stream - CSV with Column Slicing") Use calculated column slices for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --loadmode "Truncate" ` --degree 13 ``` ### DuckDB Stream - CSV with Custom Format[​](#duckdb-stream---csv-with-custom-format "Direct link to DuckDB Stream - CSV with Custom Format") Specify CSV format parameters when auto-detection isn't sufficient: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(id/10000)::int" ` --loadmode "Truncate" ` --degree 12 ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributeKeyColumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## ClickHouse Integration[​](#clickhouse-integration "Direct link to ClickHouse Integration") ### PostgreSQL to ClickHouse - Single-threaded[​](#postgresql-to-clickhouse---single-threaded "Direct link to PostgreSQL to ClickHouse - Single-threaded") Transfer data to ClickHouse without parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ### PostgreSQL to ClickHouse - Parallel with Ctid[​](#postgresql-to-clickhouse---parallel-with-ctid "Direct link to PostgreSQL to ClickHouse - Parallel with Ctid") High-performance transfer using PostgreSQL's Ctid method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL - Multiple Methods[​](#clickhouse-to-postgresql---multiple-methods "Direct link to ClickHouse to PostgreSQL - Multiple Methods") Transfer from ClickHouse to PostgreSQL using various distribution methods: * Single-threaded * RangeId Method * DataDriven Method ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## SAP HANA Integration[​](#sap-hana-integration "Direct link to SAP HANA Integration") ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data to SAP HANA using the HANA bulk loader: **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer from SAP HANA to PostgreSQL: ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## Teradata Integration[​](#teradata-integration "Direct link to Teradata Integration") ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data to Teradata with parallel Ctid method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## Netezza Integration[​](#netezza-integration "Direct link to Netezza Integration") Transfer from Netezza to MSSQL using DATASLICEID for optimal parallelism: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "DATASLICEID" ` --degree 6 ``` Netezza DATASLICEID Use DATASLICEID as the distribution column to leverage Netezza's internal data distribution for optimal parallel extraction. ## Advanced SQL Server Techniques[​](#advanced-sql-server-techniques "Direct link to Advanced SQL Server Techniques") ### Using Partition Functions[​](#using-partition-functions "Direct link to Using Partition Functions") Leverage SQL Server partition functions for efficient parallel transfers: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` Partition Function Syntax Use `` `$PARTITION.FunctionName(ColumnName) `` to reference a partition function. The backtick (`` ` ``) escapes the dollar sign in PowerShell. ### Using Physloc Method[​](#using-physloc-method "Direct link to Using Physloc Method") Use physical location for parallel distribution (readonly tables only): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` Physloc Method The Physloc method should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Dynamic Degree with Negative Values[​](#dynamic-degree-with-negative-values "Direct link to Dynamic Degree with Negative Values") Use negative degree values to automatically calculate parallelism based on CPU cores: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree -4 ` --loadmode "Truncate" ``` Dynamic Degree A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores. With 8 cores, `-4` results in 32 parallel threads. ### Batch Size Optimization[​](#batch-size-optimization "Direct link to Batch Size Optimization") Adjust batch size based on connection type for optimal performance: * **MSSQL (msbulk)**: 10,000 - 100,000 rows * **PostgreSQL (pgcopy)**: 10,000 - 50,000 rows * **Oracle (orabulk)**: 100,000 - 500,000 rows * **Oracle (oradirect)**: 1,000 - 10,000 rows * **ClickHouse**: 10,000 - 1,000,000 rows * **SAP HANA**: 5,000 - 10,000 rows ### Debug Logging[​](#debug-logging "Direct link to Debug Logging") Enable detailed logging for troubleshooting: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` Debug Mode Use `--loglevel "debug"` to see detailed execution steps, connection information, and query generation details for troubleshooting. ## Using Input Files[​](#using-input-files "Direct link to Using Input Files") Process SQL queries from external files: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourcefile "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ## Column Mapping[​](#column-mapping "Direct link to Column Mapping") ### Map by Name[​](#map-by-name "Direct link to Map by Name") Automatically map columns by name (default): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # CSV Import FastTransfer leverages a powerful `read_csv` function and syntax to efficiently import CSV files into any supported database. This provides advanced features like automatic schema detection, parallel processing, and support for complex CSV formats. FastTransfer offers several advantages for CSV processing: * **Automatic schema detection** - No need to manually define column types * **High performance** - Optimized CSV parser with parallel reading * **Flexible formatting** - Handle various delimiters, quotes, and escape characters * **Multi-file support** - Process multiple CSV files with glob patterns * **In-memory processing** - No need for a persistent database file ## Basic CSV Import[​](#basic-csv-import "Direct link to Basic CSV Import") ### Single Small CSV File[​](#single-small-csv-file "Direct link to Single Small CSV File") Import a single CSV file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Using :memory: The `:memory:` server parameter tells FastTransfer to operate in-memory without creating a database file. This is perfect for one-time CSV imports. This does not mean that FastTransfer will load all the file in memory. The data are streamed and memory usage stay low. ### Medium CSV File - Single Thread[​](#medium-csv-file---single-thread "Direct link to Medium CSV File - Single Thread") Import a medium-sized CSV file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel CSV Import[​](#parallel-csv-import "Direct link to Parallel CSV Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(id/10000)::int` divides the ID column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large CSV[​](#random-method-on-large-csv "Direct link to Random Method on Large CSV") Process a large CSV file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributeKeyColumn "l_orderkey" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 13 ``` ## Multiple CSV Files[​](#multiple-csv-files "Direct link to Multiple CSV Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple CSV files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_csv()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Advanced CSV Formats[​](#advanced-csv-formats "Direct link to Advanced CSV Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") When automatic detection doesn't work, specify the CSV format explicitly: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` **Format Parameters:** * `auto_detect=false` - Disable automatic schema detection * `delim=','` - Field delimiter (comma) * `quote='"'` - Quote character for fields containing delimiters * `escape='"'` - Escape character for quotes within quoted fields * `new_line='\n'` - Line terminator * `skip=0` - Number of lines to skip at the start * `comment=''` - Character indicating comment lines to ignore * `header=true` - First line contains column names * `columns={...}` - Explicit column names and types ### CSV with Vector Data to SQL Server[​](#csv-with-vector-data-to-sql-server "Direct link to CSV with Vector Data to SQL Server") Import CSV containing vector embeddings as VARCHAR: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id,url,title,text,title_vector::varchar tv,content_vector::varchar cv,vector_id from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') limit 100" ` --targetconnectiontype "msbulk" ` --targetserver "localhost\SS2025" ` --targettrusted ` --targetdatabase "wikipedia" ` --targetschema "dbo" ` --targettable "wikipedia_articles_embeddings_as_vector" ` --mapmethod "Name" ` --loadmode "Append" ``` ## Common CSV Scenarios[​](#common-csv-scenarios "Direct link to Common CSV Scenarios") ### Tab-Delimited Files[​](#tab-delimited-files "Direct link to Tab-Delimited Files") For tab-separated values (TSV): ``` --query "SELECT * FROM read_csv('file.tsv', delim='\t')" ``` ### CSV with Different Encodings[​](#csv-with-different-encodings "Direct link to CSV with Different Encodings") ``` --query "SELECT * FROM read_csv('file.csv', encoding='UTF-8')" ``` ### CSV with Custom Quote Character[​](#csv-with-custom-quote-character "Direct link to CSV with Custom Quote Character") ``` --query "SELECT * FROM read_csv('file.csv', quote='''', escape='''')" ``` ### CSV Without Headers[​](#csv-without-headers "Direct link to CSV Without Headers") ``` --query "SELECT * FROM read_csv('file.csv', header=false, columns={'col1': 'VARCHAR', 'col2': 'INTEGER'})" ``` ### Skip Header Lines[​](#skip-header-lines "Direct link to Skip Header Lines") ``` --query "SELECT * FROM read_csv('file.csv', skip=3)" ``` --- # JSON Import FastTransfer leverages a powerful `read_json` function to efficiently import JSON files into any supported database. It provides advanced features like automatic schema detection, nested structure handling, and support for both JSON objects and JSON Lines (JSONL/NDJSON) formats. FastTransfer offers several advantages for JSON processing: * **Automatic schema detection** - Automatically infers column types from JSON structure * **High performance** - Optimized JSON parser with parallel reading * **Nested structure support** - Handle complex nested objects and arrays * **Multiple formats** - Support for JSON, JSON Lines (JSONL), and NDJSON * **Array flattening** - Use `unnest()` to flatten nested arrays * **In-memory processing** - No need for a persistent database file ## Basic JSON Import[​](#basic-json-import "Direct link to Basic JSON Import") ### Single JSON File[​](#single-json-file "Direct link to Single JSON File") Import a single JSON file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\users.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "AppDB" ` --targetschema "dbo" ` --targettable "users" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` JSON Formats FastTransfer automatically detects the JSON format: * **JSON Array**: `[{...}, {...}]` - Array of objects * **JSON Lines (JSONL)**: One JSON object per line * **NDJSON**: Newline-delimited JSON objects ### JSON Lines File - Single Thread[​](#json-lines-file---single-thread "Direct link to JSON Lines File - Single Thread") Import a JSON Lines file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\events.jsonl', format='newline_delimited')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "analytics" ` --targetschema "public" ` --targettable "events" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel JSON Import[​](#parallel-json-import "Direct link to Parallel JSON Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\orders.jsonl')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(order_id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(order_id/10000)::int` divides the order\_id column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large JSON File[​](#random-method-on-large-json-file "Direct link to Random Method on Large JSON File") Process a large JSON Lines file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\transactions.jsonl')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "Random" ` --distributeKeyColumn "transaction_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\logs.jsonl') rjson" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(event_timestamp::date)" ` --datadrivenquery "select distinct event_timestamp::date from read_json('D:\DATA\logs.jsonl') rjson" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple JSON Files[​](#multiple-json-files "Direct link to Multiple JSON Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple JSON files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_json('D:\DATA\daily\*.jsonl', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_metrics" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.jsonl')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_json()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Nested JSON Structures[​](#nested-json-structures "Direct link to Nested JSON Structures") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested JSON structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, user.name as user_name, user.email as user_email, order_date, total_amount FROM read_json('D:\DATA\orders.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within JSON objects: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(items, recursive := true) FROM read_json('D:\DATA\orders_with_items.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structure[​](#complex-nested-structure "Direct link to Complex Nested Structure") Handle deeply nested JSON with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, address.street as street, address.city as city, address.country as country, contacts[1] as primary_contact FROM read_json('D:\DATA\customers.json')" ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "crm" ` --targetuser "crmuser" ` --targetpassword "YourPassword" ` --targetschema "crm" ` --targettable "customers" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Advanced JSON Formats[​](#advanced-json-formats "Direct link to Advanced JSON Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") Specify JSON format explicitly when needed: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\data.json', format='array', maximum_depth=10)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "raw_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` **Format Parameters:** * `format='array'` - JSON array of objects * `format='newline_delimited'` - JSON Lines (JSONL/NDJSON) * `format='auto'` - Automatic detection (default) * `maximum_depth` - Maximum nesting depth to parse * `records='true'` - Parse records format * `columns={...}` - Explicit column names and types ### Compressed JSON Files[​](#compressed-json-files "Direct link to Compressed JSON Files") Import gzip-compressed JSON files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\logs.jsonl.gz', compression='gzip')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "compressed_logs" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Compression Support DuckDB automatically detects compression from file extensions: * `.gz` - Gzip compression * `.json.gz` or `.jsonl.gz` - Compressed JSON files ## JSON Type Conversions[​](#json-type-conversions "Direct link to JSON Type Conversions") ### Converting JSON Fields[​](#converting-json-fields "Direct link to Converting JSON Fields") Transform JSON data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, CAST(amount AS DECIMAL(10,2)) as amount, status FROM read_json('D:\DATA\payments.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "payments" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### JSON String to Array[​](#json-string-to-array "Direct link to JSON String to Array") Convert JSON string fields to arrays: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, json_extract(tags, '$') as tags_array FROM read_json('D:\DATA\products.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "catalog" ` --targetschema "public" ` --targettable "products" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # MySQL Examples Examples for transferring data from and to MySQL databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") MySQL transfers support: * **mysql**: Standard MySQL protocol for reading * **mysqlbulk**: MySQL bulk loader for high-performance target loading ## MySQL to MSSQL - Single-threaded Transfer[​](#mysql-to-mssql---single-threaded-transfer "Direct link to MySQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with Random Method[​](#mysql-to-mssql---parallel-transfer-with-random-method "Direct link to MySQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mysql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MySQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values. **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year(o_orderdate)" ` --degree 10 ` --loadmode Truncate ``` **Using partitioned table with year column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "o_orderdate_year" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "FREEPDB1" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## MSSQL to MySQL - Single-threaded Transfer[​](#mssql-to-mysql---single-threaded-transfer "Direct link to MSSQL to MySQL - Single-threaded Transfer") Transfer data from SQL Server to MySQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Parallel Transfer with Random Method[​](#mssql-to-mysql---parallel-transfer-with-random-method "Direct link to MSSQL to MySQL - Parallel Transfer with Random Method") Transfer with Random distribution. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Using Partition Function[​](#mssql-to-mysql---using-partition-function "Direct link to MSSQL to MySQL - Using Partition Function") Transfer with DataDriven method using SQL Server partition function. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Adding Computed Column[​](#mssql-to-mysql---adding-computed-column "Direct link to MSSQL to MySQL - Adding Computed Column") Transfer with additional computed column and DataDriven method. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select *,null as o_orderdate_year from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores to determine the actual degree of parallelism. ## Using ODBC Connection to MySQL[​](#using-odbc-connection-to-mysql "Direct link to Using ODBC Connection to MySQL") Transfer using ODBC DSN for MySQL connection. ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcename "DSNMySQLTPCH" ` --sourcedatabase "tpch" ` --query "select * from tpch.orders_part LIMIT 10" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for transferring data from and to Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle transfers support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended for source) * **orabulk**: Oracle Bulk Loader for high-performance target loading * **oradirect**: Oracle Direct Path for target loading * **odbc**: Using ODBC DSN ## Oracle to MSSQL - Single-threaded Transfer[​](#oracle-to-mssql---single-threaded-transfer "Direct link to Oracle to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "localhost:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ``` ## Oracle to MSSQL - Parallel Transfer with Rowid Method[​](#oracle-to-mssql---parallel-transfer-with-rowid-method "Direct link to Oracle to MSSQL - Parallel Transfer with Rowid Method") Oracle-specific parallel transfer using physical row identifier (ROWID). Oracle-Specific The Rowid method is unique to Oracle and uses the physical row identifier for parallel data distribution. This is very efficient for full table transfers. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "LOCALHOST:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS_FLAT" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Rowid" ` --loadmode "Truncate" ` --degree 12 ``` ## PostgreSQL to Oracle - Using orabulk (Bulk Loader)[​](#postgresql-to-oracle---using-orabulk-bulk-loader "Direct link to PostgreSQL to Oracle - Using orabulk (Bulk Loader)") Transfer data from PostgreSQL to Oracle using Oracle bulk loader. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## PostgreSQL to Oracle - Using oradirect (Direct Path)[​](#postgresql-to-oracle---using-oradirect-direct-path "Direct link to PostgreSQL to Oracle - Using oradirect (Direct Path)") Transfer data from PostgreSQL to Oracle using Oracle direct path loading. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 1000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "FREEPDB1" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## Using ODBC Connection to Oracle[​](#using-odbc-connection-to-oracle "Direct link to Using ODBC Connection to Oracle") Transfer using ODBC DSN for Oracle connection. **To MSSQL - single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNORA23CFREEPDB1" ` --sourcedatabase "FREEPDB1" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for transferring data from and to ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB databases. ## ClickHouse[​](#clickhouse "Direct link to ClickHouse") Transfer data from and to ClickHouse database. ### PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse using the bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL[​](#clickhouse-to-postgresql "Direct link to ClickHouse to PostgreSQL") Transfer data from ClickHouse to PostgreSQL with various parallelization methods. **Single-threaded:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with RangeId:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Ntile:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Ntile" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Random:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with DataDriven:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ClickHouse Connection Types * **clickhouse**: Standard connection for reading * **clickhousebulk**: High-performance bulk loader for writing ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Transfer data from and to SAP HANA database. ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA using the HANA bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Batch Size For SAP HANA, use batch sizes between 5,000 and 10,000 rows for optimal performance. ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer data from SAP HANA to PostgreSQL. ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Connection Types * **hana**: Standard connection for reading from SAP HANA * **hanabulk**: Bulk loader for writing to SAP HANA ## Netezza[​](#netezza "Direct link to Netezza") Transfer data from Netezza using the DATASLICEID for optimal parallelism. ### Netezza to MSSQL[​](#netezza-to-mssql "Direct link to Netezza to MSSQL") Transfer from Netezza to SQL Server using DataDriven method on DATASLICEID: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "DATASLICEID" ` --degree 6 ` --loadmode Truncate ``` Netezza DATASLICEID The DATASLICEID column in Netezza represents the internal data distribution. Using it as the distribution key provides optimal parallel extraction by leveraging Netezza's data placement. ## Teradata[​](#teradata "Direct link to Teradata") Transfer data from and to Teradata database. ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer data from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## DuckDB[​](#duckdb "Direct link to DuckDB") Transfer data from and to DuckDB database files or in-memory. ### MSSQL to DuckDB File[​](#mssql-to-duckdb-file "Direct link to MSSQL to DuckDB File") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributeKeyColumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### DuckDB Stream - CSV Files[​](#duckdb-stream---csv-files "Direct link to DuckDB Stream - CSV Files") Process CSV files using DuckDB's in-memory engine and load into SQL Server: **Single CSV file:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Multiple CSV files with parallel processing:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` DuckDB Connection Types * **duckdb**: Direct connection to DuckDB file * **duckdbstream**: Streaming connection for in-memory processing or file-based operations * Use `:memory:` as server for in-memory processing tip Build your command with the [Wizard](/latest/wizard.md) --- # Parquet Import FastTransfer leverages a powerful `read_parquet` function to efficiently import Parquet files into any supported database. Parquet is a columnar storage format optimized for analytics, and it provides excellent performance and feature support for reading Parquet files. FastTransfer offers several advantages for Parquet processing: * **Columnar access** - Read only the columns you need for optimal performance * **Predicate pushdown** - Filter data at the file level before loading * **Automatic schema detection** - Column types preserved from Parquet metadata * **High performance** - Optimized Parquet reader with parallel processing * **Compression support** - Handles all Parquet compression codecs (Snappy, Gzip, LZ4, Zstd) * **Nested structure support** - Handle complex nested objects, arrays, and maps * **Multi-file support** - Process multiple Parquet files with glob patterns * **Partition support** - Hive-style partitioning for efficient data access ## Basic Parquet Import[​](#basic-parquet-import "Direct link to Basic Parquet Import") ### Single Parquet File[​](#single-parquet-file "Direct link to Single Parquet File") Import a single Parquet file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\sales.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "SalesDB" ` --targetschema "dbo" ` --targettable "sales" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Column Selection For optimal performance, select only the columns you need: ``` --query "SELECT customer_id, order_date, total_amount FROM read_parquet('file.parquet')" ``` This reduces I/O and memory usage significantly. ### Multiple Parquet Files - Single Thread[​](#multiple-parquet-files---single-thread "Direct link to Multiple Parquet Files - Single Thread") Import multiple Parquet files using glob pattern: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\orders\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel Parquet Import[​](#parallel-parquet-import "Direct link to Parallel Parquet Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\transactions\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "finance" ` --targetschema "public" ` --targettable "transactions" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(transaction_id/100000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(transaction_id/100000)::int` divides the ID by 100,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large Parquet Files[​](#random-method-on-large-parquet-files "Direct link to Random Method on Large Parquet Files") Process large Parquet files with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "events" ` --parallelmethod "Random" ` --distributeKeyColumn "event_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\logs\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "CAST(event_date AS VARCHAR)" ` --datadrivenquery "select distinct CAST(event_date AS VARCHAR) from read_parquet('D:\DATA\logs\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple Parquet Files[​](#multiple-parquet-files "Direct link to Multiple Parquet Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple Parquet files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_parquet('D:\DATA\daily\*.parquet', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_reports" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_parquet()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Hive-Style Partitioning[​](#hive-style-partitioning "Direct link to Hive-Style Partitioning") ### Reading Partitioned Data[​](#reading-partitioned-data "Direct link to Reading Partitioned Data") Read Parquet files with Hive-style partitioning: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\partitioned\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "warehouse" ` --targetschema "dbo" ` --targettable "partitioned_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Hive Partitioning For data organized like `year=2024/month=01/data.parquet`, DuckDB automatically extracts partition columns: * Partition columns become regular columns in the result * Use `hive_partitioning=true` to enable this feature * Excellent for partition pruning and efficient queries ### Parallel Processing on Partitioned Data[​](#parallel-processing-on-partitioned-data "Direct link to Parallel Processing on Partitioned Data") Use partition columns for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "sales_data" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "year || '-' || month" ` --datadrivenquery "select distinct year || '-' || month as partition_key from read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` ## Nested Structures in Parquet[​](#nested-structures-in-parquet "Direct link to Nested Structures in Parquet") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested Parquet structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, customer.name as customer_name, customer.email as customer_email, order_date, total FROM read_parquet('D:\DATA\orders.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(line_items, recursive := true) FROM read_parquet('D:\DATA\orders_nested.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structures[​](#complex-nested-structures "Direct link to Complex Nested Structures") Handle complex nested Parquet data with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) FROM read_parquet('D:\DATA\chantier\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "construction" ` --targetschema "dbo" ` --targettable "site_details" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "day" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 8 ``` ## Advanced Filtering[​](#advanced-filtering "Direct link to Advanced Filtering") ### Predicate Pushdown[​](#predicate-pushdown "Direct link to Predicate Pushdown") Apply filters to reduce data read from Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet') WHERE event_date >= '2024-01-01' AND event_type = 'purchase'" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "purchases" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Append" ``` Predicate Pushdown Benefits DuckDB pushes filters down to the Parquet reader, which: * Skips entire row groups that don't match the filter * Reduces memory usage * Significantly improves performance for selective queries * Works best with filters on partition columns or columns with statistics ### Column Pruning with Selection[​](#column-pruning-with-selection "Direct link to Column Pruning with Selection") Select only needed columns for maximum performance: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT customer_id, order_date, total_amount, status FROM read_parquet('D:\DATA\orders_large.parquet') WHERE order_date >= '2024-01-01'" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "recent_orders" ` --parallelmethod "Random" ` --distributeKeyColumn "customer_id" ` --mapmethod "Name" ` --loadmode "Append" ` --degree 12 ``` ## Schema and Metadata[​](#schema-and-metadata "Direct link to Schema and Metadata") ### Union Multiple Parquet Files[​](#union-multiple-parquet-files "Direct link to Union Multiple Parquet Files") Union Parquet files with compatible schemas: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet(['D:\DATA\2023\*.parquet', 'D:\DATA\2024\*.parquet'], union_by_name=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "archive" ` --targetschema "dbo" ` --targettable "historical_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Union By Name `union_by_name=true` allows reading files with different column orders or optional columns: * Columns are matched by name instead of position * Missing columns are filled with NULL * Extra columns are ignored * Useful for schema evolution scenarios ### Type Conversion[​](#type-conversion "Direct link to Type Conversion") Convert Parquet data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, amount::DECIMAL(18,2) as amount, status FROM read_parquet('D:\DATA\transactions.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # PostgreSQL Examples Comprehensive examples for transferring data from and to PostgreSQL databases using native connectors. ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL transfers support multiple connection types: * **pgsql**: Standard PostgreSQL protocol for reading/writing * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk transfers, binary format) ## PostgreSQL to MSSQL - Single-threaded Transfer[​](#postgresql-to-mssql---single-threaded-transfer "Direct link to PostgreSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization using a SQL query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## PostgreSQL to MSSQL - Using Schema and Table[​](#postgresql-to-mssql---using-schema-and-table "Direct link to PostgreSQL to MSSQL - Using Schema and Table") Transfer specifying schema and table names instead of a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#postgresql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on a calculated column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "FLOOR(o_orderkey/10000000)" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Parallel Transfer with Ctid Method[​](#postgresql-to-mssql---parallel-transfer-with-ctid-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Ctid Method") PostgreSQL-specific parallel transfer using physical row identifier (ctid). PostgreSQL-Specific The Ctid method is unique to PostgreSQL and uses the physical row identifier (ctid) for parallel data distribution. This is very efficient for full table transfers. **For orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` **For lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with Random Method[​](#postgresql-to-mssql---parallel-transfer-with-random-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Dynamic Degree[​](#postgresql-to-mssql---dynamic-degree "Direct link to PostgreSQL to MSSQL - Dynamic Degree") Use negative degree values to automatically determine parallelism. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores to determine the actual degree of parallelism. ## PostgreSQL to MSSQL - Using Input File[​](#postgresql-to-mssql---using-input-file "Direct link to PostgreSQL to MSSQL - Using Input File") Transfer using a SQL query from an external file. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --inputfile "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ## PostgreSQL to PostgreSQL - Using Query[​](#postgresql-to-postgresql---using-query "Direct link to PostgreSQL to PostgreSQL - Using Query") Transfer between PostgreSQL databases using a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --query "select * from ""tpch_10"".orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## PostgreSQL to PostgreSQL - Using Ctid Method[​](#postgresql-to-postgresql---using-ctid-method "Direct link to PostgreSQL to PostgreSQL - Using Ctid Method") Transfer between PostgreSQL databases with parallel Ctid method. * Using pgcopy (Binary COPY) * Using pgsql (INSERT UNNEST) ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgsql" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to PostgreSQL - Using pgcopy Binary[​](#postgresql-to-postgresql---using-pgcopy-binary "Direct link to PostgreSQL to PostgreSQL - Using pgcopy Binary") High-performance transfer using PostgreSQL binary COPY protocol. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Parallel with Ctid - orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` **Parallel with Ctid - lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` ## PostgreSQL to Oracle[​](#postgresql-to-oracle "Direct link to PostgreSQL to Oracle") Transfer data from PostgreSQL to Oracle databases. * Using orabulk (Bulk Load) * Using oradirect (Direct Path) **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 1000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ## PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL (Hyper File) to MSSQL[​](#postgresql-hyper-file-to-mssql "Direct link to PostgreSQL (Hyper File) to MSSQL") Transfer data from a Tableau Hyper file (using pgsql driver) to MSSQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:8095" ` --sourcedatabase "D:\OpenData\TPCH\data\hyper\tpch_sf10.hyper" ` --sourceuser "tableau_internal_user" ` --sourcepassword "" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from ""ORDERS""" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for transferring data from and to SQL Server databases. ## MSSQL to MSSQL - Single-threaded Transfer[​](#mssql-to-mssql---single-threaded-transfer "Direct link to MSSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization for smaller datasets. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with Random Method[​](#mssql-to-mssql---parallel-transfer-with-random-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. * Windows Authentication * SQL Authentication ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with RangeId Method[​](#mssql-to-mssql---parallel-transfer-with-rangeid-method "Direct link to MSSQL to MSSQL - Parallel Transfer with RangeId Method") Transfer using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Using query with filter:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "RangeId" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with Ntile Method[​](#mssql-to-mssql---parallel-transfer-with-ntile-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Ntile Method") Transfer using Ntile distribution for evenly distributed chunks. **Full table transfer:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Ntile" ` --distributeKeyColumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Filtered transfer with date column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "Ntile" ` --distributeKeyColumn "o_orderdate" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mssql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MSSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values of a column or partition function. **Using partition function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "YEAR(o_orderdate)" ` --degree 7 ` --loadmode Append ``` ## MSSQL to MSSQL - Using Physloc Method[​](#mssql-to-mssql---using-physloc-method "Direct link to MSSQL to MSSQL - Using Physloc Method") Transfer using physical location (should only be used on readonly/snapshot databases). warning The Physloc method should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ` --loadmode Truncate ``` ## MSSQL to PostgreSQL[​](#mssql-to-postgresql "Direct link to MSSQL to PostgreSQL") Transfer data from SQL Server to PostgreSQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 10 ` --loadmode "Truncate" ``` ## MSSQL to MySQL[​](#mssql-to-mysql "Direct link to MSSQL to MySQL") Transfer data from SQL Server to MySQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` **With DataDriven method on partitioned table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributeKeyColumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer data from SQL Server to DuckDB. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## Using ODBC Connection[​](#using-odbc-connection "Direct link to Using ODBC Connection") Transfer using ODBC DSN for connection. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMsSQLTPCH" ` --sourcedatabase "tpch_test" ` --query "select * from dbo.orders LIMIT 1000" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## Dynamic Degree[​](#dynamic-degree "Direct link to Dynamic Degree") Use negative degree values to automatically determine parallelism based on CPU cores. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributeKeyColumn "o_orderkey" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) multiplies the absolute value by the number of CPU cores to determine the actual degree of parallelism. ## Load Modes[​](#load-modes "Direct link to Load Modes") FastTransfer supports different load modes for the target table: * `Truncate`: Truncates the target table before loading * `Append`: Appends data to existing table (default) Example with Append mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "None" ` --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastTransfer\_Settings.json for Windows[​](#fasttransfer_settingsjson-for-windows "Direct link to FastTransfer_Settings.json for Windows") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastTransferLogs": "Server=localhost;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs\\FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastTransferLogs", "sinkOptionsSection": { "TableName": "EventLogs", "SchemaName": "dbo", "DatabaseName": "FastTransferLogs", "AutoCreateSqlDatabase": true, "AutoCreateSqlTable": true, "BatchPostingLimit": 50, "BatchPeriod": "0.00:00:05", "UseSqlBulkCopy": false }, "restrictedToMinimumLevel": "Information", "columnOptionsSection": { "disableTriggers": true, "clusteredColumnstoreIndex": false, "removeStandardColumns": [ "Id", "MessageTemplate", "Properties", "Exception" ], "additionalColumns": [ { "ColumnName": "ErrorSummary", "PropertyName": "rootcauseMessage", "DataType": "nvarchar", "DataLength": 4000 }, { "ColumnName": "EventType", "PropertyName": "EventType", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "FullTargetName", "PropertyName": "fulltargetname", "DataType": "nvarchar", "DataLength": 400 }, { "ColumnName": "Status", "PropertyName": "finalStatus", "DataType": "int" }, { "ColumnName": "Rows", "PropertyName": "loadedRows", "DataType": "bigint" }, { "ColumnName": "Columns", "PropertyName": "loadedCols", "DataType": "int" }, { "ColumnName": "ElaspedMs", "PropertyName": "loadElapsedMs", "DataType": "bigint" }, { "ColumnName": "MachineName", "PropertyName": "MachineName", "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "Application", "PropertyName": "Application", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "ProcessId", "PropertyName": "ProcessId", "DataType": "int" }, { "ColumnName": "ThreadId", "PropertyName": "ThreadId", "DataType": "int" }, { "ColumnName": "RunId", "PropertyName": "runid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "TraceId", "PropertyName": "traceid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "SpanId", "PropertyName": "SpanId", "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "Release", "PropertyName": "release", "DataType": "varchar", "DataLength": 32 }, { "ColumnName": "EnvironmentUserName", "PropertyName": "EnvironmentUserName", "DataType": "varchar", "DataLength": 200 }, { "ColumnName": "InputParameters", "PropertyName": "InputParameters", "DataType": "varchar", "DataLength": 8000 } ], "level": { "columnName": "Severity", "storeAsEnum": false, "DataType": "varchar", "DataLength": 50 }, "timeStamp": { "columnName": "EventTimestamp", "nonClusteredIndex": true, "convertToUtc": false }, "logEvent": { "excludeAdditionalProperties": false, "excludeStandardColumns": true }, "message": { "columnName": "EventMsg", "DataType": "varchar", "DataLength": 8000 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Linux\_Console\_Files.json[​](#fasttransfer_settings_linux_console_filesjson "Direct link to FastTransfer_Settings_Linux_Console_Files.json") For Linux with Console + Daily rolling Files: ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs/FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Windows.json[​](#fasttransfer_settings_map_for_windowsjson "Direct link to FastTransfer_Settings_Map_for_Windows.json") For Console and dynamically named log file targets (Windows): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "C:\\temp\\Logs\\{logdate}\\{sourcedatabase}\\{sourcetable}\\FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fasttransfer_settings_map_for_linux_and_containerjson "Direct link to FastTransfer_Settings_Map_for_Linux_and_Container.json") For Console and dynamically named log file targets (Linux/Container): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fasttransfer_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastTransfer_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastTransferLogs": "Host=localhost;Port=15432;Database=fastlogs;Username=FastUser;Password=FastPassword" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.PostgreSQL.Alternative", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "PostgreSQL", "Args": { "connectionString": "PG_FastTransferLogs", "tableName": "event_logs", "schemaName": "public", "needAutoCreateTable": true, "needAutoCreateSchema": false, "restrictedToMinimumLevel": "Information", "useCopy": false, "loggerColumnOptions": { "event_timestamp": { "Name": "Timestamp", "Format": "", "WriteMethod": "Timestamp", "NpgsqlDbType": "TimestampTz", "Order": 1 }, "event_msg": { "Name": "RenderedMessage", "Format": "", "WriteMethod": "RenderedMessage", "NpgsqlDbType": "Text", "Order": 2 }, "Level": { "Name": "LevelAsText", "Order": 3 }, "LevelInt": { "Name": "Level", "Order": 4 } }, "loggerPropertyColumnOptions": { "error_summary": { "Name": "rootcauseMessage", "Format": "{0}", "WriteMethod": "ToString", "NpgsqlDbType": "Text", "Order": 5 }, "source_database": { "Name": "SourceDatabase", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 6 }, "source_schema": { "Name": "SourceSchema", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 7 }, "source_table": { "Name": "SourceTable", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 8 }, "output_directory": { "Name": "OutputDirectory", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 9 }, "full_target_name": { "Name": "fulltargetname", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 10 }, "application": { "Name": "Application", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 11 }, "status": { "Name": "finalStatus", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 12 }, "rows": { "Name": "loadedRows", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Numeric", "Order": 13 }, "columns": { "Name": "loadedCols", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 14 }, "elapsed_ms": { "Name": "loadElapsedMs", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Numeric", "Order": 15 }, "machine_name": { "Name": "MachineName", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 16 }, "process_id": { "Name": "ProcessId", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 17 }, "thread_id": { "Name": "ThreadId", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 18 }, "run_id": { "Name": "runid", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 19 }, "trace_id": { "Name": "traceid", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 20 }, "span_id": { "Name": "SpanId", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 21 }, "release": { "Name": "release", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 22 }, "environment_user_name": { "Name": "EnvironmentUserName", "Format": "", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 23 }, "input_parameters": { "Name": "InputParameters", "WriteMethod": "Raw", "NpgsqlDbType": "Json", "Order": 24 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` --- # Log Database FastTransfer supports logging to a **Microsoft SQL Server** or **PostgreSQL** database. To enable database logging, configure the log database connection string in a settings file: * The default settings file is `FastTransfer_settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Complete configuration examples for both MSSQL and PostgreSQL are available in the [Configuration Examples](/0.16/documentation/logging/examples.md#fasttransfer_settingsjson-for-windows) page. Information **In case the database is not reachable, FastTransfer will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastTransfer_settings.json` file to something else (like `FastTransfer_settings.json.save`) and FastTransfer will use the console log only. --- # Log Files Names Mapping using variables You can use variables to define the log file path and files names in the ***FastTransfer\_settings.json*** In the **WriteTo** array you can use a **Map** like that : ``` { "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ] } ``` The available variables to customize log path or log filename are : | Variable Name | Description | | ------------------ | ------------------------------------------- | | `{logdate}` | Current date in yyyy-MM-dd format | | `{logtimestamp}` | Timestamp of the log entry | | `{sourcedatabase}` | Name of the source database | | `{sourceschema}` | Name of the source schema | | `{sourcetable}` | Name of the source table | | `{filename}` | Name of the file being processed | | `{runid}` | Run identifier provided in the command line | | `{traceid}` | Unique identifier generate at runtime | You can find complete configuration examples for both Windows and Linux: * **Windows**: [FastTransfer\_Settings\_Map\_for\_Windows.json](/0.16/documentation/logging/examples.md#fasttransfer_settings_map_for_windowsjson) * **Linux/Container**: [FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json](/0.16/documentation/logging/examples.md#fasttransfer_settings_map_for_linux_and_containerjson) --- # Log Levels FastTransfer uses Serilog for logging and supports multiple log levels to control the verbosity of output. You can set the loglevel using the `--loglevel` parameter followed by a value in the list of available log levels. ## Available Log Levels[​](#available-log-levels "Direct link to Available Log Levels") | Level | Description | Use Case | | --------------- | ------------------------------------ | ----------------------------------- | | **Debug** | Detailed diagnostic information | Development and troubleshooting | | **Information** | General informational messages | Normal operation (default) | | **Warning** | Potentially harmful situations | Issues that don't prevent operation | | **Error** | Error events that allow continuation | Operation failures | | **Fatal** | Severe errors causing termination | Fatal application errors | ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastTransfer_settings.json` file by modifying the `MinimumLevel` property: ``` { "Serilog": { "MinimumLevel": "Debug", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "path": "Logs\\FastTransfer_.json", "rollingInterval": "Day" } } ] } } ``` --- # Logging Overview ## Parameter Logs targets using FastTransfer\_settings.json[​](#parameter-logs-targets-using-fasttransfer_settingsjson "Direct link to Parameter Logs targets using FastTransfer_settings.json") FastTransfer can log information in 3 modes : * **[Console](/0.16/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/0.16/documentation/logging/log-database.md)** * **[File (or Map)](/0.16/documentation/logging/log-files-names-mapping-using-variables.md)** Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastTransfer_settings.json` file. By default if no custom path is provided, FastTransfer looks for the settings file in : * the current directory (the working directory) * the same directory where the FastTransfer executable is located (the executable directory). If this file is not present, FastTransfer will use the console log only. You can specify a custom path to the settings file using the `-f` or `--settingsfile` parameter. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --method "None" ` --settingsfile "D:\logs\config\FastTransfer_settings.json" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --query "select * from orders" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --method "None" \ --settingsfile "/etc/fasttransfer/FastTransfer_settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/0.16/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` Expand-Archive -Path .\FastTransfer.zip -DestinationPath .\FastTransfer ``` You can verify the installation by checking the version: ``` .\FastTransfer.exe --version ``` To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` unzip FastTransfer.zip -d FastTransfer ``` On **Linux**, you need to give execution rights to the FastTransfer binary: ``` chmod +x FastTransfer ```
You can verify the installation by checking the version: ``` ./FastTransfer --version ``` FastTransfer is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)**. Pull the latest version: ``` docker pull arpeio/fasttransfer ``` Or pull a specific version: ``` docker pull arpeio/fasttransfer:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fasttransfer:latest --version ```
**You are now ready to run FastTransfer.** License Information After the trial period you will need a valid license. By default, FastTransfer will try to find a `FastTransfer.lic` file in the same directory as the executable. You can also provide another path, a URL, or even the license content using the `--license` parameter. ## Embedded Drivers[​](#embedded-drivers "Direct link to Embedded Drivers") The following database drivers are embedded in FastTransfer: | Database | Embedded Drivers | | ------------- | ---------------- | | Clickhouse | | | DuckDB | | | MS SQL Server | | | MySQL | | | Netezza | | | Oracle | | | PostgreSQL | | | SAP HANA | | | Teradata | | Warning If you need another database not in the list, you can use ODBC or OLEDB but you will need to install your ODBC or OLEDB drivers of your favorite database. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastTransfer can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: **Image:** `arpeio/fasttransfer:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastTransfer with Airflow, you need to install the Docker provider package: ``` pip install apache-airflow-providers-docker ``` Or add it to your Airflow requirements: ``` apache-airflow-providers-docker ``` ## Configure Airflow Connections[​](#configure-airflow-connections "Direct link to Configure Airflow Connections") Airflow connections allow you to securely store and manage credentials for external systems. FastTransfer integration requires connections for your source and target databases. ### A) Source Database Connection (MSSQL Example)[​](#a-source-database-connection-mssql-example "Direct link to A) Source Database Connection (MSSQL Example)") Create an MSSQL connection for your source database: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **ODBC** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `mssql_tpch10` (or your preferred name) * **Connection Type:** `ODBC` (select this from the dropdown) * **Host:** `192.168.65.254` (your database host) * **Port:** `11433` (your database port) * **Login:** Your database username (e.g., `FastLogin`) * **Password:** Your database password * **Extra:** `{"database":"tpch10"}` tip For ODBC connections, the database name should be specified in the Extra JSON field using `{"database":"your_database_name"}`. ### B) Target Database Connection (PostgreSQL Example)[​](#b-target-database-connection-postgresql-example "Direct link to B) Target Database Connection (PostgreSQL Example)") Create a PostgreSQL connection for your target database: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Postgres** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `pg_target` (or your preferred name) * **Connection Type:** `Postgres` (select this from the dropdown) * **Host:** `192.168.65.254` (your database host) * **Port:** `25433` (your database port) * **Schema:** `postgres` *(this is the database name)* * **Login:** `postgres` (your database username) * **Password:** Your database password tip For Postgres connections, the database name is specified in the **Schema** field. ## Integration with DockerOperator[​](#integration-with-dockeroperator "Direct link to Integration with DockerOperator") The [`DockerOperator`](https://airflow.apache.org/docs/apache-airflow-providers-docker/stable/operators.html) from the Docker provider allows you to execute FastTransfer commands in a Docker container directly from your Airflow DAGs. ### Complete DAG Example[​](#complete-dag-example "Direct link to Complete DAG Example") Create a DAG file (e.g., `fasttransfer_orders_mssql_to_pg.py`) in your Airflow DAGs folder: ``` from datetime import datetime from airflow import DAG from airflow.sdk.bases.hook import BaseHook from airflow.providers.docker.operators.docker import DockerOperator def _conn_parts(conn_id: str): """ Extract connection details from Airflow connection. Works with: - ODBC connections (for MSSQL): database in Extra JSON {"database":"name"} - Postgres connections: database in Schema field Returns: tuple: (host, port, user, password, database) """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # Database in Extra {"database": "..."} (for ODBC MSSQL) or in Schema (for Postgres) db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': database not found. Add it to Extra JSON " f'{{"database":"..."}} (for ODBC) or Schema field (for Postgres).' ) return host, port, user, pwd, db with DAG( dag_id="fasttransfer_orders_mssql_to_pg", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fasttransfer", "mssql", "postgres", "docker"], ) as dag: # Extract connection details mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _conn_parts("mssql_tpch10") pg_host, pg_port, pg_user, pg_pwd, pg_db = _conn_parts("pg_target") # FastTransfer Docker task transfer_task = DockerOperator( task_id="transfer_orders", image="arpeio/fasttransfer:latest", docker_url="tcp://host.docker.internal:2375", api_version="auto", auto_remove="success", mount_tmp_dir=False, # Avoids the remote-engine tmp mount warning do_xcom_push=False, command=[ "--sourceconnectiontype", "mssql", "--sourceserver", f"{mssql_host},{mssql_port}", "--sourcedatabase", mssql_db, "--sourceuser", mssql_user, "--sourcepassword", mssql_pwd, "--sourceschema", "dbo", "--sourcetable", "orders", "--targetconnectiontype", "pgcopy", "--targetserver", f"{pg_host}:{pg_port}", "--targetdatabase", pg_db, "--targetuser", pg_user, "--targetpassword", pg_pwd, "--targetschema", "public", "--targettable", "orders", "--loadmode", "Truncate", "--mapmethod", "Name", "--method", "Ntile", "--degree", "12", "--distributekeycolumn", "o_orderkey", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastTransfer Docker image * `docker_url`: Docker daemon endpoint * `command`: List of FastTransfer CLI arguments * `auto_remove`: Automatically remove the container after successful execution * `mount_tmp_dir`: Set to `False` to avoid warnings with remote Docker daemons ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes a utility function to streamline connection management: #### `_conn_parts(conn_id)`[​](#_conn_partsconn_id "Direct link to _conn_partsconn_id") Extracts connection details from an Airflow connection. This function: * Retrieves host, port, username, and password from the connection * Extracts the database name from either the Extra JSON field (for ODBC connections) or the Schema field (for Postgres connections) * Returns all components needed to build the FastTransfer connection parameters * Validates that all required fields are present This approach ensures that credentials are managed centrally in Airflow and never hardcoded in DAG files. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Airflow and can be viewed in the Airflow UI: 1. Navigate to **DAGs** in the Airflow UI 2. Click on your DAG (e.g., `fasttransfer_orders_mssql_to_pg`) 3. Click on the task execution (green/red square in the Grid view) 4. Click the **Logs** tab ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") The logs provide detailed information about: * FastTransfer version and configuration * Source and target connection details (with masked passwords) * Data transfer progress * Performance metrics (rows/second, total time) * Exit status ``` [2026-03-02 15:51:45] INFO - Running docker container: arpeio/fasttransfer:latest [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.288 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8415ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.330 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000000 : 2999997 rows x 9 columns in 8458ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.349 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8476ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.442 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8569ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1702771 rows/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15324949 cells/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8809 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9135 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load [2026-03-02 15:51:54] INFO - Task instance in success state [2026-03-02 15:51:54] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 15:51:54] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastTransfer, a high-performance data transfer utility designed for data integration and automation workflows. ## Image Overview[​](#image-overview "Direct link to Image Overview") * **Base image**: `debian:trixie-slim` * **Entrypoint**: `/usr/local/bin/FastTransfer` * **Repository**: [arpe-io/FastTransfer-Image](https://github.com/arpe-io/FastTransfer-Image) * **DockerHub**: [arpeio/fasttransfer](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general) * **Updates**: Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * Optional: `FastTransfer_Settings.json` for custom logging configuration ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags**: Aligned with FastTransfer releases (e.g., `v0.15.0`) * **`latest` tag**: Always points to the most recent FastTransfer version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastTransfer versions are released * **Security updates**: The latest version of each minor branch is automatically rebuilt weekly (every Monday) with the latest base image and security patches ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fasttransfer:latest # Specific version docker pull arpeio/fasttransfer:v0.15.0 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fasttransfer:latest -? # Check version docker run --rm arpeio/fasttransfer:latest --version ``` ## License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.14.0, pass the license content directly via `--license "…"`: ``` export licenseContent=$(cat ./FastTransfer.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fasttransfer:latest \ --license "$licenseContent" \ [other parameters...] ``` Best Practice Prefer `--env-file`, Docker/Compose/Kubernetes secrets, or managed identities for cloud credentials. Avoid leaving the license content in shell history. ## Examples[​](#examples "Direct link to Examples") ### 1. SQL Server → SQL Server (Parallel DB-to-DB Transfer)[​](#1-sql-server--sql-server-parallel-db-to-db-transfer "Direct link to 1. SQL Server → SQL Server (Parallel DB-to-DB Transfer)") ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ arpeio/fasttransfer:latest \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "dest_db" \ --method "Ntile" \ --distributekeycolumn "id" \ --loadmode "Truncate" \ --paralleldegree 8 \ --license "$licenseContent" ``` ### 2. Import CSV Files to SQL Server in Parallel[​](#2-import-csv-files-to-sql-server-in-parallel "Direct link to 2. Import CSV Files to SQL Server in Parallel") ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ -v /local/data:/data \ arpeio/fasttransfer:latest \ --sourceconnectiontype "duckdbstream" \ --sourceserver ":memory:" \ --query "SELECT * FROM read_csv('/data/lineitem*.CSV')" \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targettrusted \ --targetdatabase "tpch_test" \ --targetschema "dbo" \ --targettable "lineitem" \ --parallelmethod "Random" \ --distributeKeyColumn "l_orderkey" \ --mapmethod "Name" \ --loadmode "Truncate" \ --degree 16 \ --license "$licenseContent" ``` ## Configuration[​](#configuration "Direct link to Configuration") ### Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` | Volume | Purpose | Access Mode | Notes | | --------- | ---------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | User-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory for file-based operations | Read-many/Write-many | Stores imported or exported data files | | `/work` | Temporary working directory (container WORKDIR) | Read-many/Write-many | Used internally for temporary processing | | `/logs` | Log output directory (per-run or aggregated logs) | Read-many/Write-many | Stores runtime and execution logs | ### Configuring FastTransfer Logging[​](#configuring-fasttransfer-logging "Direct link to Configuring FastTransfer Logging") Available from version 0.14.0 FastTransfer supports custom logging configuration through an external Serilog settings file in JSON format. #### Example: Logging to Console, Airflow, and Dynamic Log Files[​](#example-logging-to-console-airflow-and-dynamic-log-files "Direct link to Example: Logging to Console, Airflow, and Dynamic Log Files") ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context", "Serilog.Formatting.Compact" ], "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console", "applyThemeToRedirectedOutput": false } }, { "Name": "File", "Args": { "path": "/airflow/xcom/return.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" } }, { "Name": "Map", "Args": { "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/log-{filename}-{LogTimestamp}-{TraceId}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8" } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` note * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastTransfer automatically creates it. * The file `/airflow/xcom/return.json` is designed to provide run summaries compatible with Airflow's XCom mechanism. #### Available Tokens for Path or Filename Formatting[​](#available-tokens-for-path-or-filename-formatting "Direct link to Available Tokens for Path or Filename Formatting") | Token | Description | | ------------------ | -------------------------------------------- | | `{logdate}` | Current date in yyyy-MM-dd format | | `{logtimestamp}` | Full timestamp of the log entry | | `{sourcedatabase}` | Name of the source database | | `{sourceschema}` | Name of the source schema | | `{sourcetable}` | Name of the source table | | `{filename}` | Name of the file being processed | | `{runid}` | Run identifier provided in the command line | | `{traceid}` | Unique trace identifier generated at runtime | #### Mounting a Custom Settings File[​](#mounting-a-custom-settings-file "Direct link to Mounting a Custom Settings File") ``` # First, copy your config file to a volume location cp ~/FastTransfer_Settings.json /volumes/fasttransfer-config/ # Then run FastTransfer with mounted volumes docker run --rm \ -v fasttransfer-config:/config \ -v fasttransfer-logs:/logs \ arpeio/fasttransfer:latest \ --settingsfile "/config/FastTransfer_Settings.json" \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "pgcopy" \ --targetserver "host.docker.internal:5432" \ --targetuser "PgUser" \ --targetpassword "PgPass" \ --targetdatabase "pg_db" \ --targetschema "dbo" \ --targettable "orders" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --license "$licenseContent" ``` --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastTransfer data migration workflows. FastTransfer can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: **Image:** `arpeio/fasttransfer:latest`
**Repository:** ## Integration Methods[​](#integration-methods "Direct link to Integration Methods") Kestra offers two primary methods to orchestrate FastTransfer execution: ### Method 1: Using Docker Run Plugin (Recommended)[​](#method-1-using-docker-run-plugin-recommended "Direct link to Method 1: Using Docker Run Plugin (Recommended)") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastTransfer commands in a Docker container. ``` id: fasttransfer_docker_kestra_v2 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - FastLogin - --sourcepassword - FastPassword - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - postgres - --targetpassword - postgres - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --method - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastTransfer Docker image * `commands`: Array of FastTransfer CLI arguments ### Method 2: Using Shell Commands with Docker Task Runner[​](#method-2-using-shell-commands-with-docker-task-runner "Direct link to Method 2: Using Shell Commands with Docker Task Runner") Alternatively, you can use the [`io.kestra.plugin.scripts.shell.Commands`](https://kestra.io/plugins/plugin-script-shell/io.kestra.plugin.scripts.shell.commands) plugin with a Docker task runner: ``` id: fasttransfer_docker_kestra namespace: arpe.io tasks: - id: shell type: io.kestra.plugin.scripts.shell.Commands containerImage: arpeio/fasttransfer:latest taskRunner: type: io.kestra.plugin.scripts.runner.docker.Docker host: "tcp://host.docker.internal:2375" commands: - >- /usr/local/bin/FastTransfer --sourceconnectiontype mssql --sourceserver "192.168.65.254,11433" --sourcedatabase "tpch10" --sourceuser "FastLogin" --sourcepassword "FastPassword" --sourceschema "dbo" --sourcetable "orders" --targetconnectiontype pgcopy --targetserver "192.168.65.254:25433" --targetdatabase "postgres" --targetuser "postgres" --targetpassword "postgres" --targetschema "public" --targettable "orders" --loadmode Truncate --mapmethod Name --method Ntile --degree 12 --distributekeycolumn "o_orderkey" --nobanner ``` This method allows you to execute shell commands within the FastTransfer Docker container, providing more flexibility for complex workflows. ## Securing Sensitive Data with Kestra Secrets[​](#securing-sensitive-data-with-kestra-secrets "Direct link to Securing Sensitive Data with Kestra Secrets") To protect sensitive information like passwords and connection strings, Kestra provides a built-in [secrets management](https://kestra.io/docs/concepts/secret) feature. You can store credentials securely and reference them in your flows using the `{{ secret('SECRET_NAME') }}` syntax. ### Creating Secrets in Kestra[​](#creating-secrets-in-kestra "Direct link to Creating Secrets in Kestra") To create secrets in Kestra: 1. Navigate to the Kestra UI 2. Go to **Tenant** → **Secrets** 3. Add your secrets with appropriate keys: * `FASTTRANSFER_MSSQL_USER` * `FASTTRANSFER_MSSQL_PASSWORD` * `FASTTRANSFER_PG_USER` * `FASTTRANSFER_PG_PASSWORD` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fasttransfer_docker_kestra_v3 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - "{{ secret('FASTTRANSFER_MSSQL_USER') }}" - --sourcepassword - "{{ secret('FASTTRANSFER_MSSQL_PASSWORD') }}" - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - "{{ secret('FASTTRANSFER_PG_USER') }}" - --targetpassword - "{{ secret('FASTTRANSFER_PG_PASSWORD') }}" - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --method - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` This approach ensures that sensitive credentials are never exposed in your flow definitions and can be managed centrally. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Kestra and can be viewed directly in the Kestra UI. To access the logs: 1. Navigate to the Kestra UI 2. Go to **Executions** 3. Select your flow execution 4. Click on the **Logs** tab The logs provide detailed information about the transfer process, including configuration parameters, connection details, data transfer progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02 15:51:45.3752026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False 2026-03-02 15:51:45.3792026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit 2026-03-02 15:51:45.6342026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) 2026-03-02 15:51:45.8702026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms 2026-03-02 15:51:45.8722026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8842026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8912026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9002026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9112026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:54.2332026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms 2026-03-02 15:51:54.2382026-03-02T15:51:54.238 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8365ms 2026-03-02 15:51:54.2412026-03-02T15:51:54.241 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8368ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000004 : 3000001 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1766084 rows/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15894756 cells/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8494 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9142 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load 2026-03-02 15:51:54.448Command succeed with exit code 0 2026-03-02 15:51:54.450Container deleted: ca0de79e3eb4ede961668cb5080e4c20f858960c118d10731b8e0ade3ad87685 2026-03-02 15:51:54.455Volume deleted: a6b822d7677064a91d2dd555c360dc61ec49e3954149eacd5c22549c2a300850 ``` --- # PostgreSQL The **pg\_fasttransfer** extension allows you to run the FastTransfer tool directly from an SQL function, enabling fast data transfer between databases directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fasttransfer](https://github.com/arpe-io/pg_fasttransfer) * **License**: MIT * **Latest version**: v0.16.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fasttransfer Demo](/assets/images/pg_fasttransfer-830298c99dd0228e80b5337126bb0c7c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastTransfer commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get transfer statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastTransfer parameters ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * FastTransfer binaries installed on the system Important The PostgreSQL server process usually runs under the `postgres` user account. You must ensure that this user has the appropriate permissions to execute the `FastTransfer` binary and read the license file. ## Compatibility[​](#compatibility "Direct link to Compatibility") * Windows * Linux | PostgreSQL Version | Supported | | ------------------ | --------- | | PostgreSQL 18 | | | PostgreSQL 17 | | | PostgreSQL 16 | | | PostgreSQL 15 | | **Debian/Ubuntu 22.04 LTS** | PostgreSQL Version | Supported | | ------------------ | --------- | | PostgreSQL 18 | | | PostgreSQL 17 | | | PostgreSQL 16 | | | PostgreSQL 15 | | info Other distributions or PostgreSQL versions may work but have not been officially tested. ## Installation[​](#installation "Direct link to Installation") Download the Extension Download the appropriate release for your PostgreSQL version and operating system from the [pg\_fasttransfer releases page](https://github.com/arpe-io/pg_fasttransfer/releases). * Linux * Windows **Automated Installation** The easiest way to install the extension on Linux is by using the `install-linux.sh` script included in the archive. 1. Extract the contents of the archive into a folder. This folder should contain: * `pg_fasttransfer.so` * `pg_fasttransfer.control` * `pg_fasttransfer--1.0.sql` * `install-linux.sh` 2. Make the script executable: ``` chmod +x install-linux.sh ``` 3. Run the script with administrator privileges: ``` sudo ./install-linux.sh ``` The script will automatically detect your PostgreSQL installation and copy the files to the correct locations. **Manual Installation** If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service: ``` sudo systemctl stop postgresql ``` 2. Locate your PostgreSQL installation directory, typically: `/usr/lib/postgresql/` 3. Copy the files into the appropriate directories: ``` sudo cp pg_fasttransfer.so /usr/lib/postgresql//lib/ sudo cp pg_fasttransfer.control pg_fasttransfer--1.0.sql /usr/share/postgresql//extension/ ``` 4. Restart your PostgreSQL service: ``` sudo systemctl start postgresql ``` **Permissions Setup** Ensure the `postgres` user has proper permissions: ``` # Grant execute permission on the FastTransfer binary sudo chmod +x /path/to/FastTransfer sudo chown postgres:postgres /path/to/FastTransfer sudo chmod 750 /path/to/FastTransfer # Grant read permission on the license file sudo chown postgres:postgres /path/to/license.lic sudo chmod 640 /path/to/license.lic ``` **Automated Installation** 1. Extract the contents of the ZIP file into a folder. This folder should contain: * `pg_fasttransfer.dll` * `pg_fasttransfer.control` * `pg_fasttransfer--1.0.sql` * `install-win.bat` 2. Right-click on the `install-win.bat` file and select "Run as administrator" 3. The script will automatically detect your PostgreSQL installation and copy the files to the correct locations **Manual Installation** If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service 2. Locate your PostgreSQL installation folder, typically: ``` C:\Program Files\PostgreSQL\ ``` 3. Copy the `pg_fasttransfer.dll` file into the `lib` folder 4. Copy the `pg_fasttransfer.control` and `pg_fasttransfer--1.0.sql` files into the `share\extension` folder 5. Restart your PostgreSQL service **Permissions Setup** Make sure that the PostgreSQL service account (by default `NT AUTHORITY\NetworkService` or `postgres`) has: * Execute permission on the `FastTransfer.exe` binary * Read permission on the `.lic` file ## SQL Setup[​](#sql-setup "Direct link to SQL Setup") After the files are in place, you need to set up the extension in your database. ### Drop existing extension (if any)[​](#drop-existing-extension-if-any "Direct link to Drop existing extension (if any)") ``` DROP EXTENSION IF EXISTS pg_fasttransfer CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fasttransfer CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fasttransfer\_encrypt[​](#pg_fasttransfer_encrypt "Direct link to pg_fasttransfer_encrypt") This function encrypts a given text string using `pgp_sym_encrypt` and encodes the result in base64. It is useful for storing sensitive information, such as passwords, in a secure manner within your SQL scripts. The `xp_RunFastTransfer_secure` function will automatically decrypt any values passed to its `--sourcepassword` and `--targetpassword` arguments. **Syntax:** ``` pg_fasttransfer_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fasttransfer_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastTransfer\_secure[​](#xp_runfasttransfer_secure "Direct link to xp_RunFastTransfer_secure") This is the main function to execute the FastTransfer tool. It takes various parameters to configure the data transfer operation. Password arguments (`sourcepassword`, `targetpassword`) will be automatically decrypted. **Syntax:** ``` xp_RunFastTransfer_secure( sourceconnectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, sourcedsn text DEFAULT NULL, sourceprovider text DEFAULT NULL, sourceserver text DEFAULT NULL, sourceuser text DEFAULT NULL, sourcepassword text DEFAULT NULL, sourcetrusted boolean DEFAULT FALSE, sourcedatabase text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, query text DEFAULT NULL, fileinput text DEFAULT NULL, targetconnectiontype text DEFAULT NULL, targetconnectstring text DEFAULT NULL, targetserver text DEFAULT NULL, targetuser text DEFAULT NULL, targetpassword text DEFAULT NULL, targettrusted boolean DEFAULT FALSE, targetdatabase text DEFAULT NULL, targetschema text DEFAULT NULL, targettable text DEFAULT NULL, degree integer DEFAULT NULL, method text DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, loadmode text DEFAULT NULL, batchsize integer DEFAULT NULL, useworktables boolean DEFAULT FALSE, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, mapmethod text DEFAULT NULL, license text DEFAULT NULL, loglevel text DEFAULT NULL, nobanner boolean DEFAULT NULL, fasttransfer_path text DEFAULT NULL, debug boolean DEFAULT FALSE ) RETURNS TABLE ( exit_code integer, output text, error_message text, total_rows bigint, total_columns integer, transfer_time_ms bigint, total_time_ms bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to SQL Server[​](#linux-example---postgresql-to-sql-server "Direct link to Linux Example - PostgreSQL to SQL Server") Transfer data from PostgreSQL to SQL Server using the extension: ``` SELECT * FROM xp_RunFastTransfer_secure( targetconnectiontype := 'msbulk', sourceconnectiontype := 'pgsql', sourceserver := 'localhost:5432', sourceuser := 'postgres', sourcepassword := pg_fasttransfer_encrypt('MyActualPassword'), sourcedatabase := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', targetserver := 'localhost,1433', targetuser := 'migadmin', targetpassword := pg_fasttransfer_encrypt('AnotherSecurePassword'), targetdatabase := 'target_db', targetschema := 'tpch_1', targettable := 'orders', loadmode := 'Truncate', license := '/tmp/FastTransfer_linux-x64_v0.15.0/FastTransfer.lic', loglevel := 'information', nobanner := false, fasttransfer_path := '/tmp/FastTransfer_linux-x64_v0.15.0', debug := true ); ``` ### Windows Example - SQL Server to PostgreSQL[​](#windows-example---sql-server-to-postgresql "Direct link to Windows Example - SQL Server to PostgreSQL") Transfer data from SQL Server to PostgreSQL: ``` SELECT * FROM xp_RunFastTransfer_secure( sourceconnectiontype := 'mssql', sourceserver := 'localhost', sourcepassword := pg_fasttransfer_encrypt('MyWindowsPassword'), sourceuser := 'FastLogin', sourcedatabase := 'tpch10', sourceschema := 'dbo', sourcetable := 'orders', targetconnectiontype := 'pgcopy', targetserver := 'localhost:15433', targetuser := 'postgres', targetpassword := pg_fasttransfer_encrypt('MyPostgresPassword'), targetdatabase := 'postgres', targetschema := 'public', targettable := 'orders', method := 'Ntile', degree := 12, distributekeycolumn := 'o_orderkey', loadmode := 'Truncate', batchsize := 1048576, mapmethod := 'Position', loglevel := 'information', nobanner := true, fasttransfer_path := 'D:\sources\FastTransfer', debug := true ); ``` ## Function Return Structure[​](#function-return-structure "Direct link to Function Return Structure") The function returns a table with the following columns: | Column | Type | Description | | ------------------ | ------- | -------------------------------------------------------- | | `exit_code` | integer | The exit code of the FastTransfer process | | `output` | text | The full log output from FastTransfer (if debug is TRUE) | | `error_message` | text | Only the lines containing ERROR from the output | | `total_rows` | bigint | The total number of rows transferred | | `total_columns` | integer | The total number of columns transferred | | `transfer_time_ms` | bigint | Transfer time in milliseconds | | `total_time_ms` | bigint | Total execution time in milliseconds | ## Debug Parameter[​](#debug-parameter "Direct link to Debug Parameter") The `debug` parameter is a boolean flag that controls whether the full FastTransfer output is returned in the `output` column: * When `debug := true`, `output` contains the entire log from FastTransfer * When `debug := false` (default), `output` is an empty string, but `error_message` will still contain any error lines ## Resources[​](#resources "Direct link to Resources") * [pg\_fasttransfer GitHub Repository](https://github.com/arpe-io/pg_fasttransfer) * [FastTransfer Documentation](https://fasttransfer.arpe.io/) * [Get a Trial License](https://arpe.io/get-trial?product=FastTransfer) * [Report Issues](https://github.com/arpe-io/pg_fasttransfer/issues) --- # SQL Server The **FastWrappers-TSQL** project wraps FastTransfer (and FastBCP) in a CLR Assembly, allowing you to call them directly from T-SQL using extended stored procedures. This enables seamless data transfer operations without leaving your SQL Server environment. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [aetperf/FastWrappers-TSQL](https://github.com/aetperf/FastWrappers-TSQL) * **Latest version**: v0.7.0 * **Platforms**: Windows and Linux * **Compatibility**: SQL Server 2016+ info This wrapper includes both **FastTransfer** (for database-to-database transfers and file imports) and **FastBCP** (for database-to-file exports). This documentation focuses on the FastTransfer functionality. ## Features[​](#features "Direct link to Features") * **Native SQL Server Integration**: Execute FastTransfer commands directly from T-SQL * **Secure Password Management**: Built-in AES-256 encryption for sensitive credentials * **CLR Assembly Integration**: Runs as extended stored procedures * **Detailed Result Return**: Get transfer statistics and performance metrics as SQL results * **Flexible Configuration**: Support for all FastTransfer parameters and connection types * **Role-Based Security**: Predefined database roles for access control ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * SQL Server 2016 or later * CLR integration enabled * Valid FastTransfer binaries * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * Administrator privileges for initial setup Important The SQL Server service account must have read/execute permissions on the FastTransfer directory and binaries. ## Installation[​](#installation "Direct link to Installation") Download the latest release from the [Releases page](https://github.com/aetperf/FastWrappers-TSQL/releases). Choose the installation method based on your SQL Server version: ### Recommended Installation Methods[​](#recommended-installation-methods "Direct link to Recommended Installation Methods") 1. **[FastWrappers-TSQL.bak](https://github.com/aetperf/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.bak)** - SQL Server Backup file (**recommended for SQL Server 2019+** - restore using SSMS)
Requires manual CLR activation and trusted assembly configuration after restore 2. **[FastWrappers-TSQL.sql](https://github.com/aetpefl/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.sql)** - Pure SQL Script (**recommended for SQL Server 2016+** - all-in-one installation)
Complete installation in a single script - execute using sqlcmd or SSMS ### Post-Installation Configuration[​](#post-installation-configuration "Direct link to Post-Installation Configuration") info This section only applies to the **.bak** installation method. The **.sql** script includes all necessary configuration steps automatically. After restoring the database, you **must** configure CLR integration. Two options are available: * Trusted Assembly (Recommended) * TRUSTWORTHY ON (Dev/Test) This approach is **more secure** as it keeps TRUSTWORTHY OFF and doesn't require changing the database owner: ``` -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Extract the assembly hash and add it to trusted assemblies DECLARE @hash VARBINARY(64); SELECT @hash = HASHBYTES('SHA2_512', content) FROM sys.assembly_files WHERE assembly_id = ( SELECT assembly_id FROM sys.assemblies WHERE name = 'FastWrappers_TSQL' ); EXEC sys.sp_add_trusted_assembly @hash = @hash, @description = N'FastWrappers_TSQL Assembly v0.7.0'; GO ``` **Advantages:** * TRUSTWORTHY remains OFF (more secure) * No need to change database owner * Only this specific assembly is trusted tip The assembly hash changes with each version. When upgrading, remove the old hash first: ``` EXEC sys.sp_drop_trusted_assembly @hash = ; ``` This approach is simpler but **less secure**. Use only for development/testing environments: ``` -- Enable TRUSTWORTHY for signed UNSAFE assemblies ALTER DATABASE [FastWrappers-TSQL] SET TRUSTWORTHY ON; GO -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Set database owner to 'sa' (required for signed UNSAFE assemblies) EXEC sp_changedbowner 'sa'; GO ``` Critical The `sp_changedbowner 'sa'` command is **required**. Without it, you will encounter error 0x80FC80F1 when executing stored procedures. ## Security Roles[​](#security-roles "Direct link to Security Roles") ### FastTransfer\_Executor[​](#fasttransfer_executor "Direct link to FastTransfer_Executor") The FastWrappers-TSQL database includes a predefined database role that grants `EXECUTE` permission on the **xp\_RunFastTransfer\_secure** stored procedure. ``` -- Add a user to the role ALTER ROLE [FastTransfer_Executor] ADD MEMBER [YourUserName]; GO ``` tip Users also need access to the **dbo.EncryptString** function to generate encrypted passwords: ``` GRANT EXECUTE ON dbo.EncryptString TO [YourUserName]; GO ``` ## Available Functions[​](#available-functions "Direct link to Available Functions") ### dbo.EncryptString - Password Encryption[​](#dboencryptstring---password-encryption "Direct link to dbo.EncryptString - Password Encryption") Encrypts passwords using AES-256 encryption for secure storage and transmission. ``` SELECT dbo.EncryptString('YourPassword') ``` **Returns:** Base64-encoded encrypted string **Example:** ``` SELECT dbo.EncryptString('MySecretPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== ``` ### dbo.xp\_RunFastTransfer\_secure - Data Transfer[​](#dboxp_runfasttransfer_secure---data-transfer "Direct link to dbo.xp_RunFastTransfer_secure - Data Transfer") Wraps the FastTransfer CLI to transfer data between databases with streaming and parallel processing. **Example:** ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'D:\FastTransfer\', @sourceConnectionType = 'mssql', @sourceServer = 'localhost,11433', @sourceUser = 'FastLogin', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = 'tpch10', @sourceSchema = 'dbo', @sourceTable = 'orders', @targetConnectionType = 'pgcopy', @targetServer = 'localhost:25433', @targetUser = 'postgres', @targetPasswordSecure = 'RAAFe/XJ7O0P1I5T0rJhjQ==', @targetDatabase = 'postgres', @targetSchema = 'public', @targetTable = 'orders', @loadmode = 'Truncate', @method = 'Ntile', @distributeKeyColumn = 'o_orderkey', @degree = 12, @mapmethod = 'Name', @debug = 1, @noBanner = 0, @useWorkTables = 0, @loglevel = 'debug' ``` ## Output and Logging[​](#output-and-logging "Direct link to Output and Logging") ### Transfer Metrics[​](#transfer-metrics "Direct link to Transfer Metrics") The **xp\_RunFastTransfer\_secure** stored procedure returns a structured result set: | Column | Type | Description | | -------------- | ------------- | ----------------------------------------- | | targetdatabase | nvarchar(128) | Target database name | | targetSchema | nvarchar(128) | Target schema name | | targetTable | nvarchar(128) | Target table name | | TotalRows | bigint | Number of rows transferred | | TotalColumns | int | Number of columns transferred | | TotalCells | bigint | Total cells transferred (rows × columns) | | TotalTimeMs | bigint | Total execution time in milliseconds | | Status | int | Exit code (0 = success, non-zero = error) | | StdErr | nvarchar(max) | Error message if Status ≠ 0 | **Example output:** ``` targetdatabase targetSchema targetTable TotalRows TotalColumns TotalCells TotalTimeMs Status postgres public orders 15000000 9 135000000 27502 0 ``` ### Debug Mode[​](#debug-mode "Direct link to Debug Mode") Set `@debug = 1` to output additional information: * Complete command line being executed (passwords masked) * Full console output from FastTransfer * Real-time progress updates * Performance metrics ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest', -- ... other parameters ... @debug = 1 -- Enable verbose logging ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### SQL Server to SQL Server (12 threads)[​](#sql-server-to-sql-server-12-threads "Direct link to SQL Server to SQL Server (12 threads)") Transfer a table between two SQL Server instances using parallel processing: ``` -- First, encrypt your password SELECT dbo.EncryptString('YourPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== -- Then execute the transfer EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = N'mssql', @sourceServer = N'localhost', @sourceUser = N'FastUser', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = N'tpch_test', @sourceSchema = N'dbo', @sourceTable = N'orders', @targetConnectionType = N'msbulk', @targetServer = N'localhost\SS2025', @targetUser = N'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = N'tpch_test', @targetSchema = N'dbo', @targetTable = N'orders_copy', @loadMode = N'Truncate', @batchSize = 130000, @method = N'RangeId', @distributeKeyColumn = N'o_orderkey', @degree = 12, @mapmethod = 'Name', @runId = N'SQL_to_SQL_Parallel_Transfer'; ``` ### Oracle to SQL Server (12 threads)[​](#oracle-to-sql-server-12-threads "Direct link to Oracle to SQL Server (12 threads)") Transfer data from Oracle to SQL Server with parallel RangeId method: ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'oraodp', @sourceServer = 'oracle-server:1521/ORCL', @sourceUser = 'oracle_user', @sourcePasswordSecure = '', @sourceSchema = 'SALES', @sourceTable = 'ORDERS', @targetConnectionType = 'msbulk', @targetServer = 'localhost\SS2025', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'tpch_test', @targetSchema = 'dbo', @targetTable = 'orders_from_oracle', @loadMode = 'Truncate', @batchSize = 130000, @method = 'RangeId', @distributeKeyColumn = 'order_id', @degree = 12, @mapmethod = 'Name', @runId = 'Oracle_to_SQL_Transfer'; ``` ### PostgreSQL to SQL Server (8 threads)[​](#postgresql-to-sql-server-8-threads "Direct link to PostgreSQL to SQL Server (8 threads)") Use PostgreSQL's native Ctid method for optimal performance: ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'pgcopy', @sourceServer = 'postgres-server:5432', @sourceUser = 'postgres', @sourcePasswordSecure = '', @sourceDatabase = 'sales_db', @sourceSchema = 'public', @sourceTable = 'customers', @targetConnectionType = 'msbulk', @targetServer = 'localhost', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'crm', @targetSchema = 'dbo', @targetTable = 'customers', @loadMode = 'Append', @batchSize = 100000, @method = 'Ctid', @degree = 8, @mapmethod = 'Name', @runId = 'PG_to_SQL_Ctid'; ``` ## Additional Resources[​](#additional-resources "Direct link to Additional Resources") * [FastTransfer Documentation](/0.16/.md) * [GitHub Repository](https://github.com/aetperf/FastWrappers-TSQL) ## Support[​](#support "Direct link to Support") For issues or questions: * FastWrappers-TSQL: [GitHub Issues](https://github.com/aetperf/FastWrappers-TSQL/issues) * FastTransfer: [Contact ARPE Support](https://arpe.io/contact) --- # Release Notes 0.16 ## New Parameters[​](#new-parameters "Direct link to New Parameters") * Added the `--version` to display the version ## Other[​](#other "Direct link to Other") * Improve logging * Bump dependencies # Fixes * Sap HANA fix drivers inclusion for Linux See [Advanced Parameters](/0.16/documentation/cli/advanced_parameters.md) for complete details. ### Notes[​](#notes "Direct link to Notes") * v0.16.2 is the final release supporting .NET 7. ⚠️ Future versions will drop .NET 7 support, which may reduce operating system compatibility. --- # Sitemap ## [Installation](/0.16/installation.md)[​](#installation "Direct link to installation") ## [Wizard GUI](/0.16/wizard.md)[​](#wizard-gui "Direct link to wizard-gui") ## Documentation[​](#documentation "Direct link to Documentation") * [Getting Started](/0.16/.md) * CLI * [Authentication](/0.16/documentation/cli/authentication.md) * [Source Connection Parameters](/0.16/documentation/cli/source_connection_parameters.md) * [Target Connection Parameters](/0.16/documentation/cli/target_connection_parameters.md) * [Transfer Parameters](/0.16/documentation/cli/transfer_parameters.md) * [Parallel Parameters](/0.16/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/0.16/documentation/cli/advanced_parameters.md) * [License](/0.16/documentation/cli/license.md) * Logging * [Overview](/0.16/documentation/logging/Overview.md) * [Logs Level](/0.16/documentation/logging/logs-level.md) * [Log Database](/0.16/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/0.16/documentation/logging/log-files-names-mapping-using-variables.md) * [Examples](/0.16/documentation/logging/examples.md) * Examples * [SQL Server Examples](/0.16/documentation/examples/sql-server.md) * [PostgreSQL Examples](/0.16/documentation/examples/postgresql.md) * [MySQL Examples](/0.16/documentation/examples/mysql.md) * [Oracle Examples](/0.16/documentation/examples/oracle.md) * [Other Databases](/0.16/documentation/examples/other-databases.md) * [CSV Import](/0.16/documentation/examples/csv-import.md) * [JSON Import](/0.16/documentation/examples/json-import.md) * [Parquet Import](/0.16/documentation/examples/parquet-import.md) * [Advanced Scenarios](/0.16/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/0.16/documentation/compatibility/sources_platforms.md) * [Operating Systems](/0.16/documentation/compatibility/operating_systems.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/0.16/integration/docker-integration.md) * [Kestra](/0.16/integration/kestra-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 0.16](/0.16/release-notes/release-notes-0.16.md) ## [Sitemap](/0.16/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastTransfer Command Wizard Transfer (DB to DB) Import Files (Files to DB) Expand All\[ ] ### Operating SystemWindows Windows ![Linux](/img/tux.svg)Linux ### Source Connection Parameterspgsql Connection Type ? : clickhouse duckdb duckdbstream hana msoledbsql mssql mysql nzcopy nzoledb nzsql odbc oledb oraodp pgcopy pgsql teradata | Server ? : | localhost | | ------------------ | ---------------------------------- | | Connect String ? : | Server=localhost;Database=mydb;... | | DSN ? : | | | Provider ? : | | | Database ? : | mydatabase | | Trusted ? : | \[ ] | | User ? : | username | | Password ? : | •••••••• | ### Target Connection Parametersmsbulk ### Transfer Parameters ### Parallel ParametersNone ### Advanced Parameters ### License ### Generated Command multi-line\[x] sharecopy ``` .\FastTransfer.exe ` --sourceconnectiontype pgsql ` --targetconnectiontype msbulk ` --loadmode Truncate ` --mapmethod Name ` --license "C:\MyFreeTrialLicense.lic" ``` --- # Getting Started with FastTransfer FastTransfer is a high-performance **high-performance data ingestion and transfer engine** that enables fast, parallel data movement between different database systems or from files to databases systems. If you haven't installed FastTransfer yet, please check the [Installation](/0.17/installation.md) section first. You can also build your first FastTransfer command using our interactive [Command Builder Wizard](/0.17/wizard.md). [FastTransfer Mini-Demo](https://www.youtube.com/embed/CL3031FWwqo) --- # Advanced Parameters This section covers advanced configuration options for FastTransfer, including tracing, logging, and display settings. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter allows you to specify a custom identifier for tracing the transfer process. This is useful for correlating logs and tracking operations across systems. **Example:** ``` ./FastTransfer \ ... --runid "transfer-2024-01-15-001" \ ... ``` **Syntax:** * Long form: `--runid "RunSpanID"` **Default Value:** A random GUID is generated if not specified. Tracing Use a meaningful Run ID to make it easier to search logs and trace specific transfer operations, especially in production environments or when running multiple transfers. ## Settings File[​](#settings-file "Direct link to Settings File") Specify a custom settings file for logging and other configuration options. This allows you to use different configuration profiles for different environments or scenarios. **Example:** ``` ./FastTransfer \ ... --settingsfile "config/production-settings.json" \ ... ``` **Syntax:** * Long form: `--settingsfile "file_path"` **Default Value:** `FastTransfer_Settings.json` in the same folder as the executable. Configuration File The settings file contains logging configuration, connection settings, and other advanced options. You can maintain separate configuration files for development, staging, and production environments. ## Log Level[​](#log-level "Direct link to Log Level") Override the log level defined in the settings file. This is useful for temporary debugging or troubleshooting without modifying the settings file. **Example:** ``` ./FastTransfer \ ... --loglevel debug \ ... ``` **Syntax:** * Long form: `--loglevel "level"` **Allowed Values:** | Log Level | Description | | ------------- | --------------------------------------------------- | | `verbose` | Most detailed tracing information | | `debug` | Detailed debugging information | | `information` | General informational messages (default) | | `warning` | Warning messages for potentially harmful situations | | `error` | Error messages for failures | **Default Value:** `information` Debugging Use `--loglevel debug` when troubleshooting issues to get the most detailed logging output. Remember to switch back to `information` or `warning` for production use to avoid excessive log volume. ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastTransfer banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastTransfer \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastTransfer from scripts or CI/CD pipelines where you want to minimize console output or parse the results programmatically. ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using advanced parameters: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "sales" ` --query "select * from sales where order_date >= '2024-01-01'" ` --runid "daily-sales-sync-2024-01-15" ` --settingsfile "config/production-settings.json" ` --loglevel information ` --nobanner ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "sales" \ --query "select * from sales where order_date >= '2024-01-01'" \ --runid "daily-sales-sync-2024-01-15" \ --settingsfile "config/production-settings.json" \ --loglevel information \ --nobanner ``` This example: * Uses a custom Run ID for tracing * Loads configuration from a custom settings file * Sets the log level to information * Disables the banner for cleaner output --- # Authentication FastTransfer supports two types of authentication methods depending on your database platform. Authentication can be configured separately for source and target databases. ## Source Authentication[​](#source-authentication "Direct link to Source Authentication") ### Trusted Connection (Source)[​](#trusted-connection-source "Direct link to Trusted Connection (Source)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --sourcetrusted ` ... ``` **Syntax:** * Long form: `--sourcetrusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### SQL Login with Username and Password (Source)[​](#sql-login-with-username-and-password-source "Direct link to SQL Login with Username and Password (Source)") Standard database authentication with explicit credentials for the source database. ``` ./FastTransfer ` ... --sourceuser "myuser" ` --sourcepassword "mypassword" ` ... ``` **Syntax:** * Username: `-u "username"` or `--sourceuser "username"` * Password: `-x "password"` or `--sourcepassword "password"` ## Target Authentication[​](#target-authentication "Direct link to Target Authentication") ### Trusted Connection (Target)[​](#trusted-connection-target "Direct link to Trusted Connection (Target)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --targettrusted ` ... ``` **Syntax:** * Long form: `--targettrusted` ### SQL Login with Username and Password (Target)[​](#sql-login-with-username-and-password-target "Direct link to SQL Login with Username and Password (Target)") Standard database authentication with explicit credentials for the target database. ``` ./FastTransfer ` ... --targetuser "myuser" ` --targetpassword "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--targetuser "username"` * Password: `-X "password"` or `--targetpassword "password"` ## Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use connection string parameters where you pass the user and password directly in the connection string: * `--sourceconnectstring` for source database connection - see [Source Connection Parameters](/0.17/documentation/cli/source_connection_parameters.md) * `--targetconnectstring` for target database connection - see [Target Connection Parameters](/0.17/documentation/cli/target_connection_parameters.md) Password Security in Logs All passwords passed either through the `--sourcepassword`, `--targetpassword` parameters or within the `--sourceconnectstring`, `--targetconnectstring` parameters are automatically hidden in all logs (Console, Files, and Database). This ensures your credentials remain secure in logging outputs. Tips For Login/Password you can also use the environment variables like FastTransfer\_SOURCEUSER and FastTransfer\_SOURCEPASSWORD for example or store the password in an encrypted file. Up to you to decrypt the file and its content before using it in a shell variable that will be used with FastTransfer. --- # License Configure how FastTransfer retrieves and uses its license file. ## License Parameter[​](#license-parameter "Direct link to License Parameter") Use the `--license` parameter to specify the location or content of your FastTransfer license. By default, FastTransfer will try to use the license file named `FastTransfer.lic` in the same directory as the FastTransfer executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastTransfer supports multiple ways to provide a license: #### 1. File Path[​](#1-file-path "Direct link to 1. File Path") Specify a custom license file path: * Windows * Linux ``` .\FastTransfer.exe ` ... --license "C:\licenses\FastTransfer.lic" ` ... ``` ``` ./FastTransfer \ ... --license "/path/to/licenses/FastTransfer.lic" \ ... ``` #### 2. HTTP(S) Endpoint[​](#2-https-endpoint "Direct link to 2. HTTP(S) Endpoint") Retrieve the license from a remote URL where you put the license content and distribute it using https : * Windows * Linux ``` .\FastTransfer.exe ` ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" ` ... ``` ``` ./FastTransfer \ ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" \ ... ``` #### 3. License Content (Inline)[​](#3-license-content-inline "Direct link to 3. License Content (Inline)") Provide the license content directly. Using a variable or environment variable is recommended. Usefull for Docker or Lambda deployment: * Windows * Linux ``` # Using environment variable $env:FastTransfer_LICENSE = "LICENSE_CONTENT_HERE" .\FastTransfer.exe ` ... --license $env:FastTransfer_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastTransfer.lic" -Raw .\FastTransfer.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FastTransfer_LICENSE="LICENSE_CONTENT_HERE" ./FastTransfer \ ... --license "$FastTransfer_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastTransfer.lic) ./FastTransfer \ ... --license "$license" \ ... ``` **Syntax:** * Long form only: `--license ""` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using a license from a remote server with a database transfer: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" ` --parallelmethod DataDriven ` --distributekeycolumn "EXTRACT(MONTH FROM order_date)" ` --degree 4 ` --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` ``` ./FastTransfer \ --sourceconnectiontype "pgsql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourceuser "FastUser" \ --sourcepassword "FastPassword" \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" \ --parallelmethod DataDriven \ --distributekeycolumn "EXTRACT(MONTH FROM order_date)" \ --degree 4 \ --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` This example: * Retrieves the license from a remote UNC path * Connects to a PostgreSQL source database * Transfers data to a SQL Server target using bulk insert * Uses DataDriven parallel method with 4 threads, one chunk per month of `order_date` * Filters orders from 2024 onwards --- # Parallel Parameters FastTransfer can parallelize data export to significantly improve performance. This section covers the parameters that control parallel execution. ## Parallel Method[​](#parallel-method "Direct link to Parallel Method") Use the `--parallelmethod` parameter to specify how data will be split across parallel threads. * Windows * Linux ``` .\FastTransfer.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastTransfer \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Long form: `--parallelmethod ` ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallelism. **DataDriven** - Use the distinct values of the `--distributekeycolumn` (which can be a column or an expression), or the values returned by `--datadrivenquery`, to distribute data. `--distributekeycolumn` is required. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ctid** - Recommended and exclusive for PostgreSQL and PostgreSQL compatible databases. Use the Ctid pseudo column (for pgsql and pgcopy source only). Requires `--sourceschema` and `--sourcetable`, even if a `--query` is used. note Ctid parallel method is for PostgreSQL databases only. **Physloc** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the Physloc range. note Physloc parallel method is for SQL Server databases only. **Random** - Use a modulo on the `--distributekeycolumn` to distribute data. **Rowid** - For Oracle sources only: use rowid slices. Requires `--sourceschema` and `--sourcetable`, even if a `--query` is used. note Rowid parallel method is for Oracle databases only. **RangeId** - Use a numeric range to distribute data (useful with an identity column or sequence without gaps. The column must be numerical). **Ntile** - Use the ntile function to distribute data evenly. Data can be numerical, date, datetime or string. **NZDataSlice** - Netezza source only. Use the data slices to distribute data retrieval. Requires `--sourceschema` and `--sourcetable`, even if a `--query` is used. note NZDataSlice parallel method is for Netezza databases only. ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | ------------- | -------- | ------------------------ | ------------------------- | | `None` | | | Any | | `DataDriven` | | | Any | | `Ctid` | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` | | | SQL Server (mssql) | | `Random` | | | Any | | `Rowid` | | | Oracle (oraodp) | | `RangeId` | | | Any | | `Ntile` | | | Any | | `NZDataSlice` | | | Netezza | **Default Value:** `None` When to Use Parallelism If you want to use a parallel export/import use other than None. Try to use Parallelism only if you have a large amount of data to transfer (more than 1M cells). ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastTransfer will use SQL queries that run in parallel against the source. Each query will have a WHERE clause that retrieves a part of the total data. Information This parameter is mandatory when using methods that require a distributed column: Random, DataDriven, RangeId, or Ntile. FastTransfer stops with an error if it is missing. * Windows * Linux ``` # Using a column name .\FastTransfer.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastTransfer.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastTransfer \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastTransfer \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `--degree` parameter to control how many parallel threads will be used for the export. ### DOP Values[​](#dop-values "Direct link to DOP Values") **Positive value (e.g., 4)** - Uses exactly that number of parallel threads. If greater than twice the number of CPU cores/threads, it will be downscaled to the number of available cores. **0** - Automatically aligns with the number of cores (or threads if Hyper-Threading is enabled) on the machine. **Negative value (e.g., -2)** - Computed as `number of cores / abs(dop)`. For example, if you have 16 cores and set DOP to -2, the actual DOP will be 8. * Windows * Linux ``` # Use 8 parallel threads .\FastTransfer.exe ` ... --degree 8 ` ... # Auto-detect based on CPU cores .\FastTransfer.exe ` ... --degree 0 ` ... # Use half of available cores .\FastTransfer.exe ` ... --degree -2 ` ... ``` ``` # Use 8 parallel threads ./FastTransfer \ ... --degree 8 \ ... # Auto-detect based on CPU cores ./FastTransfer \ ... --degree 0 \ ... # Use half of available cores ./FastTransfer \ ... --degree -2 \ ... ``` **Syntax:** * Long form: `--degree ` **Default:** `-4` ## Data Driven Query[​](#data-driven-query "Direct link to Data Driven Query") Use the `--datadrivenquery` parameter when using the DataDriven method to provide a query that returns the list of values that will be used to split the data. This allows you to filter the values that will be exported and used to split the data. * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Long form: `--datadrivenquery ""` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "select * from orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_ordermonth" ` --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" ` --degree 10 ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "select * from orders" \ --parallelmethod "DataDriven" \ --distributekeycolumn "o_ordermonth" \ --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" \ --degree 10 ``` This example: * Connects to a SQL Server source database on localhost * Transfers data to a SQL Server target database using BulkCopy * Uses trusted authentication for both source and target * Executes a custom query on the orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date (o\_ordermonth column) * Uses a custom query to generate month values (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even though there are 12 months to export) --- # Source Connection Parameters FastTransfer requires connection information to access your source database where data will be extracted. This page covers all source connection-related parameters. ## Source Connection Type[​](#source-connection-type "Direct link to Source Connection Type") Specify the type of source database connection driver to use. This parameter determines how FastTransfer connects to your source database. ``` ./FastTransfer \ ... --sourceconnectiontype mssql \ ... ``` **Syntax:** * Long form: `--sourceconnectiontype "connection_type"` **Available Source Connection Types:** | Connection Type | Description | | --------------- | ---------------------------------------------- | | `clickhouse` | ClickHouse | | `duckdb` | DuckDB | | `duckdbstream` | DuckDB using streaming (more memory efficient) | | `hana` | SAP HANA (.net driver) | | `msoledbsql` | SQL Server OleDB | | `mssql` | SQL Server Native Client (.Net) | | `mysql` | MySQL | | `nzoledb` | Netezza OleDB | | `nzsql` | Netezza Native (.net driver) | | `odbc` | ODBC datasource (DSN must be configured) | | `oledb` | Generic OleDB datasource | | `oraodp` | Oracle ODP.Net | | `pgcopy` | PostgreSQL Copy | | `pgsql` | PostgreSQL Native (.Net) | | `teradata` | Teradata (.Net) | ## Source DSN (Data Source Name)[​](#source-dsn-data-source-name "Direct link to Source DSN (Data Source Name)") If you have chosen an ODBC connection type for the source, you must define the DSN with the `--sourcedsn` parameter, or alternatively define a connection string using `--sourceconnectstring`. ``` ./FastTransfer \ ... --sourceconnectiontype odbc \ --sourcedsn "MySourceODBCDataSource" \ ... ``` **Syntax:** * Long form: `--sourcedsn "DSN_name"` ## Source Provider[​](#source-provider "Direct link to Source Provider") If you have chosen an OLEDB connection type for the source, you must define the OLEDB provider with the `--sourceprovider` parameter. ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider MSOLEDBSQL \ ... ``` ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider NZOLEDB \ ... ``` **Syntax:** * Long form: `--sourceprovider "provider_name"` ## Source Server[​](#source-server "Direct link to Source Server") Except if you have defined a source connection string, you must define a source server (or could also be a TNS entry for Oracle). **Syntax:** * Long form: `--sourceserver "server"` ### Source Server Format Examples[​](#source-server-format-examples "Direct link to Source Server Format Examples") The source server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:2433" \ ... ``` or ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:1521/myinstance" \ ... ``` **For Oracle - TNS entry:** ``` ./FastTransfer \ ... --sourceserver "MYTNS" \ ... ``` ## Source Connection String[​](#source-connection-string "Direct link to Source Connection String") Tips You can use a connection string to define the connection to the source database. This connection string will override any other connection parameters and can be used if the other authentication modes are not enough for your case. You can use the connection string for any source connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastTransfer \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Long form: `--sourceconnectstring "connection_string"` Password Security in Logs All passwords within the `--sourceconnectstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Source Database[​](#source-database "Direct link to Source Database") Define the source database name. **Example:** ``` ./FastTransfer \ ... --sourcedatabase "AdventureWorks" \ ... ``` **Syntax:** * Long form: `--sourcedatabase "database_name"` --- # Target Connection Parameters FastTransfer requires connection information to access your target database where data will be transferred. This page covers all target connection-related parameters. ## Target Connection Type[​](#target-connection-type "Direct link to Target Connection Type") Specify the type of target database connection driver to use. This parameter determines how FastTransfer connects to your target database. ``` ./FastTransfer \ ... --targetconnectiontype msbulk \ ... ``` **Syntax:** * Long form: `--targetconnectiontype "connection_type"` **Available Target Connection Types:** | Connection Type | Description | | ---------------- | ------------------------------------------------------------------------------------------------------------- | | `clickhousebulk` | ClickHouse BulkCopy | | `duckdb` | DuckDB | | `hanabulk` | SAP HANA | | `msbulk` | SQL Server BulkCopy | | `mysqlbulk` | MySQL BulkCopy | | `nzbulk` | Netezza BulkCopy | | `orabulk` | Oracle BulkCopy | | `oradirect` | Oracle Direct | | `pgcopy` | PostgreSQL using COPY (binary format when the source connection type is also `pgcopy`, text format otherwise) | | `pgsql` | PostgreSQL Native (.Net) | | `teradata` | Teradata (.Net) | ## Target Server[​](#target-server "Direct link to Target Server") Except if you have defined a target connection string, you must define a target server (or could also be a TNS entry for Oracle). **Syntax:** * Long form: `--targetserver "server"` ### Target Server Format Examples[​](#target-server-format-examples "Direct link to Target Server Format Examples") The target server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:3306" \ ... ``` or ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com,1433" \ ... ``` **IP address or DNS name with named instance (SQL Server):** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com\TARGETINSTANCE" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:1521/TARGETPDB" \ ... ``` **For DuckDB - Local file path:** ``` ./FastTransfer \ ... --targetconnectiontype duckdb \ --targetserver "/path/to/target.duckdb" \ ... ``` ## Target Connection String[​](#target-connection-string "Direct link to Target Connection String") Advanced Connection Options You can use a connection string to define the connection to the target database. This connection string will override any other target connection parameters and can be used if the standard authentication modes are not sufficient for your use case. You can use the target connection string for any connection type. The connection string must be enclosed in double quotes. **Example for SQL Server:** ``` ./FastTransfer \ ... --targetconnectstring "Server=mytargetserver;Database=mytargetdb;User ID=TargetUser;Password=TargetPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Example for PostgreSQL:** ``` ./FastTransfer \ ... --targetconnectstring "Host=mytargetserver;Database=mytargetdb;Username=TargetUser;Password=TargetPassword;SSL Mode=Require" ... ``` **Syntax:** * Long form: `--targetconnectstring "connection_string"` Password Security in Logs All passwords within the `--targetconnectstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Target Database[​](#target-database "Direct link to Target Database") Define the target database name. **Example:** ``` ./FastTransfer \ ... --targetdatabase "AdventureWorks" \ ... ``` **Syntax:** * Long form: `--targetdatabase "database_name"` Matching Schema Requirements The target table must already exist with a compatible schema. FastTransfer does not automatically create target tables. Ensure column data types are compatible between source and target databases. --- # 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[​](#source-configuration "Direct link to Source Configuration") These parameters define what data to extract from the source database. ### Source Schema[​](#source-schema "Direct link to Source Schema") Define the source schema name. This parameter is required when using the PostgreSQL Ctid method. **Example:** ``` ./FastTransfer \ ... --sourceschema "public" \ ... ``` **Syntax:** * Long form: `--sourceschema "schema_name"` Required for PostgreSQL Ctid Method This parameter must be set if the PostgreSQL Ctid method is used. ### Source Table[​](#source-table "Direct link to Source Table") Define the source table name. This parameter is required when using the PostgreSQL Ctid method. **Example:** ``` ./FastTransfer \ ... --sourcetable "customers" \ ... ``` **Syntax:** * Long form: `--sourcetable "table_name"` Required for PostgreSQL Ctid Method This parameter must be set if the PostgreSQL Ctid method is used. ### Query[​](#query "Direct link to Query") Plain text SQL query. Will be used instead of source table if provided. **Example:** ``` ./FastTransfer \ ... --query "SELECT * FROM customers WHERE country = 'USA'" \ ... ``` **Syntax:** * Long form: `--query "sql_query"` Tips When using a custom query, FastTransfer will execute this query on the source database instead of reading from a table directly. ### File Input[​](#file-input "Direct link to 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:** * Long form: `--fileinput "file_path"` File Requirement The specified file must exist and contain a valid SQL query. ## Target Configuration[​](#target-configuration "Direct link to Target Configuration") These parameters define where to load the data in the target database. ### Target Schema[​](#target-schema "Direct link to Target Schema") Define the target schema name. **Example:** ``` ./FastTransfer \ ... --targetschema "dbo" \ ... ``` **Syntax:** * Long form: `--targetschema "schema_name"` ### Target Table[​](#target-table "Direct link to Target Table") Define the target table name. **Example:** ``` ./FastTransfer \ ... --targettable "customers" \ ... ``` **Syntax:** * Long form: `--targettable "table_name"` ## Load Behavior[​](#load-behavior "Direct link to Load Behavior") These parameters control how data is loaded into the target table. ### Load Mode[​](#load-mode "Direct link to Load Mode") Load mode of the data into the target table. **Example:** ``` ./FastTransfer \ ... --loadmode Truncate \ ... ``` **Syntax:** * 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 "Direct link to Batch Size") Batch Size for BulkCopy operations. **Example:** ``` ./FastTransfer \ ... --batchsize 500000 \ ... ``` **Syntax:** * Long form: `--batchsize "size"` **Default Value:** `1048576` Performance Tuning 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[​](#use-work-tables "Direct link to Use Work Tables") Switch that will activate the usage of intermediate work tables. Useful in some rare cases. **Example:** ``` ./FastTransfer \ ... --useworktables \ ... ``` **Syntax:** * Long form: `--useworktables` When to Use This option is useful in rare scenarios where direct loading causes issues. Work tables act as an intermediate staging area. ### Map Method[​](#map-method "Direct link to Map Method") Mapping method for the columns between source and target. **Example:** ``` ./FastTransfer \ ... --mapmethod Name \ ... ``` **Syntax:** * 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` Column Mapping 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. --- # Operating Systems FastTransfer supports Windows, Linux, and macOS across different architectures. ## Supported Operating Systems[​](#supported-operating-systems "Direct link to Supported Operating Systems") * Windows * Linux | OS | Versions | Architectures | Supported | | ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------- | --------- | | Nano Server | 2025, 2022, 2019 | x64 | | | Windows | 11 24H2 (IoT), 11 24H2 (E), 11 24H2, 11 23H2, 11 22H2 (E), 10 22H2, 10 21H2 (E), 10 21H2 (IoT), 10 1809 (E), 10 1607 (E) | x64 | | | Windows Server | 2025, 23H2, 2022, 2019, 2016, 2012-R2, 2012 | x64 | | | Windows Server Core | 2025, 2022, 2019, 2016, 2012-R2, 2012 | x64 | | | OS | Versions | Architectures | Supported | | ------------------------ | -------------------------- | ------------- | --------- | | Alpine | 3.21, 3.20, 3.19, 3.18 | Arm64, x64 | | | Azure Linux | 3.0 | Arm64, x64 | | | CentOS Stream | 10, 9 | Arm64, x64 | | | Debian | 12 | Arm64, x64 | | | Fedora | 41, 40 | Arm64, x64 | | | openSUSE Leap | 15.6 | Arm64, x64 | | | Red Hat Enterprise Linux | 10, 9, 8 | Arm64, x64 | | | SUSE Enterprise Linux | 15.6 | Arm64, x64 | | | Ubuntu | 24.10, 24.04, 22.04, 20.04 | Arm64, x64 | | --- # Database Sources & Platforms FastTransfer supports a wide range of database systems across different platforms. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") | Source | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **ClickHouse** | | | | | **DuckDB** | | | | | **MySQL** | | | | | **Netezza** | | | | | **ODBC** | | | | | **OLEDB** | | | | | **Oracle** | | | | | **PostgreSQL** | | | | | **SQL Server** | | | | | **SAP Hana** | | | | | **Teradata** | | | | ## Supported Targets[​](#supported-targets "Direct link to Supported Targets") | Target | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **ClickHouse** | | | | | **DuckDB** | | | | | **MySQL** | | | | | **Netezza** | | | | | **ODBC** | | | | | **OLEDB** | | | | | **Oracle** | | | | | **PostgreSQL** | | | | | **SQL Server** | | | | | **SAP Hana** | | | | | **Teradata** | | | | --- # FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES Controls the timeout for bulk load operations when using `msbulk` or `orabulk` target connection types. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | -------------------- | --------------------------------- | | **Connection Types** | `msbulk`, `orabulk` | | **Default Value** | 60 minutes | | **Valid Values** | Any positive integer (in minutes) | | **Since Version** | 0.17 | ## Description[​](#description "Direct link to Description") Sets the maximum time (in minutes) that FastTransfer will wait for a bulk load operation to complete. This is particularly useful for large data transfers that may exceed the default 60-minute timeout. When transferring large volumes of data, the bulk load operation can take longer than the default timeout. This variable allows you to extend the timeout to accommodate your specific data transfer requirements. ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Set timeout to 120 minutes set FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` **Temporary (current session):** ``` # Set timeout to 120 minutes export FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` --- # Environment Variables Overview FastTransfer 0.17+ supports environment variables to control runtime behavior for specific connection types. ## Available Environment Variables[​](#available-environment-variables "Direct link to Available Environment Variables") | Variable Name | Target Types | Default | Description | | ------------------------------------------------------------------------------------------------------ | ------------------- | ------- | ---------------------------------------------------------------- | | [FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES](/0.17/documentation/environment-variables/loadsteptimeout.md) | `msbulk`, `orabulk` | 60 | Controls the timeout for bulk load operations | | [FASTTRANSFER\_SORTEDINPUT](/0.17/documentation/environment-variables/sortedinput.md) | `msbulk` | `false` | Forces the sorted input hint for SQL Server bulk copy operations | --- # FASTTRANSFER\_SORTEDINPUT Forces the sorted input hint for SQL Server bulk copy operations when using the `msbulk` target connection type. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | -------------------- | --------------- | | **Connection Types** | `msbulk` | | **Default Value** | `false` | | **Valid Values** | `true`, `false` | | **Since Version** | 0.17 | ## Description[​](#description "Direct link to Description") When set to `true`, FastTransfer instructs SQL Server's bulk copy API to treat incoming data as sorted according to the clustered index. This can significantly improve performance when: * The source data is already sorted by the target table's clustered index columns * The target table has a clustered index * You want to minimize page splits and fragmentation ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Enable sorted input hint set FASTTRANSFER_SORTEDINPUT=true # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` **Temporary (current session):** ``` # Enable sorted input hint export FASTTRANSFER_SORTEDINPUT=true # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` --- # Advanced Scenarios Advanced use cases including DuckDB integration, ClickHouse, SAP HANA, Teradata, and other complex transfer scenarios. ## DuckDB Integration[​](#duckdb-integration "Direct link to DuckDB Integration") DuckDB provides powerful data transformation capabilities with FastTransfer. ### DuckDB Memory - Parquet with Nested Fields to MSSQL[​](#duckdb-memory---parquet-with-nested-fields-to-mssql "Direct link to DuckDB Memory - Parquet with Nested Fields to MSSQL") Process complex nested JSON/Parquet files with DuckDB's in-memory engine: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdb" ` --sourceserver ":memory:" ` --query "select * EXCLUDE(Risques, Interlocuteurs),unnest(interlocuteurs,recursive := true ) from (select day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) from read_parquet('D:\CLIENTS\ENEDIS\BI4ALL\CHANTIER\**\*.parquet', hive_partitioning=true)) t_row_unest" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "ENDSBI4ALL" ` --targetschema "bi4all" ` --targettable "DuckChantiers_hpart" ` --parallelmethod "DataDriven" ` --distributekeycolumn "day" ` --loadmode "Truncate" ` --degree 8 ``` DuckDB Memory Mode Use `:memory:` as the server to process data without persisting a DuckDB database file. Perfect for ETL transformations. ### DuckDB Stream - Multiple CSV Files with DataDriven[​](#duckdb-stream---multiple-csv-files-with-datadriven "Direct link to DuckDB Stream - Multiple CSV Files with DataDriven") Process multiple CSV files in parallel using filename as distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - Single Large CSV with Random Method[​](#duckdb-stream---single-large-csv-with-random-method "Direct link to DuckDB Stream - Single Large CSV with Random Method") Process a single large CSV file with parallel Random distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributekeycolumn "l_orderkey" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - CSV with Column Slicing[​](#duckdb-stream---csv-with-column-slicing "Direct link to DuckDB Stream - CSV with Column Slicing") Use calculated column slices for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --loadmode "Truncate" ` --degree 13 ``` ### DuckDB Stream - CSV with Custom Format[​](#duckdb-stream---csv-with-custom-format "Direct link to DuckDB Stream - CSV with Custom Format") Specify CSV format parameters when auto-detection isn't sufficient: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --loadmode "Truncate" ` --degree 12 ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributekeycolumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## ClickHouse Integration[​](#clickhouse-integration "Direct link to ClickHouse Integration") ### PostgreSQL to ClickHouse - Single-threaded[​](#postgresql-to-clickhouse---single-threaded "Direct link to PostgreSQL to ClickHouse - Single-threaded") Transfer data to ClickHouse without parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ### PostgreSQL to ClickHouse - Parallel with Ctid[​](#postgresql-to-clickhouse---parallel-with-ctid "Direct link to PostgreSQL to ClickHouse - Parallel with Ctid") High-performance transfer using PostgreSQL's Ctid method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL - Multiple Methods[​](#clickhouse-to-postgresql---multiple-methods "Direct link to ClickHouse to PostgreSQL - Multiple Methods") Transfer from ClickHouse to PostgreSQL using various distribution methods: * Single-threaded * RangeId Method * DataDriven Method ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## SAP HANA Integration[​](#sap-hana-integration "Direct link to SAP HANA Integration") ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data to SAP HANA using the HANA bulk loader: **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer from SAP HANA to PostgreSQL: ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## Teradata Integration[​](#teradata-integration "Direct link to Teradata Integration") ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data to Teradata with parallel Ctid method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## Netezza Integration[​](#netezza-integration "Direct link to Netezza Integration") Transfer from Netezza to MSSQL using DATASLICEID for optimal parallelism: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "DATASLICEID" ` --degree 6 ``` Netezza DATASLICEID Use DATASLICEID as the distribution column to leverage Netezza's internal data distribution for optimal parallel extraction. ## Advanced SQL Server Techniques[​](#advanced-sql-server-techniques "Direct link to Advanced SQL Server Techniques") ### Using Partition Functions[​](#using-partition-functions "Direct link to Using Partition Functions") Leverage SQL Server partition functions for efficient parallel transfers: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` Partition Function Syntax Use `` `$PARTITION.FunctionName(ColumnName) `` to reference a partition function. The backtick (`` ` ``) escapes the dollar sign in PowerShell. ### Using Physloc Method[​](#using-physloc-method "Direct link to Using Physloc Method") Use physical location for parallel distribution (readonly tables only): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` Physloc Method The Physloc method should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Dynamic Degree with Negative Values[​](#dynamic-degree-with-negative-values "Direct link to Dynamic Degree with Negative Values") Use negative degree values to automatically calculate parallelism based on CPU cores: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree -4 ` --loadmode "Truncate" ``` Dynamic Degree A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value. With 16 cores, `-4` results in 4 parallel threads. ### Batch Size Optimization[​](#batch-size-optimization "Direct link to Batch Size Optimization") Adjust batch size based on connection type for optimal performance: * **MSSQL (msbulk)**: 10,000 - 100,000 rows * **PostgreSQL (pgcopy)**: 10,000 - 50,000 rows * **Oracle (orabulk)**: 100,000 - 500,000 rows * **Oracle (oradirect)**: 1,000 - 10,000 rows * **ClickHouse**: 10,000 - 1,000,000 rows * **SAP HANA**: 5,000 - 10,000 rows ### Debug Logging[​](#debug-logging "Direct link to Debug Logging") Enable detailed logging for troubleshooting: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` Debug Mode Use `--loglevel "debug"` to see detailed execution steps, connection information, and query generation details for troubleshooting. ## Using Input Files[​](#using-input-files "Direct link to Using Input Files") Process SQL queries from external files: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --fileinput "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ## Column Mapping[​](#column-mapping "Direct link to Column Mapping") ### Map by Name[​](#map-by-name "Direct link to Map by Name") Map source columns to target columns by name with `--mapmethod "Name"` (the default is `Position`): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # CSV Import FastTransfer leverages a powerful `read_csv` function and syntax to efficiently import CSV files into any supported database. This provides advanced features like automatic schema detection, parallel processing, and support for complex CSV formats. FastTransfer offers several advantages for CSV processing: * **Automatic schema detection** - No need to manually define column types * **High performance** - Optimized CSV parser with parallel reading * **Flexible formatting** - Handle various delimiters, quotes, and escape characters * **Multi-file support** - Process multiple CSV files with glob patterns * **In-memory processing** - No need for a persistent database file ## Basic CSV Import[​](#basic-csv-import "Direct link to Basic CSV Import") ### Single Small CSV File[​](#single-small-csv-file "Direct link to Single Small CSV File") Import a single CSV file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Using :memory: The `:memory:` server parameter tells FastTransfer to operate in-memory without creating a database file. This is perfect for one-time CSV imports. This does not mean that FastTransfer will load all the file in memory. The data are streamed and memory usage stay low. ### Medium CSV File - Single Thread[​](#medium-csv-file---single-thread "Direct link to Medium CSV File - Single Thread") Import a medium-sized CSV file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel CSV Import[​](#parallel-csv-import "Direct link to Parallel CSV Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(id/10000)::int` divides the ID column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large CSV[​](#random-method-on-large-csv "Direct link to Random Method on Large CSV") Process a large CSV file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributekeycolumn "l_orderkey" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 13 ``` ## Multiple CSV Files[​](#multiple-csv-files "Direct link to Multiple CSV Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple CSV files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_csv()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Advanced CSV Formats[​](#advanced-csv-formats "Direct link to Advanced CSV Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") When automatic detection doesn't work, specify the CSV format explicitly: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` **Format Parameters:** * `auto_detect=false` - Disable automatic schema detection * `delim=','` - Field delimiter (comma) * `quote='"'` - Quote character for fields containing delimiters * `escape='"'` - Escape character for quotes within quoted fields * `new_line='\n'` - Line terminator * `skip=0` - Number of lines to skip at the start * `comment=''` - Character indicating comment lines to ignore * `header=true` - First line contains column names * `columns={...}` - Explicit column names and types ### CSV with Vector Data to SQL Server[​](#csv-with-vector-data-to-sql-server "Direct link to CSV with Vector Data to SQL Server") Import CSV containing vector embeddings as VARCHAR: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id,url,title,text,title_vector::varchar tv,content_vector::varchar cv,vector_id from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') limit 100" ` --targetconnectiontype "msbulk" ` --targetserver "localhost\SS2025" ` --targettrusted ` --targetdatabase "wikipedia" ` --targetschema "dbo" ` --targettable "wikipedia_articles_embeddings_as_vector" ` --mapmethod "Name" ` --loadmode "Append" ``` ## Common CSV Scenarios[​](#common-csv-scenarios "Direct link to Common CSV Scenarios") ### Tab-Delimited Files[​](#tab-delimited-files "Direct link to Tab-Delimited Files") For tab-separated values (TSV): ``` --query "SELECT * FROM read_csv('file.tsv', delim='\t')" ``` ### CSV with Different Encodings[​](#csv-with-different-encodings "Direct link to CSV with Different Encodings") ``` --query "SELECT * FROM read_csv('file.csv', encoding='UTF-8')" ``` ### CSV with Custom Quote Character[​](#csv-with-custom-quote-character "Direct link to CSV with Custom Quote Character") ``` --query "SELECT * FROM read_csv('file.csv', quote='''', escape='''')" ``` ### CSV Without Headers[​](#csv-without-headers "Direct link to CSV Without Headers") ``` --query "SELECT * FROM read_csv('file.csv', header=false, columns={'col1': 'VARCHAR', 'col2': 'INTEGER'})" ``` ### Skip Header Lines[​](#skip-header-lines "Direct link to Skip Header Lines") ``` --query "SELECT * FROM read_csv('file.csv', skip=3)" ``` --- # JSON Import FastTransfer leverages a powerful `read_json` function to efficiently import JSON files into any supported database. It provides advanced features like automatic schema detection, nested structure handling, and support for both JSON objects and JSON Lines (JSONL/NDJSON) formats. FastTransfer offers several advantages for JSON processing: * **Automatic schema detection** - Automatically infers column types from JSON structure * **High performance** - Optimized JSON parser with parallel reading * **Nested structure support** - Handle complex nested objects and arrays * **Multiple formats** - Support for JSON, JSON Lines (JSONL), and NDJSON * **Array flattening** - Use `unnest()` to flatten nested arrays * **In-memory processing** - No need for a persistent database file ## Basic JSON Import[​](#basic-json-import "Direct link to Basic JSON Import") ### Single JSON File[​](#single-json-file "Direct link to Single JSON File") Import a single JSON file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\users.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "AppDB" ` --targetschema "dbo" ` --targettable "users" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` JSON Formats FastTransfer automatically detects the JSON format: * **JSON Array**: `[{...}, {...}]` - Array of objects * **JSON Lines (JSONL)**: One JSON object per line * **NDJSON**: Newline-delimited JSON objects ### JSON Lines File - Single Thread[​](#json-lines-file---single-thread "Direct link to JSON Lines File - Single Thread") Import a JSON Lines file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\events.jsonl', format='newline_delimited')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "analytics" ` --targetschema "public" ` --targettable "events" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel JSON Import[​](#parallel-json-import "Direct link to Parallel JSON Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\orders.jsonl')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(order_id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(order_id/10000)::int` divides the order\_id column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large JSON File[​](#random-method-on-large-json-file "Direct link to Random Method on Large JSON File") Process a large JSON Lines file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\transactions.jsonl')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "Random" ` --distributekeycolumn "transaction_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\logs.jsonl') rjson" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(event_timestamp::date)" ` --datadrivenquery "select distinct event_timestamp::date from read_json('D:\DATA\logs.jsonl') rjson" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple JSON Files[​](#multiple-json-files "Direct link to Multiple JSON Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple JSON files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_json('D:\DATA\daily\*.jsonl', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_metrics" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.jsonl')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_json()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Nested JSON Structures[​](#nested-json-structures "Direct link to Nested JSON Structures") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested JSON structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, user.name as user_name, user.email as user_email, order_date, total_amount FROM read_json('D:\DATA\orders.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within JSON objects: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(items, recursive := true) FROM read_json('D:\DATA\orders_with_items.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structure[​](#complex-nested-structure "Direct link to Complex Nested Structure") Handle deeply nested JSON with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, address.street as street, address.city as city, address.country as country, contacts[1] as primary_contact FROM read_json('D:\DATA\customers.json')" ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "crm" ` --targetuser "crmuser" ` --targetpassword "YourPassword" ` --targetschema "crm" ` --targettable "customers" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Advanced JSON Formats[​](#advanced-json-formats "Direct link to Advanced JSON Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") Specify JSON format explicitly when needed: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\data.json', format='array', maximum_depth=10)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "raw_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` **Format Parameters:** * `format='array'` - JSON array of objects * `format='newline_delimited'` - JSON Lines (JSONL/NDJSON) * `format='auto'` - Automatic detection (default) * `maximum_depth` - Maximum nesting depth to parse * `records='true'` - Parse records format * `columns={...}` - Explicit column names and types ### Compressed JSON Files[​](#compressed-json-files "Direct link to Compressed JSON Files") Import gzip-compressed JSON files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\logs.jsonl.gz', compression='gzip')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "compressed_logs" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Compression Support DuckDB automatically detects compression from file extensions: * `.gz` - Gzip compression * `.json.gz` or `.jsonl.gz` - Compressed JSON files ## JSON Type Conversions[​](#json-type-conversions "Direct link to JSON Type Conversions") ### Converting JSON Fields[​](#converting-json-fields "Direct link to Converting JSON Fields") Transform JSON data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, CAST(amount AS DECIMAL(10,2)) as amount, status FROM read_json('D:\DATA\payments.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "payments" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### JSON String to Array[​](#json-string-to-array "Direct link to JSON String to Array") Convert JSON string fields to arrays: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, json_extract(tags, '$') as tags_array FROM read_json('D:\DATA\products.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "catalog" ` --targetschema "public" ` --targettable "products" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # MySQL Examples Examples for transferring data from and to MySQL databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") MySQL transfers support: * **mysql**: Standard MySQL protocol for reading * **mysqlbulk**: MySQL bulk loader for high-performance target loading ## MySQL to MSSQL - Single-threaded Transfer[​](#mysql-to-mssql---single-threaded-transfer "Direct link to MySQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with Random Method[​](#mysql-to-mssql---parallel-transfer-with-random-method "Direct link to MySQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mysql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MySQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values. **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 10 ` --loadmode Truncate ``` **Using partitioned table with year column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## MSSQL to MySQL - Single-threaded Transfer[​](#mssql-to-mysql---single-threaded-transfer "Direct link to MSSQL to MySQL - Single-threaded Transfer") Transfer data from SQL Server to MySQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Parallel Transfer with Random Method[​](#mssql-to-mysql---parallel-transfer-with-random-method "Direct link to MSSQL to MySQL - Parallel Transfer with Random Method") Transfer with Random distribution. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Using Partition Function[​](#mssql-to-mysql---using-partition-function "Direct link to MSSQL to MySQL - Using Partition Function") Transfer with DataDriven method using SQL Server partition function. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Adding Computed Column[​](#mssql-to-mysql---adding-computed-column "Direct link to MSSQL to MySQL - Adding Computed Column") Transfer with additional computed column and DataDriven method. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select *,null as o_orderdate_year from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## Using ODBC Connection to MySQL[​](#using-odbc-connection-to-mysql "Direct link to Using ODBC Connection to MySQL") Transfer using ODBC DSN for MySQL connection. ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMySQLTPCH" ` --sourcedatabase "tpch" ` --query "select * from tpch.orders_part LIMIT 10" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for transferring data from and to Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle transfers support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended for source) * **orabulk**: Oracle Bulk Loader for high-performance target loading * **oradirect**: Oracle Direct Path for target loading * **odbc**: Using ODBC DSN ## Oracle to MSSQL - Single-threaded Transfer[​](#oracle-to-mssql---single-threaded-transfer "Direct link to Oracle to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "localhost:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ``` ## Oracle to MSSQL - Parallel Transfer with Rowid Method[​](#oracle-to-mssql---parallel-transfer-with-rowid-method "Direct link to Oracle to MSSQL - Parallel Transfer with Rowid Method") Oracle-specific parallel transfer using physical row identifier (ROWID). Oracle-Specific The Rowid method is unique to Oracle and uses the physical row identifier for parallel data distribution. This is very efficient for full table transfers. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "LOCALHOST:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS_FLAT" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Rowid" ` --loadmode "Truncate" ` --degree 12 ``` ## PostgreSQL to Oracle - Using orabulk (Bulk Loader)[​](#postgresql-to-oracle---using-orabulk-bulk-loader "Direct link to PostgreSQL to Oracle - Using orabulk (Bulk Loader)") Transfer data from PostgreSQL to Oracle using Oracle bulk loader. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## PostgreSQL to Oracle - Using oradirect (Direct Path)[​](#postgresql-to-oracle---using-oradirect-direct-path "Direct link to PostgreSQL to Oracle - Using oradirect (Direct Path)") Transfer data from PostgreSQL to Oracle using Oracle direct path loading. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 1000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "FREEPDB1" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## Using ODBC Connection to Oracle[​](#using-odbc-connection-to-oracle "Direct link to Using ODBC Connection to Oracle") Transfer using ODBC DSN for Oracle connection. **To MSSQL - single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNORA23CFREEPDB1" ` --sourcedatabase "FREEPDB1" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for transferring data from and to ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB databases. ## ClickHouse[​](#clickhouse "Direct link to ClickHouse") Transfer data from and to ClickHouse database. ### PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse using the bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL[​](#clickhouse-to-postgresql "Direct link to ClickHouse to PostgreSQL") Transfer data from ClickHouse to PostgreSQL with various parallelization methods. **Single-threaded:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with RangeId:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Ntile:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Ntile" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Random:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with DataDriven:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ClickHouse Connection Types * **clickhouse**: Standard connection for reading * **clickhousebulk**: High-performance bulk loader for writing ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Transfer data from and to SAP HANA database. ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA using the HANA bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Batch Size For SAP HANA, use batch sizes between 5,000 and 10,000 rows for optimal performance. ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer data from SAP HANA to PostgreSQL. ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Connection Types * **hana**: Standard connection for reading from SAP HANA * **hanabulk**: Bulk loader for writing to SAP HANA ## Netezza[​](#netezza "Direct link to Netezza") Transfer data from Netezza using the DATASLICEID for optimal parallelism. ### Netezza to MSSQL[​](#netezza-to-mssql "Direct link to Netezza to MSSQL") Transfer from Netezza to SQL Server using DataDriven method on DATASLICEID: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "DATASLICEID" ` --degree 6 ` --loadmode Truncate ``` Netezza DATASLICEID The DATASLICEID column in Netezza represents the internal data distribution. Using it as the distribution key provides optimal parallel extraction by leveraging Netezza's data placement. ## Teradata[​](#teradata "Direct link to Teradata") Transfer data from and to Teradata database. ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer data from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## DuckDB[​](#duckdb "Direct link to DuckDB") Transfer data from and to DuckDB database files or in-memory. ### MSSQL to DuckDB File[​](#mssql-to-duckdb-file "Direct link to MSSQL to DuckDB File") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributekeycolumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### DuckDB Stream - CSV Files[​](#duckdb-stream---csv-files "Direct link to DuckDB Stream - CSV Files") Process CSV files using DuckDB's in-memory engine and load into SQL Server: **Single CSV file:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Multiple CSV files with parallel processing:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` DuckDB Connection Types * **duckdb**: Direct connection to DuckDB file * **duckdbstream**: Streaming connection for in-memory processing or file-based operations * Use `:memory:` as server for in-memory processing tip Build your command with the [Wizard](/latest/wizard.md) --- # Parquet Import FastTransfer leverages a powerful `read_parquet` function to efficiently import Parquet files into any supported database. Parquet is a columnar storage format optimized for analytics, and it provides excellent performance and feature support for reading Parquet files. FastTransfer offers several advantages for Parquet processing: * **Columnar access** - Read only the columns you need for optimal performance * **Predicate pushdown** - Filter data at the file level before loading * **Automatic schema detection** - Column types preserved from Parquet metadata * **High performance** - Optimized Parquet reader with parallel processing * **Compression support** - Handles all Parquet compression codecs (Snappy, Gzip, LZ4, Zstd) * **Nested structure support** - Handle complex nested objects, arrays, and maps * **Multi-file support** - Process multiple Parquet files with glob patterns * **Partition support** - Hive-style partitioning for efficient data access ## Basic Parquet Import[​](#basic-parquet-import "Direct link to Basic Parquet Import") ### Single Parquet File[​](#single-parquet-file "Direct link to Single Parquet File") Import a single Parquet file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\sales.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "SalesDB" ` --targetschema "dbo" ` --targettable "sales" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Column Selection For optimal performance, select only the columns you need: ``` --query "SELECT customer_id, order_date, total_amount FROM read_parquet('file.parquet')" ``` This reduces I/O and memory usage significantly. ### Multiple Parquet Files - Single Thread[​](#multiple-parquet-files---single-thread "Direct link to Multiple Parquet Files - Single Thread") Import multiple Parquet files using glob pattern: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\orders\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel Parquet Import[​](#parallel-parquet-import "Direct link to Parallel Parquet Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\transactions\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "finance" ` --targetschema "public" ` --targettable "transactions" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(transaction_id/100000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(transaction_id/100000)::int` divides the ID by 100,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large Parquet Files[​](#random-method-on-large-parquet-files "Direct link to Random Method on Large Parquet Files") Process large Parquet files with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "events" ` --parallelmethod "Random" ` --distributekeycolumn "event_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\logs\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributekeycolumn "CAST(event_date AS VARCHAR)" ` --datadrivenquery "select distinct CAST(event_date AS VARCHAR) from read_parquet('D:\DATA\logs\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple Parquet Files[​](#multiple-parquet-files "Direct link to Multiple Parquet Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple Parquet files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_parquet('D:\DATA\daily\*.parquet', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_reports" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_parquet()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Hive-Style Partitioning[​](#hive-style-partitioning "Direct link to Hive-Style Partitioning") ### Reading Partitioned Data[​](#reading-partitioned-data "Direct link to Reading Partitioned Data") Read Parquet files with Hive-style partitioning: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\partitioned\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "warehouse" ` --targetschema "dbo" ` --targettable "partitioned_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Hive Partitioning For data organized like `year=2024/month=01/data.parquet`, DuckDB automatically extracts partition columns: * Partition columns become regular columns in the result * Use `hive_partitioning=true` to enable this feature * Excellent for partition pruning and efficient queries ### Parallel Processing on Partitioned Data[​](#parallel-processing-on-partitioned-data "Direct link to Parallel Processing on Partitioned Data") Use partition columns for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "sales_data" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year || '-' || month" ` --datadrivenquery "select distinct year || '-' || month as partition_key from read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` ## Nested Structures in Parquet[​](#nested-structures-in-parquet "Direct link to Nested Structures in Parquet") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested Parquet structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, customer.name as customer_name, customer.email as customer_email, order_date, total FROM read_parquet('D:\DATA\orders.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(line_items, recursive := true) FROM read_parquet('D:\DATA\orders_nested.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structures[​](#complex-nested-structures "Direct link to Complex Nested Structures") Handle complex nested Parquet data with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) FROM read_parquet('D:\DATA\chantier\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "construction" ` --targetschema "dbo" ` --targettable "site_details" ` --parallelmethod "DataDriven" ` --distributekeycolumn "day" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 8 ``` ## Advanced Filtering[​](#advanced-filtering "Direct link to Advanced Filtering") ### Predicate Pushdown[​](#predicate-pushdown "Direct link to Predicate Pushdown") Apply filters to reduce data read from Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet') WHERE event_date >= '2024-01-01' AND event_type = 'purchase'" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "purchases" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Append" ``` Predicate Pushdown Benefits DuckDB pushes filters down to the Parquet reader, which: * Skips entire row groups that don't match the filter * Reduces memory usage * Significantly improves performance for selective queries * Works best with filters on partition columns or columns with statistics ### Column Pruning with Selection[​](#column-pruning-with-selection "Direct link to Column Pruning with Selection") Select only needed columns for maximum performance: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT customer_id, order_date, total_amount, status FROM read_parquet('D:\DATA\orders_large.parquet') WHERE order_date >= '2024-01-01'" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "recent_orders" ` --parallelmethod "Random" ` --distributekeycolumn "customer_id" ` --mapmethod "Name" ` --loadmode "Append" ` --degree 12 ``` ## Schema and Metadata[​](#schema-and-metadata "Direct link to Schema and Metadata") ### Union Multiple Parquet Files[​](#union-multiple-parquet-files "Direct link to Union Multiple Parquet Files") Union Parquet files with compatible schemas: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet(['D:\DATA\2023\*.parquet', 'D:\DATA\2024\*.parquet'], union_by_name=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "archive" ` --targetschema "dbo" ` --targettable "historical_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Union By Name `union_by_name=true` allows reading files with different column orders or optional columns: * Columns are matched by name instead of position * Missing columns are filled with NULL * Extra columns are ignored * Useful for schema evolution scenarios ### Type Conversion[​](#type-conversion "Direct link to Type Conversion") Convert Parquet data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, amount::DECIMAL(18,2) as amount, status FROM read_parquet('D:\DATA\transactions.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # PostgreSQL Examples Comprehensive examples for transferring data from and to PostgreSQL databases using native connectors. ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL transfers support multiple connection types: * **pgsql**: Standard PostgreSQL protocol for reading/writing * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk transfers). Data is copied in binary format when both the source and the target use `pgcopy`, and in text format otherwise ## PostgreSQL to MSSQL - Single-threaded Transfer[​](#postgresql-to-mssql---single-threaded-transfer "Direct link to PostgreSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization using a SQL query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## PostgreSQL to MSSQL - Using Schema and Table[​](#postgresql-to-mssql---using-schema-and-table "Direct link to PostgreSQL to MSSQL - Using Schema and Table") Transfer specifying schema and table names instead of a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#postgresql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on a calculated column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "FLOOR(o_orderkey/10000000)" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Parallel Transfer with Ctid Method[​](#postgresql-to-mssql---parallel-transfer-with-ctid-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Ctid Method") PostgreSQL-specific parallel transfer using physical row identifier (ctid). PostgreSQL-Specific The Ctid method is unique to PostgreSQL and uses the physical row identifier (ctid) for parallel data distribution. This is very efficient for full table transfers. **For orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` **For lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with Random Method[​](#postgresql-to-mssql---parallel-transfer-with-random-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Dynamic Degree[​](#postgresql-to-mssql---dynamic-degree "Direct link to PostgreSQL to MSSQL - Dynamic Degree") Use negative degree values to automatically determine parallelism. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## PostgreSQL to MSSQL - Using Input File[​](#postgresql-to-mssql---using-input-file "Direct link to PostgreSQL to MSSQL - Using Input File") Transfer using a SQL query from an external file. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --fileinput "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ## PostgreSQL to PostgreSQL - Using Query[​](#postgresql-to-postgresql---using-query "Direct link to PostgreSQL to PostgreSQL - Using Query") Transfer between PostgreSQL databases using a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --query "select * from ""tpch_10"".orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## PostgreSQL to PostgreSQL - Using Ctid Method[​](#postgresql-to-postgresql---using-ctid-method "Direct link to PostgreSQL to PostgreSQL - Using Ctid Method") Transfer between PostgreSQL databases with parallel Ctid method. * Using pgcopy (COPY) * Using pgsql (INSERT UNNEST) ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgsql" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to PostgreSQL - Using pgcopy Binary[​](#postgresql-to-postgresql---using-pgcopy-binary "Direct link to PostgreSQL to PostgreSQL - Using pgcopy Binary") High-performance transfer using PostgreSQL binary COPY protocol: binary format is used because both the source and the target connection types are `pgcopy`. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Parallel with Ctid - orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` **Parallel with Ctid - lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` ## PostgreSQL to Oracle[​](#postgresql-to-oracle "Direct link to PostgreSQL to Oracle") Transfer data from PostgreSQL to Oracle databases. * Using orabulk (Bulk Load) * Using oradirect (Direct Path) **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 1000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ## PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL (Hyper File) to MSSQL[​](#postgresql-hyper-file-to-mssql "Direct link to PostgreSQL (Hyper File) to MSSQL") Transfer data from a Tableau Hyper file (using pgsql driver) to MSSQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:8095" ` --sourcedatabase "D:\OpenData\TPCH\data\hyper\tpch_sf10.hyper" ` --sourceuser "tableau_internal_user" ` --sourcepassword "" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from ""ORDERS""" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for transferring data from and to SQL Server databases. ## MSSQL to MSSQL - Single-threaded Transfer[​](#mssql-to-mssql---single-threaded-transfer "Direct link to MSSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization for smaller datasets. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with Random Method[​](#mssql-to-mssql---parallel-transfer-with-random-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. * Windows Authentication * SQL Authentication ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with RangeId Method[​](#mssql-to-mssql---parallel-transfer-with-rangeid-method "Direct link to MSSQL to MSSQL - Parallel Transfer with RangeId Method") Transfer using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Using query with filter:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with Ntile Method[​](#mssql-to-mssql---parallel-transfer-with-ntile-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Ntile Method") Transfer using Ntile distribution for evenly distributed chunks. **Full table transfer:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Filtered transfer with date column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mssql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MSSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values of a column or partition function. **Using partition function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "DataDriven" ` --distributekeycolumn "YEAR(o_orderdate)" ` --degree 7 ` --loadmode Append ``` ## MSSQL to MSSQL - Using Physloc Method[​](#mssql-to-mssql---using-physloc-method "Direct link to MSSQL to MSSQL - Using Physloc Method") Transfer using physical location (should only be used on readonly/snapshot databases). warning The Physloc method should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` ## MSSQL to PostgreSQL[​](#mssql-to-postgresql "Direct link to MSSQL to PostgreSQL") Transfer data from SQL Server to PostgreSQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 10 ` --loadmode "Truncate" ``` ## MSSQL to MySQL[​](#mssql-to-mysql "Direct link to MSSQL to MySQL") Transfer data from SQL Server to MySQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` **With DataDriven method on partitioned table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer data from SQL Server to DuckDB. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## Using ODBC Connection[​](#using-odbc-connection "Direct link to Using ODBC Connection") Transfer using ODBC DSN for connection. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMsSQLTPCH" ` --sourcedatabase "tpch_test" ` --query "select top 1000 * from dbo.orders" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## Dynamic Degree[​](#dynamic-degree "Direct link to Dynamic Degree") Use negative degree values to automatically determine parallelism based on CPU cores. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## Load Modes[​](#load-modes "Direct link to Load Modes") FastTransfer supports different load modes for the target table: * `Truncate`: Truncates the target table before loading * `Append`: Appends data to existing table (default) Example with Append mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastTransfer\_Settings.json for Windows[​](#fasttransfer_settingsjson-for-windows "Direct link to FastTransfer_Settings.json for Windows") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastTransferLogs": "Server=localhost;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs\\FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastTransferLogs", "sinkOptionsSection": { "TableName": "EventLogs", "SchemaName": "dbo", "DatabaseName": "FastTransferLogs", "AutoCreateSqlDatabase": true, "AutoCreateSqlTable": true, "BatchPostingLimit": 50, "BatchPeriod": "0.00:00:05", "UseSqlBulkCopy": false }, "restrictedToMinimumLevel": "Information", "columnOptionsSection": { "disableTriggers": true, "clusteredColumnstoreIndex": false, "removeStandardColumns": [ "Id", "MessageTemplate", "Properties", "Exception" ], "additionalColumns": [ { "ColumnName": "ErrorSummary", "PropertyName": "rootcauseMessage", "DataType": "nvarchar", "DataLength": 4000 }, { "ColumnName": "EventType", "PropertyName": "EventType", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "FullTargetName", "PropertyName": "fulltargetname", "DataType": "nvarchar", "DataLength": 400 }, { "ColumnName": "Status", "PropertyName": "finalStatus", "DataType": "int" }, { "ColumnName": "Rows", "PropertyName": "loadedRows", "DataType": "bigint" }, { "ColumnName": "Columns", "PropertyName": "loadedCols", "DataType": "int" }, { "ColumnName": "ElaspedMs", "PropertyName": "loadElapsedMs", "DataType": "bigint" }, { "ColumnName": "MachineName", "PropertyName": "MachineName", "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "Application", "PropertyName": "Application", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "ProcessId", "PropertyName": "ProcessId", "DataType": "int" }, { "ColumnName": "ThreadId", "PropertyName": "ThreadId", "DataType": "int" }, { "ColumnName": "RunId", "PropertyName": "runid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "TraceId", "PropertyName": "traceid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "SpanId", "PropertyName": "SpanId", "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "Release", "PropertyName": "release", "DataType": "varchar", "DataLength": 32 }, { "ColumnName": "EnvironmentUserName", "PropertyName": "EnvironmentUserName", "DataType": "varchar", "DataLength": 200 }, { "ColumnName": "InputParameters", "PropertyName": "InputParameters", "DataType": "varchar", "DataLength": 8000 } ], "level": { "columnName": "Severity", "storeAsEnum": false, "DataType": "varchar", "DataLength": 50 }, "timeStamp": { "columnName": "EventTimestamp", "nonClusteredIndex": true, "convertToUtc": false }, "logEvent": { "excludeAdditionalProperties": false, "excludeStandardColumns": true }, "message": { "columnName": "EventMsg", "DataType": "varchar", "DataLength": 8000 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Linux\_Console\_Files.json[​](#fasttransfer_settings_linux_console_filesjson "Direct link to FastTransfer_Settings_Linux_Console_Files.json") For Linux with Console + Daily rolling Files: ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs/FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Windows.json[​](#fasttransfer_settings_map_for_windowsjson "Direct link to FastTransfer_Settings_Map_for_Windows.json") For Console and dynamically named log file targets (Windows): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "C:\\temp\\Logs\\{logdate}\\{sourcedatabase}\\{sourcetable}\\FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fasttransfer_settings_map_for_linux_and_containerjson "Direct link to FastTransfer_Settings_Map_for_Linux_and_Container.json") For Console and dynamically named log file targets (Linux/Container): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fasttransfer_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastTransfer_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastTransferLogs": "Host=localhost;Port=15432;Database=fastlogs;Username=FastUser;Password=FastPassword" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.PostgreSQL.Alternative", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "PostgreSQL", "Args": { "connectionString": "PG_FastTransferLogs", "tableName": "event_logs", "schemaName": "public", "needAutoCreateTable": true, "needAutoCreateSchema": false, "restrictedToMinimumLevel": "Information", "useCopy": false, "loggerColumnOptions": { "event_timestamp": { "Name": "Timestamp", "Format": "", "WriteMethod": "Timestamp", "NpgsqlDbType": "TimestampTz", "Order": 1 }, "event_msg": { "Name": "RenderedMessage", "Format": "", "WriteMethod": "RenderedMessage", "NpgsqlDbType": "Text", "Order": 2 }, "Level": { "Name": "LevelAsText", "Order": 3 }, "LevelInt": { "Name": "Level", "Order": 4 } }, "loggerPropertyColumnOptions": { "error_summary": { "Name": "rootcauseMessage", "Format": "{0}", "WriteMethod": "ToString", "NpgsqlDbType": "Text", "Order": 5 }, "source_database": { "Name": "SourceDatabase", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 6 }, "source_schema": { "Name": "SourceSchema", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 7 }, "source_table": { "Name": "SourceTable", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 8 }, "output_directory": { "Name": "OutputDirectory", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 9 }, "full_target_name": { "Name": "fulltargetname", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 10 }, "application": { "Name": "Application", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 11 }, "status": { "Name": "finalStatus", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 12 }, "rows": { "Name": "loadedRows", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Numeric", "Order": 13 }, "columns": { "Name": "loadedCols", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 14 }, "elapsed_ms": { "Name": "loadElapsedMs", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Numeric", "Order": 15 }, "machine_name": { "Name": "MachineName", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 16 }, "process_id": { "Name": "ProcessId", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 17 }, "thread_id": { "Name": "ThreadId", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 18 }, "run_id": { "Name": "runid", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 19 }, "trace_id": { "Name": "traceid", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 20 }, "span_id": { "Name": "SpanId", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 21 }, "release": { "Name": "release", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 22 }, "environment_user_name": { "Name": "EnvironmentUserName", "Format": "", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 23 }, "input_parameters": { "Name": "InputParameters", "WriteMethod": "Raw", "NpgsqlDbType": "Json", "Order": 24 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` --- # Log Database FastTransfer supports logging to a **Microsoft SQL Server** or **PostgreSQL** database. To enable database logging, configure the log database connection string in a settings file: * The default settings file is `FastTransfer_Settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Complete configuration examples for both MSSQL and PostgreSQL are available in the [Configuration Examples](/0.17/documentation/logging/examples.md#fasttransfer_settingsjson-for-windows) page. Information **In case the database is not reachable, FastTransfer will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastTransfer_Settings.json` file to something else (like `FastTransfer_Settings.json.save`) and FastTransfer will use the console log only. --- # Log Files Names Mapping using variables You can use variables to define the log file path and files names in the ***FastTransfer\_Settings.json*** In the **WriteTo** array you can use a **Map** like that : ``` { "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ] } ``` The available variables to customize log path or log filename are : | Variable Name | Description | | ------------------ | ------------------------------------------- | | `{logdate}` | Current date in yyyy-MM-dd format | | `{logtimestamp}` | Timestamp of the log entry | | `{sourcedatabase}` | Name of the source database | | `{sourceschema}` | Name of the source schema | | `{sourcetable}` | Name of the source table | | `{filename}` | Name of the file being processed | | `{runid}` | Run identifier provided in the command line | | `{traceid}` | Unique identifier generate at runtime | You can find complete configuration examples for both Windows and Linux: * **Windows**: [FastTransfer\_Settings\_Map\_for\_Windows.json](/0.17/documentation/logging/examples.md#fasttransfer_settings_map_for_windowsjson) * **Linux/Container**: [FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json](/0.17/documentation/logging/examples.md#fasttransfer_settings_map_for_linux_and_containerjson) --- # Log Levels FastTransfer uses Serilog for logging and supports multiple log levels to control the verbosity of output. You can set the loglevel using the `--loglevel` parameter followed by a value in the list of available log levels. ## Available Log Levels[​](#available-log-levels "Direct link to Available Log Levels") | Level | Description | Use Case | | --------------- | ------------------------------------ | ----------------------------------- | | **Verbose** | Most detailed tracing information | Deep troubleshooting | | **Debug** | Detailed diagnostic information | Development and troubleshooting | | **Information** | General informational messages | Normal operation (default) | | **Warning** | Potentially harmful situations | Issues that don't prevent operation | | **Error** | Error events that allow continuation | Operation failures | | **Fatal** | Severe errors causing termination | Fatal application errors | note The `--loglevel` parameter accepts `verbose`, `debug`, `information`, `warning` and `error`. `Fatal` can only be set through the `MinimumLevel` property of the settings file. ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastTransfer_Settings.json` file by modifying the `MinimumLevel` property: ``` { "Serilog": { "MinimumLevel": "Debug", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "path": "Logs\\FastTransfer_.json", "rollingInterval": "Day" } } ] } } ``` --- # Logging Overview ## Parameter Logs targets using FastTransfer\_Settings.json[​](#parameter-logs-targets-using-fasttransfer_settingsjson "Direct link to Parameter Logs targets using FastTransfer_Settings.json") FastTransfer can log information in 3 modes : * **[Console](/0.17/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/0.17/documentation/logging/log-database.md)** * **[File (or Map)](/0.17/documentation/logging/log-files-names-mapping-using-variables.md)** Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastTransfer_Settings.json` file. By default if no custom path is provided, FastTransfer looks for the settings file in : * the current directory (the working directory) * the same directory where the FastTransfer executable is located (the executable directory). If this file is not present, FastTransfer will use the console log only. You can specify a custom path to the settings file using the `--settingsfile` parameter. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --settingsfile "D:\logs\config\FastTransfer_Settings.json" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --query "select * from orders" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "None" \ --settingsfile "/etc/fasttransfer/FastTransfer_Settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/0.17/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` Expand-Archive -Path .\FastTransfer.zip -DestinationPath .\FastTransfer ``` You can verify the installation by checking the version: ``` .\FastTransfer.exe --version ``` To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` unzip FastTransfer.zip -d FastTransfer ``` On **Linux**, you need to give execution rights to the FastTransfer binary: ``` chmod +x FastTransfer ```
You can verify the installation by checking the version: ``` ./FastTransfer --version ``` FastTransfer is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)**. Pull the latest version: ``` docker pull arpeio/fasttransfer ``` Or pull a specific version: ``` docker pull arpeio/fasttransfer:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fasttransfer:latest --version ```
**You are now ready to run FastTransfer.** License Information After the trial period you will need a valid license. By default, FastTransfer will try to find a `FastTransfer.lic` file in the same directory as the executable. You can also provide another path, a URL, or even the license content using the `--license` parameter. ## Embedded Drivers[​](#embedded-drivers "Direct link to Embedded Drivers") The following database drivers are embedded in FastTransfer: | Database | Embedded Drivers | | ------------- | ---------------- | | Clickhouse | | | DuckDB | | | MS SQL Server | | | MySQL | | | Netezza | | | Oracle | | | PostgreSQL | | | SAP HANA | | | Teradata | | Warning If you need another database not in the list, you can use ODBC or OLEDB but you will need to install your ODBC or OLEDB drivers of your favorite database. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastTransfer can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: **Image:** `arpeio/fasttransfer:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastTransfer with Airflow, you need to install the Docker provider package: ``` pip install apache-airflow-providers-docker ``` Or add it to your Airflow requirements: ``` apache-airflow-providers-docker ``` ## Configure Airflow Connections[​](#configure-airflow-connections "Direct link to Configure Airflow Connections") Airflow connections allow you to securely store and manage credentials for external systems. FastTransfer integration requires connections for your source and target databases. ### A) Source Database Connection (MSSQL Example)[​](#a-source-database-connection-mssql-example "Direct link to A) Source Database Connection (MSSQL Example)") Create an MSSQL connection for your source database: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **ODBC** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `mssql_tpch10` (or your preferred name) * **Connection Type:** `ODBC` (select this from the dropdown) * **Host:** `192.168.65.254` (your database host) * **Port:** `11433` (your database port) * **Login:** Your database username (e.g., `FastLogin`) * **Password:** Your database password * **Extra:** `{"database":"tpch10"}` tip For ODBC connections, the database name should be specified in the Extra JSON field using `{"database":"your_database_name"}`. ### B) Target Database Connection (PostgreSQL Example)[​](#b-target-database-connection-postgresql-example "Direct link to B) Target Database Connection (PostgreSQL Example)") Create a PostgreSQL connection for your target database: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Postgres** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `pg_target` (or your preferred name) * **Connection Type:** `Postgres` (select this from the dropdown) * **Host:** `192.168.65.254` (your database host) * **Port:** `25433` (your database port) * **Schema:** `postgres` *(this is the database name)* * **Login:** `postgres` (your database username) * **Password:** Your database password tip For Postgres connections, the database name is specified in the **Schema** field. ## Integration with DockerOperator[​](#integration-with-dockeroperator "Direct link to Integration with DockerOperator") The [`DockerOperator`](https://airflow.apache.org/docs/apache-airflow-providers-docker/stable/operators.html) from the Docker provider allows you to execute FastTransfer commands in a Docker container directly from your Airflow DAGs. ### Complete DAG Example[​](#complete-dag-example "Direct link to Complete DAG Example") Create a DAG file (e.g., `fasttransfer_orders_mssql_to_pg.py`) in your Airflow DAGs folder: ``` from datetime import datetime from airflow import DAG from airflow.sdk.bases.hook import BaseHook from airflow.providers.docker.operators.docker import DockerOperator def _conn_parts(conn_id: str): """ Extract connection details from Airflow connection. Works with: - ODBC connections (for MSSQL): database in Extra JSON {"database":"name"} - Postgres connections: database in Schema field Returns: tuple: (host, port, user, password, database) """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # Database in Extra {"database": "..."} (for ODBC MSSQL) or in Schema (for Postgres) db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': database not found. Add it to Extra JSON " f'{{"database":"..."}} (for ODBC) or Schema field (for Postgres).' ) return host, port, user, pwd, db with DAG( dag_id="fasttransfer_orders_mssql_to_pg", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fasttransfer", "mssql", "postgres", "docker"], ) as dag: # Extract connection details mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _conn_parts("mssql_tpch10") pg_host, pg_port, pg_user, pg_pwd, pg_db = _conn_parts("pg_target") # FastTransfer Docker task transfer_task = DockerOperator( task_id="transfer_orders", image="arpeio/fasttransfer:latest", docker_url="tcp://host.docker.internal:2375", api_version="auto", auto_remove="success", mount_tmp_dir=False, # Avoids the remote-engine tmp mount warning do_xcom_push=False, command=[ "--sourceconnectiontype", "mssql", "--sourceserver", f"{mssql_host},{mssql_port}", "--sourcedatabase", mssql_db, "--sourceuser", mssql_user, "--sourcepassword", mssql_pwd, "--sourceschema", "dbo", "--sourcetable", "orders", "--targetconnectiontype", "pgcopy", "--targetserver", f"{pg_host}:{pg_port}", "--targetdatabase", pg_db, "--targetuser", pg_user, "--targetpassword", pg_pwd, "--targetschema", "public", "--targettable", "orders", "--loadmode", "Truncate", "--mapmethod", "Name", "--parallelmethod", "Ntile", "--degree", "12", "--distributekeycolumn", "o_orderkey", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastTransfer Docker image * `docker_url`: Docker daemon endpoint * `command`: List of FastTransfer CLI arguments * `auto_remove`: Automatically remove the container after successful execution * `mount_tmp_dir`: Set to `False` to avoid warnings with remote Docker daemons ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes a utility function to streamline connection management: #### `_conn_parts(conn_id)`[​](#_conn_partsconn_id "Direct link to _conn_partsconn_id") Extracts connection details from an Airflow connection. This function: * Retrieves host, port, username, and password from the connection * Extracts the database name from either the Extra JSON field (for ODBC connections) or the Schema field (for Postgres connections) * Returns all components needed to build the FastTransfer connection parameters * Validates that all required fields are present This approach ensures that credentials are managed centrally in Airflow and never hardcoded in DAG files. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Airflow and can be viewed in the Airflow UI: 1. Navigate to **DAGs** in the Airflow UI 2. Click on your DAG (e.g., `fasttransfer_orders_mssql_to_pg`) 3. Click on the task execution (green/red square in the Grid view) 4. Click the **Logs** tab ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") The logs provide detailed information about: * FastTransfer version and configuration * Source and target connection details (with masked passwords) * Data transfer progress * Performance metrics (rows/second, total time) * Exit status ``` [2026-03-02 15:51:45] INFO - Running docker container: arpeio/fasttransfer:latest [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.288 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8415ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.330 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000000 : 2999997 rows x 9 columns in 8458ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.349 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8476ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.442 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8569ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1702771 rows/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15324949 cells/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8809 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9135 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load [2026-03-02 15:51:54] INFO - Task instance in success state [2026-03-02 15:51:54] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 15:51:54] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastTransfer, a high-performance data transfer utility designed for data integration and automation workflows. ## Image Overview[​](#image-overview "Direct link to Image Overview") * **Base image**: `debian:trixie-slim` * **Entrypoint**: `/usr/local/bin/FastTransfer` * **Repository**: [arpe-io/FastTransfer-Image](https://github.com/arpe-io/FastTransfer-Image) * **DockerHub**: [arpeio/fasttransfer](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general) * **Updates**: Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * Optional: `FastTransfer_Settings.json` for custom logging configuration ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags**: Aligned with FastTransfer releases (e.g., `v0.15.0`) * **`latest` tag**: Always points to the most recent FastTransfer version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastTransfer versions are released * **Security updates**: The latest version of each minor branch is automatically rebuilt weekly (every Monday) with the latest base image and security patches ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fasttransfer:latest # Specific version docker pull arpeio/fasttransfer:v0.15.0 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fasttransfer:latest -? # Check version docker run --rm arpeio/fasttransfer:latest --version ``` ## License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.14.0, pass the license content directly via `--license "…"`: ``` export licenseContent=$(cat ./FastTransfer.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fasttransfer:latest \ --license "$licenseContent" \ [other parameters...] ``` Best Practice Prefer `--env-file`, Docker/Compose/Kubernetes secrets, or managed identities for cloud credentials. Avoid leaving the license content in shell history. ## Examples[​](#examples "Direct link to Examples") ### 1. SQL Server → SQL Server (Parallel DB-to-DB Transfer)[​](#1-sql-server--sql-server-parallel-db-to-db-transfer "Direct link to 1. SQL Server → SQL Server (Parallel DB-to-DB Transfer)") ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ arpeio/fasttransfer:latest \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "dest_db" \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "Ntile" \ --distributekeycolumn "id" \ --loadmode "Truncate" \ --degree 8 \ --license "$licenseContent" ``` ### 2. Import CSV Files to SQL Server in Parallel[​](#2-import-csv-files-to-sql-server-in-parallel "Direct link to 2. Import CSV Files to SQL Server in Parallel") ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ -v /local/data:/data \ arpeio/fasttransfer:latest \ --sourceconnectiontype "duckdbstream" \ --sourceserver ":memory:" \ --query "SELECT * FROM read_csv('/data/lineitem*.CSV')" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "tpch_test" \ --targetschema "dbo" \ --targettable "lineitem" \ --parallelmethod "Random" \ --distributekeycolumn "l_orderkey" \ --mapmethod "Name" \ --loadmode "Truncate" \ --degree 16 \ --license "$licenseContent" ``` ## Configuration[​](#configuration "Direct link to Configuration") ### Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` | Volume | Purpose | Access Mode | Notes | | --------- | ---------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | User-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory for file-based operations | Read-many/Write-many | Stores imported or exported data files | | `/work` | Temporary working directory (container WORKDIR) | Read-many/Write-many | Used internally for temporary processing | | `/logs` | Log output directory (per-run or aggregated logs) | Read-many/Write-many | Stores runtime and execution logs | ### Configuring FastTransfer Logging[​](#configuring-fasttransfer-logging "Direct link to Configuring FastTransfer Logging") Available from version 0.14.0 FastTransfer supports custom logging configuration through an external Serilog settings file in JSON format. #### Example: Logging to Console, Airflow, and Dynamic Log Files[​](#example-logging-to-console-airflow-and-dynamic-log-files "Direct link to Example: Logging to Console, Airflow, and Dynamic Log Files") ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context", "Serilog.Formatting.Compact" ], "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console", "applyThemeToRedirectedOutput": false } }, { "Name": "File", "Args": { "path": "/airflow/xcom/return.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" } }, { "Name": "Map", "Args": { "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/log-{filename}-{LogTimestamp}-{TraceId}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8" } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` note * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastTransfer automatically creates it. * The file `/airflow/xcom/return.json` is designed to provide run summaries compatible with Airflow's XCom mechanism. #### Available Tokens for Path or Filename Formatting[​](#available-tokens-for-path-or-filename-formatting "Direct link to Available Tokens for Path or Filename Formatting") | Token | Description | | ------------------ | -------------------------------------------- | | `{logdate}` | Current date in yyyy-MM-dd format | | `{logtimestamp}` | Full timestamp of the log entry | | `{sourcedatabase}` | Name of the source database | | `{sourceschema}` | Name of the source schema | | `{sourcetable}` | Name of the source table | | `{filename}` | Name of the file being processed | | `{runid}` | Run identifier provided in the command line | | `{traceid}` | Unique trace identifier generated at runtime | #### Mounting a Custom Settings File[​](#mounting-a-custom-settings-file "Direct link to Mounting a Custom Settings File") ``` # First, copy your config file to a volume location cp ~/FastTransfer_Settings.json /volumes/fasttransfer-config/ # Then run FastTransfer with mounted volumes docker run --rm \ -v fasttransfer-config:/config \ -v fasttransfer-logs:/logs \ arpeio/fasttransfer:latest \ --settingsfile "/config/FastTransfer_Settings.json" \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "pgcopy" \ --targetserver "host.docker.internal:5432" \ --targetuser "PgUser" \ --targetpassword "PgPass" \ --targetdatabase "pg_db" \ --targetschema "dbo" \ --targettable "orders" \ --degree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --license "$licenseContent" ``` --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastTransfer data migration workflows. FastTransfer can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: **Image:** `arpeio/fasttransfer:latest`
**Repository:** ## Integration Methods[​](#integration-methods "Direct link to Integration Methods") Kestra offers two primary methods to orchestrate FastTransfer execution: ### Method 1: Using Docker Run Plugin (Recommended)[​](#method-1-using-docker-run-plugin-recommended "Direct link to Method 1: Using Docker Run Plugin (Recommended)") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastTransfer commands in a Docker container. ``` id: fasttransfer_docker_kestra_v2 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - FastLogin - --sourcepassword - FastPassword - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - postgres - --targetpassword - postgres - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --parallelmethod - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastTransfer Docker image * `commands`: Array of FastTransfer CLI arguments ### Method 2: Using Shell Commands with Docker Task Runner[​](#method-2-using-shell-commands-with-docker-task-runner "Direct link to Method 2: Using Shell Commands with Docker Task Runner") Alternatively, you can use the [`io.kestra.plugin.scripts.shell.Commands`](https://kestra.io/plugins/plugin-script-shell/io.kestra.plugin.scripts.shell.commands) plugin with a Docker task runner: ``` id: fasttransfer_docker_kestra namespace: arpe.io tasks: - id: shell type: io.kestra.plugin.scripts.shell.Commands containerImage: arpeio/fasttransfer:latest taskRunner: type: io.kestra.plugin.scripts.runner.docker.Docker host: "tcp://host.docker.internal:2375" commands: - >- /usr/local/bin/FastTransfer --sourceconnectiontype mssql --sourceserver "192.168.65.254,11433" --sourcedatabase "tpch10" --sourceuser "FastLogin" --sourcepassword "FastPassword" --sourceschema "dbo" --sourcetable "orders" --targetconnectiontype pgcopy --targetserver "192.168.65.254:25433" --targetdatabase "postgres" --targetuser "postgres" --targetpassword "postgres" --targetschema "public" --targettable "orders" --loadmode Truncate --mapmethod Name --parallelmethod Ntile --degree 12 --distributekeycolumn "o_orderkey" --nobanner ``` This method allows you to execute shell commands within the FastTransfer Docker container, providing more flexibility for complex workflows. ## Securing Sensitive Data with Kestra Secrets[​](#securing-sensitive-data-with-kestra-secrets "Direct link to Securing Sensitive Data with Kestra Secrets") To protect sensitive information like passwords and connection strings, Kestra provides a built-in [secrets management](https://kestra.io/docs/concepts/secret) feature. You can store credentials securely and reference them in your flows using the `{{ secret('SECRET_NAME') }}` syntax. ### Creating Secrets in Kestra[​](#creating-secrets-in-kestra "Direct link to Creating Secrets in Kestra") To create secrets in Kestra: 1. Navigate to the Kestra UI 2. Go to **Tenant** → **Secrets** 3. Add your secrets with appropriate keys: * `FASTTRANSFER_MSSQL_USER` * `FASTTRANSFER_MSSQL_PASSWORD` * `FASTTRANSFER_PG_USER` * `FASTTRANSFER_PG_PASSWORD` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fasttransfer_docker_kestra_v3 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - "{{ secret('FASTTRANSFER_MSSQL_USER') }}" - --sourcepassword - "{{ secret('FASTTRANSFER_MSSQL_PASSWORD') }}" - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - "{{ secret('FASTTRANSFER_PG_USER') }}" - --targetpassword - "{{ secret('FASTTRANSFER_PG_PASSWORD') }}" - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --parallelmethod - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` This approach ensures that sensitive credentials are never exposed in your flow definitions and can be managed centrally. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Kestra and can be viewed directly in the Kestra UI. To access the logs: 1. Navigate to the Kestra UI 2. Go to **Executions** 3. Select your flow execution 4. Click on the **Logs** tab The logs provide detailed information about the transfer process, including configuration parameters, connection details, data transfer progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02 15:51:45.3752026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False 2026-03-02 15:51:45.3792026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit 2026-03-02 15:51:45.6342026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) 2026-03-02 15:51:45.8702026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms 2026-03-02 15:51:45.8722026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8842026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8912026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9002026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9112026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:54.2332026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms 2026-03-02 15:51:54.2382026-03-02T15:51:54.238 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8365ms 2026-03-02 15:51:54.2412026-03-02T15:51:54.241 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8368ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000004 : 3000001 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1766084 rows/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15894756 cells/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8494 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9142 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load 2026-03-02 15:51:54.448Command succeed with exit code 0 2026-03-02 15:51:54.450Container deleted: ca0de79e3eb4ede961668cb5080e4c20f858960c118d10731b8e0ade3ad87685 2026-03-02 15:51:54.455Volume deleted: a6b822d7677064a91d2dd555c360dc61ec49e3954149eacd5c22549c2a300850 ``` --- # PostgreSQL The **pg\_fasttransfer** extension allows you to run the FastTransfer tool directly from an SQL function, enabling fast data transfer between databases directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fasttransfer](https://github.com/arpe-io/pg_fasttransfer) * **License**: MIT * **Latest version**: v0.16.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fasttransfer Demo](/assets/images/pg_fasttransfer-830298c99dd0228e80b5337126bb0c7c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastTransfer commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get transfer statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastTransfer parameters ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * FastTransfer binaries installed on the system Important The PostgreSQL server process usually runs under the `postgres` user account. You must ensure that this user has the appropriate permissions to execute the `FastTransfer` binary and read the license file. ## Compatibility[​](#compatibility "Direct link to Compatibility") * Windows * Linux | PostgreSQL Version | Supported | | ------------------ | --------- | | PostgreSQL 18 | | | PostgreSQL 17 | | | PostgreSQL 16 | | | PostgreSQL 15 | | **Debian/Ubuntu 22.04 LTS** | PostgreSQL Version | Supported | | ------------------ | --------- | | PostgreSQL 18 | | | PostgreSQL 17 | | | PostgreSQL 16 | | | PostgreSQL 15 | | info Other distributions or PostgreSQL versions may work but have not been officially tested. ## Installation[​](#installation "Direct link to Installation") Download the Extension Download the appropriate release for your PostgreSQL version and operating system from the [pg\_fasttransfer releases page](https://github.com/arpe-io/pg_fasttransfer/releases). * Linux * Windows **Automated Installation** The easiest way to install the extension on Linux is by using the `install-linux.sh` script included in the archive. 1. Extract the contents of the archive into a folder. This folder should contain: * `pg_fasttransfer.so` * `pg_fasttransfer.control` * `pg_fasttransfer--1.0.sql` * `install-linux.sh` 2. Make the script executable: ``` chmod +x install-linux.sh ``` 3. Run the script with administrator privileges: ``` sudo ./install-linux.sh ``` The script will automatically detect your PostgreSQL installation and copy the files to the correct locations. **Manual Installation** If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service: ``` sudo systemctl stop postgresql ``` 2. Locate your PostgreSQL installation directory, typically: `/usr/lib/postgresql/` 3. Copy the files into the appropriate directories: ``` sudo cp pg_fasttransfer.so /usr/lib/postgresql//lib/ sudo cp pg_fasttransfer.control pg_fasttransfer--1.0.sql /usr/share/postgresql//extension/ ``` 4. Restart your PostgreSQL service: ``` sudo systemctl start postgresql ``` **Permissions Setup** Ensure the `postgres` user has proper permissions: ``` # Grant execute permission on the FastTransfer binary sudo chmod +x /path/to/FastTransfer sudo chown postgres:postgres /path/to/FastTransfer sudo chmod 750 /path/to/FastTransfer # Grant read permission on the license file sudo chown postgres:postgres /path/to/license.lic sudo chmod 640 /path/to/license.lic ``` **Automated Installation** 1. Extract the contents of the ZIP file into a folder. This folder should contain: * `pg_fasttransfer.dll` * `pg_fasttransfer.control` * `pg_fasttransfer--1.0.sql` * `install-win.bat` 2. Right-click on the `install-win.bat` file and select "Run as administrator" 3. The script will automatically detect your PostgreSQL installation and copy the files to the correct locations **Manual Installation** If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service 2. Locate your PostgreSQL installation folder, typically: ``` C:\Program Files\PostgreSQL\ ``` 3. Copy the `pg_fasttransfer.dll` file into the `lib` folder 4. Copy the `pg_fasttransfer.control` and `pg_fasttransfer--1.0.sql` files into the `share\extension` folder 5. Restart your PostgreSQL service **Permissions Setup** Make sure that the PostgreSQL service account (by default `NT AUTHORITY\NetworkService` or `postgres`) has: * Execute permission on the `FastTransfer.exe` binary * Read permission on the `.lic` file ## SQL Setup[​](#sql-setup "Direct link to SQL Setup") After the files are in place, you need to set up the extension in your database. ### Drop existing extension (if any)[​](#drop-existing-extension-if-any "Direct link to Drop existing extension (if any)") ``` DROP EXTENSION IF EXISTS pg_fasttransfer CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fasttransfer CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fasttransfer\_encrypt[​](#pg_fasttransfer_encrypt "Direct link to pg_fasttransfer_encrypt") This function encrypts a given text string using `pgp_sym_encrypt` and encodes the result in base64. It is useful for storing sensitive information, such as passwords, in a secure manner within your SQL scripts. The `xp_RunFastTransfer_secure` function will automatically decrypt any values passed to its `--sourcepassword` and `--targetpassword` arguments. **Syntax:** ``` pg_fasttransfer_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fasttransfer_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastTransfer\_secure[​](#xp_runfasttransfer_secure "Direct link to xp_RunFastTransfer_secure") This is the main function to execute the FastTransfer tool. It takes various parameters to configure the data transfer operation. Password arguments (`sourcepassword`, `targetpassword`) will be automatically decrypted. **Syntax:** ``` xp_RunFastTransfer_secure( sourceconnectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, sourcedsn text DEFAULT NULL, sourceprovider text DEFAULT NULL, sourceserver text DEFAULT NULL, sourceuser text DEFAULT NULL, sourcepassword text DEFAULT NULL, sourcetrusted boolean DEFAULT FALSE, sourcedatabase text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, query text DEFAULT NULL, fileinput text DEFAULT NULL, targetconnectiontype text DEFAULT NULL, targetconnectstring text DEFAULT NULL, targetserver text DEFAULT NULL, targetuser text DEFAULT NULL, targetpassword text DEFAULT NULL, targettrusted boolean DEFAULT FALSE, targetdatabase text DEFAULT NULL, targetschema text DEFAULT NULL, targettable text DEFAULT NULL, degree integer DEFAULT NULL, method text DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, loadmode text DEFAULT NULL, batchsize integer DEFAULT NULL, useworktables boolean DEFAULT FALSE, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, mapmethod text DEFAULT NULL, license text DEFAULT NULL, loglevel text DEFAULT NULL, nobanner boolean DEFAULT NULL, fasttransfer_path text DEFAULT NULL, debug boolean DEFAULT FALSE ) RETURNS TABLE ( exit_code integer, output text, error_message text, total_rows bigint, total_columns integer, transfer_time_ms bigint, total_time_ms bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to SQL Server[​](#linux-example---postgresql-to-sql-server "Direct link to Linux Example - PostgreSQL to SQL Server") Transfer data from PostgreSQL to SQL Server using the extension: ``` SELECT * FROM xp_RunFastTransfer_secure( targetconnectiontype := 'msbulk', sourceconnectiontype := 'pgsql', sourceserver := 'localhost:5432', sourceuser := 'postgres', sourcepassword := pg_fasttransfer_encrypt('MyActualPassword'), sourcedatabase := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', targetserver := 'localhost,1433', targetuser := 'migadmin', targetpassword := pg_fasttransfer_encrypt('AnotherSecurePassword'), targetdatabase := 'target_db', targetschema := 'tpch_1', targettable := 'orders', loadmode := 'Truncate', license := '/tmp/FastTransfer_linux-x64_v0.15.0/FastTransfer.lic', loglevel := 'information', nobanner := false, fasttransfer_path := '/tmp/FastTransfer_linux-x64_v0.15.0', debug := true ); ``` ### Windows Example - SQL Server to PostgreSQL[​](#windows-example---sql-server-to-postgresql "Direct link to Windows Example - SQL Server to PostgreSQL") Transfer data from SQL Server to PostgreSQL: ``` SELECT * FROM xp_RunFastTransfer_secure( sourceconnectiontype := 'mssql', sourceserver := 'localhost', sourcepassword := pg_fasttransfer_encrypt('MyWindowsPassword'), sourceuser := 'FastLogin', sourcedatabase := 'tpch10', sourceschema := 'dbo', sourcetable := 'orders', targetconnectiontype := 'pgcopy', targetserver := 'localhost:15433', targetuser := 'postgres', targetpassword := pg_fasttransfer_encrypt('MyPostgresPassword'), targetdatabase := 'postgres', targetschema := 'public', targettable := 'orders', method := 'Ntile', degree := 12, distributekeycolumn := 'o_orderkey', loadmode := 'Truncate', batchsize := 1048576, mapmethod := 'Position', loglevel := 'information', nobanner := true, fasttransfer_path := 'D:\sources\FastTransfer', debug := true ); ``` ## Function Return Structure[​](#function-return-structure "Direct link to Function Return Structure") The function returns a table with the following columns: | Column | Type | Description | | ------------------ | ------- | -------------------------------------------------------- | | `exit_code` | integer | The exit code of the FastTransfer process | | `output` | text | The full log output from FastTransfer (if debug is TRUE) | | `error_message` | text | Only the lines containing ERROR from the output | | `total_rows` | bigint | The total number of rows transferred | | `total_columns` | integer | The total number of columns transferred | | `transfer_time_ms` | bigint | Transfer time in milliseconds | | `total_time_ms` | bigint | Total execution time in milliseconds | ## Debug Parameter[​](#debug-parameter "Direct link to Debug Parameter") The `debug` parameter is a boolean flag that controls whether the full FastTransfer output is returned in the `output` column: * When `debug := true`, `output` contains the entire log from FastTransfer * When `debug := false` (default), `output` is an empty string, but `error_message` will still contain any error lines ## Resources[​](#resources "Direct link to Resources") * [pg\_fasttransfer GitHub Repository](https://github.com/arpe-io/pg_fasttransfer) * [FastTransfer Documentation](https://fasttransfer.arpe.io/) * [Get a Trial License](https://arpe.io/get-trial?product=FastTransfer) * [Report Issues](https://github.com/arpe-io/pg_fasttransfer/issues) --- # SQL Server The **FastWrappers-TSQL** project wraps FastTransfer (and FastBCP) in a CLR Assembly, allowing you to call them directly from T-SQL using extended stored procedures. This enables seamless data transfer operations without leaving your SQL Server environment. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [aetperf/FastWrappers-TSQL](https://github.com/aetperf/FastWrappers-TSQL) * **Latest version**: v0.7.0 * **Platforms**: Windows and Linux * **Compatibility**: SQL Server 2016+ info This wrapper includes both **FastTransfer** (for database-to-database transfers and file imports) and **FastBCP** (for database-to-file exports). This documentation focuses on the FastTransfer functionality. ## Features[​](#features "Direct link to Features") * **Native SQL Server Integration**: Execute FastTransfer commands directly from T-SQL * **Secure Password Management**: Built-in AES-256 encryption for sensitive credentials * **CLR Assembly Integration**: Runs as extended stored procedures * **Detailed Result Return**: Get transfer statistics and performance metrics as SQL results * **Flexible Configuration**: Support for all FastTransfer parameters and connection types * **Role-Based Security**: Predefined database roles for access control ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * SQL Server 2016 or later * CLR integration enabled * Valid FastTransfer binaries * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * Administrator privileges for initial setup Important The SQL Server service account must have read/execute permissions on the FastTransfer directory and binaries. ## Installation[​](#installation "Direct link to Installation") Download the latest release from the [Releases page](https://github.com/aetperf/FastWrappers-TSQL/releases). Choose the installation method based on your SQL Server version: ### Recommended Installation Methods[​](#recommended-installation-methods "Direct link to Recommended Installation Methods") 1. **[FastWrappers-TSQL.bak](https://github.com/aetperf/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.bak)** - SQL Server Backup file (**recommended for SQL Server 2019+** - restore using SSMS)
Requires manual CLR activation and trusted assembly configuration after restore 2. **[FastWrappers-TSQL.sql](https://github.com/aetpefl/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.sql)** - Pure SQL Script (**recommended for SQL Server 2016+** - all-in-one installation)
Complete installation in a single script - execute using sqlcmd or SSMS ### Post-Installation Configuration[​](#post-installation-configuration "Direct link to Post-Installation Configuration") info This section only applies to the **.bak** installation method. The **.sql** script includes all necessary configuration steps automatically. After restoring the database, you **must** configure CLR integration. Two options are available: * Trusted Assembly (Recommended) * TRUSTWORTHY ON (Dev/Test) This approach is **more secure** as it keeps TRUSTWORTHY OFF and doesn't require changing the database owner: ``` -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Extract the assembly hash and add it to trusted assemblies DECLARE @hash VARBINARY(64); SELECT @hash = HASHBYTES('SHA2_512', content) FROM sys.assembly_files WHERE assembly_id = ( SELECT assembly_id FROM sys.assemblies WHERE name = 'FastWrappers_TSQL' ); EXEC sys.sp_add_trusted_assembly @hash = @hash, @description = N'FastWrappers_TSQL Assembly v0.7.0'; GO ``` **Advantages:** * TRUSTWORTHY remains OFF (more secure) * No need to change database owner * Only this specific assembly is trusted tip The assembly hash changes with each version. When upgrading, remove the old hash first: ``` EXEC sys.sp_drop_trusted_assembly @hash = ; ``` This approach is simpler but **less secure**. Use only for development/testing environments: ``` -- Enable TRUSTWORTHY for signed UNSAFE assemblies ALTER DATABASE [FastWrappers-TSQL] SET TRUSTWORTHY ON; GO -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Set database owner to 'sa' (required for signed UNSAFE assemblies) EXEC sp_changedbowner 'sa'; GO ``` Critical The `sp_changedbowner 'sa'` command is **required**. Without it, you will encounter error 0x80FC80F1 when executing stored procedures. ## Security Roles[​](#security-roles "Direct link to Security Roles") ### FastTransfer\_Executor[​](#fasttransfer_executor "Direct link to FastTransfer_Executor") The FastWrappers-TSQL database includes a predefined database role that grants `EXECUTE` permission on the **xp\_RunFastTransfer\_secure** stored procedure. ``` -- Add a user to the role ALTER ROLE [FastTransfer_Executor] ADD MEMBER [YourUserName]; GO ``` tip Users also need access to the **dbo.EncryptString** function to generate encrypted passwords: ``` GRANT EXECUTE ON dbo.EncryptString TO [YourUserName]; GO ``` ## Available Functions[​](#available-functions "Direct link to Available Functions") ### dbo.EncryptString - Password Encryption[​](#dboencryptstring---password-encryption "Direct link to dbo.EncryptString - Password Encryption") Encrypts passwords using AES-256 encryption for secure storage and transmission. ``` SELECT dbo.EncryptString('YourPassword') ``` **Returns:** Base64-encoded encrypted string **Example:** ``` SELECT dbo.EncryptString('MySecretPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== ``` ### dbo.xp\_RunFastTransfer\_secure - Data Transfer[​](#dboxp_runfasttransfer_secure---data-transfer "Direct link to dbo.xp_RunFastTransfer_secure - Data Transfer") Wraps the FastTransfer CLI to transfer data between databases with streaming and parallel processing. **Example:** ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'D:\FastTransfer\', @sourceConnectionType = 'mssql', @sourceServer = 'localhost,11433', @sourceUser = 'FastLogin', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = 'tpch10', @sourceSchema = 'dbo', @sourceTable = 'orders', @targetConnectionType = 'pgcopy', @targetServer = 'localhost:25433', @targetUser = 'postgres', @targetPasswordSecure = 'RAAFe/XJ7O0P1I5T0rJhjQ==', @targetDatabase = 'postgres', @targetSchema = 'public', @targetTable = 'orders', @loadmode = 'Truncate', @method = 'Ntile', @distributeKeyColumn = 'o_orderkey', @degree = 12, @mapmethod = 'Name', @debug = 1, @noBanner = 0, @useWorkTables = 0, @loglevel = 'debug' ``` ## Output and Logging[​](#output-and-logging "Direct link to Output and Logging") ### Transfer Metrics[​](#transfer-metrics "Direct link to Transfer Metrics") The **xp\_RunFastTransfer\_secure** stored procedure returns a structured result set: | Column | Type | Description | | -------------- | ------------- | ----------------------------------------- | | targetdatabase | nvarchar(128) | Target database name | | targetSchema | nvarchar(128) | Target schema name | | targetTable | nvarchar(128) | Target table name | | TotalRows | bigint | Number of rows transferred | | TotalColumns | int | Number of columns transferred | | TotalCells | bigint | Total cells transferred (rows × columns) | | TotalTimeMs | bigint | Total execution time in milliseconds | | Status | int | Exit code (0 = success, non-zero = error) | | StdErr | nvarchar(max) | Error message if Status ≠ 0 | **Example output:** ``` targetdatabase targetSchema targetTable TotalRows TotalColumns TotalCells TotalTimeMs Status postgres public orders 15000000 9 135000000 27502 0 ``` ### Debug Mode[​](#debug-mode "Direct link to Debug Mode") Set `@debug = 1` to output additional information: * Complete command line being executed (passwords masked) * Full console output from FastTransfer * Real-time progress updates * Performance metrics ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest', -- ... other parameters ... @debug = 1 -- Enable verbose logging ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### SQL Server to SQL Server (12 threads)[​](#sql-server-to-sql-server-12-threads "Direct link to SQL Server to SQL Server (12 threads)") Transfer a table between two SQL Server instances using parallel processing: ``` -- First, encrypt your password SELECT dbo.EncryptString('YourPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== -- Then execute the transfer EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = N'mssql', @sourceServer = N'localhost', @sourceUser = N'FastUser', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = N'tpch_test', @sourceSchema = N'dbo', @sourceTable = N'orders', @targetConnectionType = N'msbulk', @targetServer = N'localhost\SS2025', @targetUser = N'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = N'tpch_test', @targetSchema = N'dbo', @targetTable = N'orders_copy', @loadMode = N'Truncate', @batchSize = 130000, @method = N'RangeId', @distributeKeyColumn = N'o_orderkey', @degree = 12, @mapmethod = 'Name', @runId = N'SQL_to_SQL_Parallel_Transfer'; ``` ### Oracle to SQL Server (12 threads)[​](#oracle-to-sql-server-12-threads "Direct link to Oracle to SQL Server (12 threads)") Transfer data from Oracle to SQL Server with parallel RangeId method: ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'oraodp', @sourceServer = 'oracle-server:1521/ORCL', @sourceUser = 'oracle_user', @sourcePasswordSecure = '', @sourceSchema = 'SALES', @sourceTable = 'ORDERS', @targetConnectionType = 'msbulk', @targetServer = 'localhost\SS2025', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'tpch_test', @targetSchema = 'dbo', @targetTable = 'orders_from_oracle', @loadMode = 'Truncate', @batchSize = 130000, @method = 'RangeId', @distributeKeyColumn = 'order_id', @degree = 12, @mapmethod = 'Name', @runId = 'Oracle_to_SQL_Transfer'; ``` ### PostgreSQL to SQL Server (8 threads)[​](#postgresql-to-sql-server-8-threads "Direct link to PostgreSQL to SQL Server (8 threads)") Use PostgreSQL's native Ctid method for optimal performance: ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'pgcopy', @sourceServer = 'postgres-server:5432', @sourceUser = 'postgres', @sourcePasswordSecure = '', @sourceDatabase = 'sales_db', @sourceSchema = 'public', @sourceTable = 'customers', @targetConnectionType = 'msbulk', @targetServer = 'localhost', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'crm', @targetSchema = 'dbo', @targetTable = 'customers', @loadMode = 'Append', @batchSize = 100000, @method = 'Ctid', @degree = 8, @mapmethod = 'Name', @runId = 'PG_to_SQL_Ctid'; ``` ## Additional Resources[​](#additional-resources "Direct link to Additional Resources") * [FastTransfer Documentation](/0.17/.md) * [GitHub Repository](https://github.com/aetperf/FastWrappers-TSQL) ## Support[​](#support "Direct link to Support") For issues or questions: * FastWrappers-TSQL: [GitHub Issues](https://github.com/aetperf/FastWrappers-TSQL/issues) * FastTransfer: [Contact ARPE Support](https://arpe.io/contact) --- # Release Notes 0.16 ## New Parameters[​](#new-parameters "Direct link to New Parameters") * Added the `--version` to display the version ## Other[​](#other "Direct link to Other") * Improve logging * Bump dependencies # Fixes * Sap HANA fix drivers inclusion for Linux See [Advanced Parameters](/0.17/documentation/cli/advanced_parameters.md) for complete details. ### Notes[​](#notes "Direct link to Notes") * v0.16.2 is the final release supporting .NET 7. ⚠️ Future versions will drop .NET 7 support, which may reduce operating system compatibility. --- # Release Notes 0.17 ## .NET Runtime Updates[​](#net-runtime-updates "Direct link to .NET Runtime Updates") * **Removed .NET 7 support** - FastTransfer no longer supports .NET 7 runtime * **Upgraded to .NET 10.0** - Migrated from .NET 8.0 to .NET 10.0 for improved performance and security ## New Features[​](#new-features "Direct link to New Features") ### Environment Variables[​](#environment-variables "Direct link to Environment Variables") FastTransfer 0.17 introduces support for environment variables to configure runtime behavior: #### FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES[​](#fasttransfer_loadsteptimeout_minutes "Direct link to FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES") Controls the bulk load timeout for `msbulk` and `orabulk` target connection types. * **Default**: 60 minutes * **Usage**: Set this variable to override the default timeout (in minutes) * **Example**: ``` # Windows set FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Linux export FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 ``` #### FASTTRANSFER\_SORTEDINPUT[​](#fasttransfer_sortedinput "Direct link to FASTTRANSFER_SORTEDINPUT") Forces the sorted hint for `msbulk` target connections, which can improve performance when data is already sorted by the clustered index. * **Values**: `true` or `false` * **Default**: `false` * **Usage**: Set to `true` to force sorted input mode, or `false` to disable it * **Example**: ``` # Windows set FASTTRANSFER_SORTEDINPUT=true # Linux export FASTTRANSFER_SORTEDINPUT=true ``` See [Environment Variables](/0.17/documentation/environment-variables/overview.md) for complete details. ## Other Improvements[​](#other-improvements "Direct link to Other Improvements") --- # Sitemap ## [Installation](/0.17/installation.md)[​](#installation "Direct link to installation") ## [Wizard GUI](/0.17/wizard.md)[​](#wizard-gui "Direct link to wizard-gui") ## Documentation[​](#documentation "Direct link to Documentation") * [Getting Started](/0.17/.md) * CLI * [Authentication](/0.17/documentation/cli/authentication.md) * [Source Connection Parameters](/0.17/documentation/cli/source_connection_parameters.md) * [Target Connection Parameters](/0.17/documentation/cli/target_connection_parameters.md) * [Transfer Parameters](/0.17/documentation/cli/transfer_parameters.md) * [Parallel Parameters](/0.17/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/0.17/documentation/cli/advanced_parameters.md) * [License](/0.17/documentation/cli/license.md) * Environment Variables * [Overview](/0.17/documentation/environment-variables/overview.md) * [FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES](/0.17/documentation/environment-variables/loadsteptimeout.md) * [FASTTRANSFER\_SORTEDINPUT](/0.17/documentation/environment-variables/sortedinput.md) * Logging * [Overview](/0.17/documentation/logging/Overview.md) * [Logs Level](/0.17/documentation/logging/logs-level.md) * [Log Database](/0.17/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/0.17/documentation/logging/log-files-names-mapping-using-variables.md) * [Examples](/0.17/documentation/logging/examples.md) * Examples * [SQL Server Examples](/0.17/documentation/examples/sql-server.md) * [PostgreSQL Examples](/0.17/documentation/examples/postgresql.md) * [MySQL Examples](/0.17/documentation/examples/mysql.md) * [Oracle Examples](/0.17/documentation/examples/oracle.md) * [Other Databases](/0.17/documentation/examples/other-databases.md) * [CSV Import](/0.17/documentation/examples/csv-import.md) * [JSON Import](/0.17/documentation/examples/json-import.md) * [Parquet Import](/0.17/documentation/examples/parquet-import.md) * [Advanced Scenarios](/0.17/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/0.17/documentation/compatibility/sources_platforms.md) * [Operating Systems](/0.17/documentation/compatibility/operating_systems.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/0.17/integration/docker-integration.md) * [Kestra](/0.17/integration/kestra-integration.md) * [PostgreSQL](/0.17/integration/postgresql-integration.md) * [SQL Server](/0.17/integration/sqlserver-integration.md) * [Airflow](/0.17/integration/airflow-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 0.17](/0.17/release-notes/release-notes-0.17.md) * [Release Notes 0.16](/0.17/release-notes/release-notes-0.16.md) --- # FastTransfer Command Wizard Transfer (DB to DB) Import Files (Files to DB) Expand All\[ ] ### Operating SystemWindows Windows ![Linux](/img/tux.svg)Linux ### Source Connection Parameterspgsql Connection Type ? : clickhouse duckdb duckdbstream hana msoledbsql mssql mysql nzcopy nzoledb nzsql odbc oledb oraodp pgcopy pgsql teradata | Server ? : | localhost | | ------------------ | ---------------------------------- | | Connect String ? : | Server=localhost;Database=mydb;... | | DSN ? : | | | Provider ? : | | | Database ? : | mydatabase | | Trusted ? : | \[ ] | | User ? : | username | | Password ? : | •••••••• | ### Target Connection Parametersmsbulk ### Transfer Parameters ### Parallel ParametersNone ### Advanced Parameters ### License ### Generated Command multi-line\[x] sharecopy ``` .\FastTransfer.exe ` --sourceconnectiontype pgsql ` --targetconnectiontype msbulk ` --loadmode Truncate ` --mapmethod Name ` --license "C:\MyFreeTrialLicense.lic" ``` --- # Getting Started with FastTransfer FastTransfer is a high-performance **high-performance data ingestion and transfer engine** that enables fast, parallel data movement between different database systems or from files to databases systems. If you haven't installed FastTransfer yet, please check the [Installation](/0.18/installation.md) section first. You can also build your first FastTransfer command using our interactive [Command Builder Wizard](/0.18/wizard.md). [FastTransfer Mini-Demo](https://www.youtube.com/embed/CL3031FWwqo) --- # FastTransfer Agent Skill arpe.io publishes official agent skills in the [arpe-io/arpeio-skills](https://github.com/arpe-io/arpeio-skills) GitHub repository. The [`fasttransfer`](https://github.com/arpe-io/arpeio-skills/tree/main/plugins/fasttransfer/skills/fasttransfer) skill teaches your AI agent how to build, explain and troubleshoot FastTransfer commands: which parameters exist, which source and target combinations work, which parallel method to choose, and which mistakes to avoid. The same repository also has skills for FastBCP, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. Skill or MCP server? The skill is a set of instructions: it teaches the agent how FastTransfer works, and the agent writes the command. The [arpe.io MCP server](/0.18/ai/mcp-server.md) gives the agent tools that build, validate and, if you allow it, run FastTransfer commands. The two work well together, so install both if your agent supports them. ## Claude Code[​](#claude-code "Direct link to Claude Code") Install the skill as a plugin from the arpe.io marketplace: ``` /plugin install fasttransfer --marketplace arpe-io/arpeio-skills ``` Or in two steps: ``` /plugin marketplace add arpe-io/arpeio-skills /plugin install fasttransfer@arpe-io ``` Then just ask, for example: *"Copy the PostgreSQL table public.orders to SQL Server with FastTransfer"*. To get the latest version of the skill later: ``` /plugin marketplace update arpe-io /plugin update fasttransfer@arpe-io ``` ## Other agents (Codex, Cursor, GitHub Copilot, Gemini CLI…)[​](#other-agents-codex-cursor-github-copilot-gemini-cli "Direct link to Other agents (Codex, Cursor, GitHub Copilot, Gemini CLI…)") Copy the skill folder into the directory your agent reads skills from: ``` git clone https://github.com/arpe-io/arpeio-skills.git cp -r arpeio-skills/plugins/fasttransfer/skills/fasttransfer / ``` For agents without skill support, paste the content of [`SKILL.md`](https://github.com/arpe-io/arpeio-skills/blob/main/plugins/fasttransfer/skills/fasttransfer/SKILL.md) as custom instructions. The files in its `references/` folder can be attached or pasted when needed. ## Product version[​](#product-version "Direct link to Product version") The skill states the FastTransfer version its facts were checked against. Before building a command, it asks the agent to check the installed version (`FastTransfer --version`) and to confirm against this documentation when the installed product is newer. ## Reporting issues[​](#reporting-issues "Direct link to Reporting issues") If the agent gets something wrong, open an issue at [github.com/arpe-io/arpeio-skills/issues](https://github.com/arpe-io/arpeio-skills/issues) with the FastTransfer version, the prompt you gave, and the command the agent produced (with passwords and licence text removed). --- # FastTransfer MCP Server The [arpe.io MCP server](https://github.com/arpe-io/arpeio-mcp) (`arpeio-mcp`) gives AI assistants a set of tools for the arpe.io products: FastBCP, FastTransfer, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. [MCP](https://modelcontextprotocol.io) (Model Context Protocol) is the open standard that Claude, ChatGPT, Cursor, VS Code and most other assistants use to call external tools. For FastTransfer, the assistant can ask the server to validate a set of parameters and render the exact FastTransfer command, look up what FastTransfer supports, read the release notes and search this documentation. If FastTransfer is installed on your machine, it can also run the command. The server runs in one of two modes: * **Command builder**, the default. The tools build, validate and explain commands; no FastTransfer binary is needed. The hosted server works this way, so it never connects to your databases. * **Execution**. When you install the server on your own machine and point it at your FastTransfer binary, the assistant can also run the command it built, once you confirm it. MCP server or agent skill? The MCP server gives the assistant tools to call. The [agent skill](/0.18/ai/agent-skills.md) is a set of instructions that teaches it how the product works. The two work well together, so install both if your assistant supports them. ## Connect your assistant[​](#connect-your-assistant "Direct link to Connect your assistant") arpe.io hosts the server, so there is nothing to install. Add this URL to your assistant: ``` https://arpe-io-arpeio-mcp.hf.space/sse ``` * Claude Code * Claude Desktop * ChatGPT * Cursor * VS Code (Copilot) * Gemini CLI * Windsurf * Le Chat (Mistral) ``` claude mcp add --transport sse arpeio https://arpe-io-arpeio-mcp.hf.space/sse ``` Add the server to your Claude Desktop configuration file: * **Linux**: `~/.config/Claude/claude_desktop_config.json` * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` ``` { "mcpServers": { "arpeio": { "command": "npx", "args": [ "mcp-remote", "https://arpe-io-arpeio-mcp.hf.space/sse" ] } } } ``` Custom connectors need a paid plan (Plus, Pro, Team or Enterprise). 1. Open ChatGPT in your browser, go to **Settings** > **Apps and connectors**. 2. Open **Advanced settings** and enable **Developer mode**. 3. Go to **Connectors** > **Browse connectors** > **Add a new connector**. 4. Set the URL to `https://arpe-io-arpeio-mcp.hf.space/sse` and save. Open Cursor Settings, search for "MCP" and add a server with this configuration: ``` { "mcpServers": { "arpeio": { "url": "https://arpe-io-arpeio-mcp.hf.space/sse" } } } ``` Run **MCP: Open User Configuration** from the Command Palette and add: ``` { "servers": { "arpeio": { "url": "https://arpe-io-arpeio-mcp.hf.space/sse", "type": "sse" } } } ``` Add the server to `~/.gemini/settings.json`: ``` { "mcpServers": { "arpeio": { "uri": "https://arpe-io-arpeio-mcp.hf.space/sse" } } } ``` Add the server to `~/.codeium/windsurf/mcp_config.json` (Windows: `%USERPROFILE%\.codeium\windsurf\mcp_config.json`): ``` { "mcpServers": { "arpeio": { "command": "npx", "args": [ "-y", "mcp-remote", "https://arpe-io-arpeio-mcp.hf.space/sse" ] } } } ``` Available on all plans, including the free one. 1. Go to **Intelligence** > **Connectors**. 2. Click **Add connector** > **Custom MCP Connector**. 3. Set the name to `Arpe.io` and the URL to `https://arpe-io-arpeio-mcp.hf.space/sse`. 4. Leave authentication disabled and click **Create**. Instructions for HuggingChat and Kiro are in the [server README](https://github.com/arpe-io/arpeio-mcp#connect-your-ai-assistant). ## Run FastTransfer from the assistant[​](#run-fasttransfer-from-the-assistant "Direct link to Run FastTransfer from the assistant") To let the assistant run FastTransfer, install the server on the machine where FastTransfer is installed (Python 3.10 or later): ``` pip install arpeio-mcp ``` Then register the `arpeio-mcp` command instead of the hosted URL, with the path to your binary. In Claude Code: ``` claude mcp add --transport stdio --env FASTTRANSFER_PATH=/path/to/FastTransfer arpeio -- arpeio-mcp ``` In Claude Desktop, and in other clients that use the `mcpServers` format: ``` { "mcpServers": { "arpeio": { "command": "arpeio-mcp", "env": { "FASTTRANSFER_PATH": "/path/to/FastTransfer" } } } } ``` | Variable | Description | | ---------------------- | ----------------------------------------------------------------------------- | | `FASTTRANSFER_PATH` | Path to the FastTransfer binary. Without it, the server only builds commands. | | `FASTTRANSFER_TIMEOUT` | Execution timeout, in seconds. Optional. | | `FASTTRANSFER_LOG_DIR` | Directory for the execution logs. Optional. | | `LOG_LEVEL` | Server log level: `DEBUG`, `INFO` (default), `WARNING` or `ERROR`. | ## Tools[​](#tools "Direct link to Tools") | Tool | What it does | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `fasttransfer_info` | Reference information, picked with `action`: supported source/target combinations, parallel methods, workflow tips, version detection. | | `fasttransfer_preview_transfer` | Validates the parameters and renders the FastTransfer command. When no parallel method is given, it suggests one. | | `fasttransfer_execute_transfer` | Runs the previewed command. Needs a local FastTransfer binary and `confirmation: true`. | Tools shared by all arpe.io products: | Tool | What it does | | -------------------- | ------------------------------------------------------------------------------------------------------- | | `arpe_quick_start` | Picks the right arpe.io product for a use case described in plain English and returns a workflow guide. | | `arpe_get_status` | Shows which arpe.io binaries the server can run, and which are in command-builder mode only. | | `arpe_release_notes` | Returns release notes for a product, or for one version. | | `search_docs` | Full-text search over the arpe.io documentation sites, this one included, and the arpe.io blog. | ## How a request flows[​](#how-a-request-flows "Direct link to How a request flows") 1. You describe what you want, for example: *"Copy the public.orders table from PostgreSQL to SQL Server, in parallel on the order\_id column"*. 2. The assistant calls `fasttransfer_preview_transfer`. The tool checks the parameters and returns the FastTransfer command, an explanation, and warnings when an option does not exist in the FastTransfer version you run. 3. You review the command. Passwords are masked in the displayed version. 4. If execution is enabled, the assistant calls `fasttransfer_execute_transfer`. The tool refuses to run unless the call carries `confirmation: true`, and it returns the exit code, the output and a diagnosis of known errors. Most clients also ask for your approval before each tool call. ## Prompts and resources[​](#prompts-and-resources "Direct link to Prompts and resources") Clients that support MCP prompts (Claude Desktop, Cursor and others) list conversation starters: `transfer-data` for FastTransfer, and `troubleshoot` to explain a failed run from its error message. The server also exposes the FastTransfer capability matrix as the MCP resource `arpeio://capabilities/fasttransfer-combinations`. ## Reporting issues[​](#reporting-issues "Direct link to Reporting issues") If a tool returns a wrong command or wrong information, open an issue at [github.com/arpe-io/arpeio-mcp/issues](https://github.com/arpe-io/arpeio-mcp/issues) with the prompt you gave and the tool output (with passwords and licence text removed). --- # Advanced Parameters This section covers advanced configuration options for FastTransfer, including tracing, logging, and display settings. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter allows you to specify a custom identifier for tracing the transfer process. This is useful for correlating logs and tracking operations across systems. **Example:** ``` ./FastTransfer \ ... --runid "transfer-2024-01-15-001" \ ... ``` **Syntax:** * Long form: `--runid "RunSpanID"` **Default Value:** A random GUID is generated if not specified. Tracing Use a meaningful Run ID to make it easier to search logs and trace specific transfer operations, especially in production environments or when running multiple transfers. ## Settings File[​](#settings-file "Direct link to Settings File") Specify a custom settings file for logging and other configuration options. This allows you to use different configuration profiles for different environments or scenarios. **Example:** ``` ./FastTransfer \ ... --settingsfile "config/production-settings.json" \ ... ``` **Syntax:** * Long form: `--settingsfile "file_path"` **Default Value:** `FastTransfer_Settings.json` in the same folder as the executable. Configuration File The settings file contains logging configuration, connection settings, and other advanced options. You can maintain separate configuration files for development, staging, and production environments. ## Log Level[​](#log-level "Direct link to Log Level") Override the log level defined in the settings file. This is useful for temporary debugging or troubleshooting without modifying the settings file. **Example:** ``` ./FastTransfer \ ... --loglevel debug \ ... ``` **Syntax:** * Long form: `--loglevel "level"` **Allowed Values:** | Log Level | Description | | ------------- | --------------------------------------------------- | | `verbose` | Most detailed tracing information | | `debug` | Detailed debugging information | | `information` | General informational messages (default) | | `warning` | Warning messages for potentially harmful situations | | `error` | Error messages for failures | **Default Value:** `information` Debugging Use `--loglevel debug` when troubleshooting issues to get the most detailed logging output. Remember to switch back to `information` or `warning` for production use to avoid excessive log volume. ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastTransfer banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastTransfer \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastTransfer from scripts or CI/CD pipelines where you want to minimize console output or parse the results programmatically. ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using advanced parameters: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "sales" ` --query "select * from sales where order_date >= '2024-01-01'" ` --runid "daily-sales-sync-2024-01-15" ` --settingsfile "config/production-settings.json" ` --loglevel information ` --nobanner ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "sales" \ --query "select * from sales where order_date >= '2024-01-01'" \ --runid "daily-sales-sync-2024-01-15" \ --settingsfile "config/production-settings.json" \ --loglevel information \ --nobanner ``` This example: * Uses a custom Run ID for tracing * Loads configuration from a custom settings file * Sets the log level to information * Disables the banner for cleaner output --- # Authentication FastTransfer supports two types of authentication methods depending on your database platform. Authentication can be configured separately for source and target databases. ## Source Authentication[​](#source-authentication "Direct link to Source Authentication") ### Trusted Connection (Source)[​](#trusted-connection-source "Direct link to Trusted Connection (Source)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --sourcetrusted ` ... ``` **Syntax:** * Long form: `--sourcetrusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### SQL Login with Username and Password (Source)[​](#sql-login-with-username-and-password-source "Direct link to SQL Login with Username and Password (Source)") Standard database authentication with explicit credentials for the source database. ``` ./FastTransfer ` ... --sourceuser "myuser" ` --sourcepassword "mypassword" ` ... ``` **Syntax:** * Username: `-u "username"` or `--sourceuser "username"` * Password: `-x "password"` or `--sourcepassword "password"` ## Target Authentication[​](#target-authentication "Direct link to Target Authentication") ### Trusted Connection (Target)[​](#trusted-connection-target "Direct link to Trusted Connection (Target)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --targettrusted ` ... ``` **Syntax:** * Long form: `--targettrusted` ### SQL Login with Username and Password (Target)[​](#sql-login-with-username-and-password-target "Direct link to SQL Login with Username and Password (Target)") Standard database authentication with explicit credentials for the target database. ``` ./FastTransfer ` ... --targetuser "myuser" ` --targetpassword "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--targetuser "username"` * Password: `-X "password"` or `--targetpassword "password"` ## Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use connection string parameters where you pass the user and password directly in the connection string: * `--sourceconnectstring` for source database connection - see [Source Connection Parameters](/0.18/documentation/cli/source_connection_parameters.md) * `--targetconnectstring` for target database connection - see [Target Connection Parameters](/0.18/documentation/cli/target_connection_parameters.md) Password Security in Logs All passwords passed either through the `--sourcepassword`, `--targetpassword` parameters or within the `--sourceconnectstring`, `--targetconnectstring` parameters are automatically hidden in all logs (Console, Files, and Database). This ensures your credentials remain secure in logging outputs. Tips For Login/Password you can also use the environment variables like FastTransfer\_SOURCEUSER and FastTransfer\_SOURCEPASSWORD for example or store the password in an encrypted file. Up to you to decrypt the file and its content before using it in a shell variable that will be used with FastTransfer. --- # License Configure how FastTransfer retrieves and uses its license file. ## License Parameter[​](#license-parameter "Direct link to License Parameter") Use the `--license` parameter to specify the location or content of your FastTransfer license. By default, FastTransfer will try to use the license file named `FastTransfer.lic` in the same directory as the FastTransfer executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastTransfer supports multiple ways to provide a license: #### 1. File Path[​](#1-file-path "Direct link to 1. File Path") Specify a custom license file path: * Windows * Linux ``` .\FastTransfer.exe ` ... --license "C:\licenses\FastTransfer.lic" ` ... ``` ``` ./FastTransfer \ ... --license "/path/to/licenses/FastTransfer.lic" \ ... ``` #### 2. HTTP(S) Endpoint[​](#2-https-endpoint "Direct link to 2. HTTP(S) Endpoint") Retrieve the license from a remote URL where you put the license content and distribute it using https : * Windows * Linux ``` .\FastTransfer.exe ` ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" ` ... ``` ``` ./FastTransfer \ ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" \ ... ``` #### 3. License Content (Inline)[​](#3-license-content-inline "Direct link to 3. License Content (Inline)") Provide the license content directly. Using a variable or environment variable is recommended. Usefull for Docker or Lambda deployment: * Windows * Linux ``` # Using environment variable $env:FastTransfer_LICENSE = "LICENSE_CONTENT_HERE" .\FastTransfer.exe ` ... --license $env:FastTransfer_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastTransfer.lic" -Raw .\FastTransfer.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FastTransfer_LICENSE="LICENSE_CONTENT_HERE" ./FastTransfer \ ... --license "$FastTransfer_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastTransfer.lic) ./FastTransfer \ ... --license "$license" \ ... ``` **Syntax:** * Long form only: `--license ""` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using a license from a remote server with a database transfer: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" ` --parallelmethod DataDriven ` --distributekeycolumn "EXTRACT(MONTH FROM order_date)" ` --degree 4 ` --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` ``` ./FastTransfer \ --sourceconnectiontype "pgsql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourceuser "FastUser" \ --sourcepassword "FastPassword" \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" \ --parallelmethod DataDriven \ --distributekeycolumn "EXTRACT(MONTH FROM order_date)" \ --degree 4 \ --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` This example: * Retrieves the license from a remote UNC path * Connects to a PostgreSQL source database * Transfers data to a SQL Server target using bulk insert * Uses DataDriven parallel method with 4 threads, one chunk per month of `order_date` * Filters orders from 2024 onwards --- # Parallel Parameters FastTransfer can parallelize data export to significantly improve performance. This section covers the parameters that control parallel execution. ## Parallel Method[​](#parallel-method "Direct link to Parallel Method") Use the `--parallelmethod` parameter to specify how data will be split across parallel threads. * Windows * Linux ``` .\FastTransfer.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastTransfer \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Long form: `--parallelmethod ` ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallelism. **DataDriven** - Use the distinct values of the `--distributekeycolumn` (which can be a column or an expression), or the values returned by `--datadrivenquery`, to distribute data. `--distributekeycolumn` is required. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ctid** - Recommended and exclusive for PostgreSQL and PostgreSQL compatible databases. Use the Ctid pseudo column (for pgsql and pgcopy source only). Requires `--sourceschema` and `--sourcetable`, even if a `--query` is used. note Ctid parallel method is for PostgreSQL databases only. **Physloc** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the Physloc range. note Physloc parallel method is for SQL Server databases only. **Random** - Use a modulo on the `--distributekeycolumn` to distribute data. **Rowid** - For Oracle sources only: use rowid slices. Requires `--sourceschema` and `--sourcetable`, even if a `--query` is used. note Rowid parallel method is for Oracle databases only. **RangeId** - Use a numeric range to distribute data (useful with an identity column or sequence without gaps. The column must be numerical). **Ntile** - Use the ntile function to distribute data evenly. Data can be numerical, date, datetime or string. **NZDataSlice** - Netezza source only. Use the data slices to distribute data retrieval. Requires `--sourceschema` and `--sourcetable`, even if a `--query` is used. note NZDataSlice parallel method is for Netezza databases only. **DBPartition** - Use the native partitions of the source table: one transfer per partition, biggest partitions first. Requires `--sourceschema` and `--sourcetable`; `--query` and `--fileinput` are not allowed, and no `--distributekeycolumn` is needed. See [DBPartition](#dbpartition) below. note DBPartition supports SQL Server (`mssql`, `msoledbsql`), PostgreSQL (`pgsql`, `pgcopy`), Oracle (`oraodp`), MySQL (`mysql`) and Teradata (`teradata`, row partitioning only) sources. If the table is not partitioned, has a single partition, or the source type is not supported, FastTransfer logs a warning and falls back to `None`. **Timepartition** - Split the data on the time parts of a date column: one transfer per year, month, day or ISO week. `--distributekeycolumn` uses a tuple such as `"(order_date,year,month)"`. Works with a source table or a `--query`. See [Timepartition](#timepartition) below. ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | --------------- | -------- | ------------------------ | ----------------------------------------------- | | `None` | | | Any | | `DataDriven` | | | Any | | `Ctid` | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` | | | SQL Server (mssql) | | `Random` | | | Any | | `Rowid` | | | Oracle (oraodp) | | `RangeId` | | | Any | | `Ntile` | | | Any | | `NZDataSlice` | | | Netezza | | `DBPartition` | | | SQL Server, PostgreSQL, Oracle, MySQL, Teradata | | `Timepartition` | | (date tuple) | Any | **Default Value:** `None` When to Use Parallelism If you want to use a parallel export/import use other than None. Try to use Parallelism only if you have a large amount of data to transfer (more than 1M cells). ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastTransfer will use SQL queries that run in parallel against the source. Each query will have a WHERE clause that retrieves a part of the total data. Information This parameter is mandatory when using methods that require a distributed column: Random, DataDriven, RangeId, Ntile or Timepartition. FastTransfer stops with an error if it is missing. Timepartition With the `Timepartition` method, `--distributekeycolumn` is a tuple made of a date column and time parts: `"(order_date,year)"`, `"(order_date,year,month)"`, `"(order_date,year,month,day)"` or `"(order_date,year,week)"`. See [Timepartition](#timepartition). * Windows * Linux ``` # Using a column name .\FastTransfer.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastTransfer.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastTransfer \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastTransfer \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `--degree` parameter to control how many parallel threads will be used for the export. ### DOP Values[​](#dop-values "Direct link to DOP Values") **Positive value (e.g., 4)** - Uses exactly that number of parallel threads. If greater than twice the number of CPU cores/threads, it will be downscaled to the number of available cores. **0** - Automatically aligns with the number of cores (or threads if Hyper-Threading is enabled) on the machine. **Negative value (e.g., -2)** - Computed as `number of cores / abs(dop)`. For example, if you have 16 cores and set DOP to -2, the actual DOP will be 8. * Windows * Linux ``` # Use 8 parallel threads .\FastTransfer.exe ` ... --degree 8 ` ... # Auto-detect based on CPU cores .\FastTransfer.exe ` ... --degree 0 ` ... # Use half of available cores .\FastTransfer.exe ` ... --degree -2 ` ... ``` ``` # Use 8 parallel threads ./FastTransfer \ ... --degree 8 \ ... # Auto-detect based on CPU cores ./FastTransfer \ ... --degree 0 \ ... # Use half of available cores ./FastTransfer \ ... --degree -2 \ ... ``` **Syntax:** * Long form: `--degree ` **Default:** `-4` ## Data Driven Query[​](#data-driven-query "Direct link to Data Driven Query") Use the `--datadrivenquery` parameter when using the DataDriven method to provide a query that returns the list of values that will be used to split the data. This allows you to filter the values that will be exported and used to split the data. * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Long form: `--datadrivenquery ""` ## DBPartition[​](#dbpartition "Direct link to DBPartition") The `DBPartition` method reads the partitions of the source table from the database catalog and transfers each partition in its own stream. The biggest partitions are transferred first, so the parallel threads stay busy until the end. How each partition is read depends on the source: | Source | Partitions used | How a partition is read | | ---------------------------------- | ----------------------------------------- | ----------------------------------------------- | | SQL Server (`mssql`, `msoledbsql`) | Partitions of the partition scheme | `WHERE $PARTITION.() = n` | | PostgreSQL (`pgsql`, `pgcopy`) | Leaf partitions (sub-partitions included) | The leaf table is read directly | | Oracle (`oraodp`) | Partitions and sub-partitions | `PARTITION (...)` / `SUBPARTITION (...)` clause | | MySQL (`mysql`) | Partitions and sub-partitions | `PARTITION (...)` clause | | Teradata (`teradata`) | Populated row partitions (PPI / MLPPI) | `WHERE PARTITION = n` | * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --sourceschema "dbo" ` --sourcetable "lineitem_part" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "mypassword" ` --targetdatabase "tpch" ` --parallelmethod "DBPartition" ` --degree 8 ` --targetschema "public" ` --targettable "lineitem" ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --sourceschema "dbo" \ --sourcetable "lineitem_part" \ --targetconnectiontype "pgcopy" \ --targetserver "localhost:5432" \ --targetuser "postgres" \ --targetpassword "mypassword" \ --targetdatabase "tpch" \ --parallelmethod "DBPartition" \ --degree 8 \ --targetschema "public" \ --targettable "lineitem" \ --loadmode "Truncate" ``` This example transfers a SQL Server table partitioned by month on `l_shipdate`: each monthly partition is loaded into PostgreSQL by one of the 8 parallel threads. tip DBPartition works best when the source partitions have similar sizes. If the table is not partitioned, FastTransfer falls back to `None` (a single stream): use another method, such as `Timepartition` or `Ntile`, instead. ## Timepartition[​](#timepartition "Direct link to Timepartition") The `Timepartition` method splits the data on the time parts of a date column. FastTransfer first runs a query that groups the source by these time parts and counts the rows of each group. Then it transfers each group in its own stream, biggest first. `--distributekeycolumn` is a tuple made of the date column and the time parts: | Tuple | One stream per | | ------------------------------ | -------------- | | `(date_column,year)` | Year | | `(date_column,year,month)` | Month | | `(date_column,year,month,day)` | Day | | `(date_column,year,week)` | ISO week | * The source can be a table (`--sourceschema` / `--sourcetable`) or a `--query`. With a query, the date column must be in the query output. * Rows with a NULL date are transferred in a dedicated stream. * The date bounds are sent to the source in the `yyyy-MM-dd` format. If your source needs `yyyyMMdd`, use the [FASTTRANSFER\_DATEFORMAT](/0.18/documentation/environment-variables/dateformat.md) environment variable. - Windows - Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "mypassword" ` --targetdatabase "tpch" ` --query "SELECT * FROM dbo.lineitem WHERE l_shipmode = 'AIR'" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(l_shipdate,year,month)" ` --degree 8 ` --targetschema "public" ` --targettable "lineitem_air" ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "pgcopy" \ --targetserver "localhost:5432" \ --targetuser "postgres" \ --targetpassword "mypassword" \ --targetdatabase "tpch" \ --query "SELECT * FROM dbo.lineitem WHERE l_shipmode = 'AIR'" \ --parallelmethod "Timepartition" \ --distributekeycolumn "(l_shipdate,year,month)" \ --degree 8 \ --targetschema "public" \ --targettable "lineitem_air" \ --loadmode "Truncate" ``` This example transfers the `AIR` shipments month by month, with 8 parallel threads. Choosing the granularity Pick a granularity that gives several times more groups than the degree of parallelism, but not tens of thousands of small groups. For 7 years of data, `(col,year,month)` gives about 84 streams, which is a good fit for 8 to 16 threads. ## SQL Server target and sorted hint[​](#sql-server-target-and-sorted-hint "Direct link to SQL Server target and sorted hint") With a partitioned SQL Server target (`msbulk`), the `DataDriven`, `DBPartition` and `Timepartition` methods send a sorted hint on the target partition column to the bulk copy. This hint is not sent when the target table has a rowstore clustered index: SQL Server would check the order of the rows and reject the load. Set [FASTTRANSFER\_SORTEDINPUT](/0.18/documentation/environment-variables/sortedinput.md) to `true` to force the hint when your source data is really sorted. ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "select * from orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_ordermonth" ` --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" ` --degree 10 ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "select * from orders" \ --parallelmethod "DataDriven" \ --distributekeycolumn "o_ordermonth" \ --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" \ --degree 10 ``` This example: * Connects to a SQL Server source database on localhost * Transfers data to a SQL Server target database using BulkCopy * Uses trusted authentication for both source and target * Executes a custom query on the orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date (o\_ordermonth column) * Uses a custom query to generate month values (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even though there are 12 months to export) --- # Source Connection Parameters FastTransfer requires connection information to access your source database where data will be extracted. This page covers all source connection-related parameters. ## Source Connection Type[​](#source-connection-type "Direct link to Source Connection Type") Specify the type of source database connection driver to use. This parameter determines how FastTransfer connects to your source database. ``` ./FastTransfer \ ... --sourceconnectiontype mssql \ ... ``` **Syntax:** * Long form: `--sourceconnectiontype "connection_type"` **Available Source Connection Types:** | Connection Type | Description | | --------------- | ---------------------------------------------- | | `clickhouse` | ClickHouse | | `duckdb` | DuckDB | | `duckdbstream` | DuckDB using streaming (more memory efficient) | | `hana` | SAP HANA (.net driver) | | `msoledbsql` | SQL Server OleDB | | `mssql` | SQL Server Native Client (.Net) | | `mysql` | MySQL | | `nzoledb` | Netezza OleDB | | `nzsql` | Netezza Native (.net driver) | | `odbc` | ODBC datasource (DSN must be configured) | | `oledb` | Generic OleDB datasource | | `oraodp` | Oracle ODP.Net | | `pgcopy` | PostgreSQL Copy | | `pgsql` | PostgreSQL Native (.Net) | | `teradata` | Teradata (.Net) | ## Source DSN (Data Source Name)[​](#source-dsn-data-source-name "Direct link to Source DSN (Data Source Name)") If you have chosen an ODBC connection type for the source, you must define the DSN with the `--sourcedsn` parameter, or alternatively define a connection string using `--sourceconnectstring`. ``` ./FastTransfer \ ... --sourceconnectiontype odbc \ --sourcedsn "MySourceODBCDataSource" \ ... ``` **Syntax:** * Long form: `--sourcedsn "DSN_name"` ## Source Provider[​](#source-provider "Direct link to Source Provider") If you have chosen an OLEDB connection type for the source, you must define the OLEDB provider with the `--sourceprovider` parameter. ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider MSOLEDBSQL \ ... ``` ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider NZOLEDB \ ... ``` **Syntax:** * Long form: `--sourceprovider "provider_name"` ## Source Server[​](#source-server "Direct link to Source Server") Except if you have defined a source connection string, you must define a source server (or could also be a TNS entry for Oracle). **Syntax:** * Long form: `--sourceserver "server"` ### Source Server Format Examples[​](#source-server-format-examples "Direct link to Source Server Format Examples") The source server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:2433" \ ... ``` or ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:1521/myinstance" \ ... ``` **For Oracle - TNS entry:** ``` ./FastTransfer \ ... --sourceserver "MYTNS" \ ... ``` ## Source Connection String[​](#source-connection-string "Direct link to Source Connection String") Tips You can use a connection string to define the connection to the source database. This connection string will override any other connection parameters and can be used if the other authentication modes are not enough for your case. You can use the connection string for any source connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastTransfer \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Long form: `--sourceconnectstring "connection_string"` Password Security in Logs All passwords within the `--sourceconnectstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Source Database[​](#source-database "Direct link to Source Database") Define the source database name. **Example:** ``` ./FastTransfer \ ... --sourcedatabase "AdventureWorks" \ ... ``` **Syntax:** * Long form: `--sourcedatabase "database_name"` --- # Target Connection Parameters FastTransfer requires connection information to access your target database where data will be transferred. This page covers all target connection-related parameters. ## Target Connection Type[​](#target-connection-type "Direct link to Target Connection Type") Specify the type of target database connection driver to use. This parameter determines how FastTransfer connects to your target database. ``` ./FastTransfer \ ... --targetconnectiontype msbulk \ ... ``` **Syntax:** * Long form: `--targetconnectiontype "connection_type"` **Available Target Connection Types:** | Connection Type | Description | | ---------------- | ------------------------------------------------------------------------------------------------------------- | | `clickhousebulk` | ClickHouse BulkCopy | | `duckdb` | DuckDB | | `hanabulk` | SAP HANA | | `msbulk` | SQL Server BulkCopy | | `mysqlbulk` | MySQL BulkCopy | | `nzbulk` | Netezza BulkCopy | | `orabulk` | Oracle BulkCopy | | `oradirect` | Oracle Direct | | `pgcopy` | PostgreSQL using COPY (binary format when the source connection type is also `pgcopy`, text format otherwise) | | `pgsql` | PostgreSQL Native (.Net) | | `teradata` | Teradata (.Net) | ## Target Server[​](#target-server "Direct link to Target Server") Except if you have defined a target connection string, you must define a target server (or could also be a TNS entry for Oracle). **Syntax:** * Long form: `--targetserver "server"` ### Target Server Format Examples[​](#target-server-format-examples "Direct link to Target Server Format Examples") The target server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:3306" \ ... ``` or ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com,1433" \ ... ``` **IP address or DNS name with named instance (SQL Server):** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com\TARGETINSTANCE" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:1521/TARGETPDB" \ ... ``` **For DuckDB - Local file path:** ``` ./FastTransfer \ ... --targetconnectiontype duckdb \ --targetserver "/path/to/target.duckdb" \ ... ``` ## Target Connection String[​](#target-connection-string "Direct link to Target Connection String") Advanced Connection Options You can use a connection string to define the connection to the target database. This connection string will override any other target connection parameters and can be used if the standard authentication modes are not sufficient for your use case. You can use the target connection string for any connection type. The connection string must be enclosed in double quotes. **Example for SQL Server:** ``` ./FastTransfer \ ... --targetconnectstring "Server=mytargetserver;Database=mytargetdb;User ID=TargetUser;Password=TargetPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Example for PostgreSQL:** ``` ./FastTransfer \ ... --targetconnectstring "Host=mytargetserver;Database=mytargetdb;Username=TargetUser;Password=TargetPassword;SSL Mode=Require" ... ``` **Syntax:** * Long form: `--targetconnectstring "connection_string"` Password Security in Logs All passwords within the `--targetconnectstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Target Database[​](#target-database "Direct link to Target Database") Define the target database name. **Example:** ``` ./FastTransfer \ ... --targetdatabase "AdventureWorks" \ ... ``` **Syntax:** * Long form: `--targetdatabase "database_name"` Matching Schema Requirements The target table must already exist with a compatible schema. FastTransfer does not automatically create target tables. Ensure column data types are compatible between source and target databases. --- # 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[​](#source-configuration "Direct link to Source Configuration") These parameters define what data to extract from the source database. ### Source Schema[​](#source-schema "Direct link to Source Schema") Define the source schema name. This parameter is required when using the PostgreSQL Ctid method. **Example:** ``` ./FastTransfer \ ... --sourceschema "public" \ ... ``` **Syntax:** * Long form: `--sourceschema "schema_name"` Required for PostgreSQL Ctid Method This parameter must be set if the PostgreSQL Ctid method is used. ### Source Table[​](#source-table "Direct link to Source Table") Define the source table name. This parameter is required when using the PostgreSQL Ctid method. **Example:** ``` ./FastTransfer \ ... --sourcetable "customers" \ ... ``` **Syntax:** * Long form: `--sourcetable "table_name"` Required for PostgreSQL Ctid Method This parameter must be set if the PostgreSQL Ctid method is used. ### Query[​](#query "Direct link to Query") Plain text SQL query. Will be used instead of source table if provided. **Example:** ``` ./FastTransfer \ ... --query "SELECT * FROM customers WHERE country = 'USA'" \ ... ``` **Syntax:** * Long form: `--query "sql_query"` Tips When using a custom query, FastTransfer will execute this query on the source database instead of reading from a table directly. ### File Input[​](#file-input "Direct link to 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:** * Long form: `--fileinput "file_path"` File Requirement The specified file must exist and contain a valid SQL query. ## Target Configuration[​](#target-configuration "Direct link to Target Configuration") These parameters define where to load the data in the target database. ### Target Schema[​](#target-schema "Direct link to Target Schema") Define the target schema name. **Example:** ``` ./FastTransfer \ ... --targetschema "dbo" \ ... ``` **Syntax:** * Long form: `--targetschema "schema_name"` ### Target Table[​](#target-table "Direct link to Target Table") Define the target table name. **Example:** ``` ./FastTransfer \ ... --targettable "customers" \ ... ``` **Syntax:** * Long form: `--targettable "table_name"` ## Load Behavior[​](#load-behavior "Direct link to Load Behavior") These parameters control how data is loaded into the target table. ### Load Mode[​](#load-mode "Direct link to Load Mode") Load mode of the data into the target table. **Example:** ``` ./FastTransfer \ ... --loadmode Truncate \ ... ``` **Syntax:** * 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 "Direct link to Batch Size") Batch Size for BulkCopy operations. **Example:** ``` ./FastTransfer \ ... --batchsize 500000 \ ... ``` **Syntax:** * Long form: `--batchsize "size"` **Default Value:** `1048576` Performance Tuning 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[​](#use-work-tables "Direct link to Use Work Tables") Switch that will activate the usage of intermediate work tables. Useful in some rare cases. **Example:** ``` ./FastTransfer \ ... --useworktables \ ... ``` **Syntax:** * Long form: `--useworktables` When to Use This option is useful in rare scenarios where direct loading causes issues. Work tables act as an intermediate staging area. ### Map Method[​](#map-method "Direct link to Map Method") Mapping method for the columns between source and target. **Example:** ``` ./FastTransfer \ ... --mapmethod Name \ ... ``` **Syntax:** * 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` Column Mapping 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. --- # Operating Systems FastTransfer supports Windows, Linux, and macOS across different architectures. ## Supported Operating Systems[​](#supported-operating-systems "Direct link to Supported Operating Systems") * Windows * Linux | OS | Versions | Architectures | Supported | | ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------- | --------- | | Nano Server | 2025, 2022, 2019 | x64 | | | Windows | 11 24H2 (IoT), 11 24H2 (E), 11 24H2, 11 23H2, 11 22H2 (E), 10 22H2, 10 21H2 (E), 10 21H2 (IoT), 10 1809 (E), 10 1607 (E) | x64 | | | Windows Server | 2025, 23H2, 2022, 2019, 2016, 2012-R2, 2012 | x64 | | | Windows Server Core | 2025, 2022, 2019, 2016, 2012-R2, 2012 | x64 | | | OS | Versions | Architectures | Supported | | ------------------------ | -------------------------- | ------------- | --------- | | Alpine | 3.21, 3.20, 3.19, 3.18 | Arm64, x64 | | | Azure Linux | 3.0 | Arm64, x64 | | | CentOS Stream | 10, 9 | Arm64, x64 | | | Debian | 12 | Arm64, x64 | | | Fedora | 41, 40 | Arm64, x64 | | | openSUSE Leap | 15.6 | Arm64, x64 | | | Red Hat Enterprise Linux | 10, 9, 8 | Arm64, x64 | | | SUSE Enterprise Linux | 15.6 | Arm64, x64 | | | Ubuntu | 24.10, 24.04, 22.04, 20.04 | Arm64, x64 | | --- # Database Sources & Platforms FastTransfer supports a wide range of database systems across different platforms. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") | Source | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **ClickHouse** | | | | | **DuckDB** | | | | | **MySQL** | | | | | **Netezza** | | | | | **ODBC** | | | | | **OLEDB** | | | | | **Oracle** | | | | | **PostgreSQL** | | | | | **SQL Server** | | | | | **SAP Hana** | | | | | **Teradata** | | | | ## Supported Targets[​](#supported-targets "Direct link to Supported Targets") | Target | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **ClickHouse** | | | | | **DuckDB** | | | | | **MySQL** | | | | | **Netezza** | | | | | **ODBC** | | | | | **OLEDB** | | | | | **Oracle** | | | | | **PostgreSQL** | | | | | **SQL Server** | | | | | **SAP Hana** | | | | | **Teradata** | | | | --- # FASTTRANSFER\_DATEFORMAT Sets the format of the date bounds that the [Timepartition](/0.18/documentation/cli/parallel_parameters.md#timepartition) parallel method sends to the source database. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | ------------------- | ------------------------ | | **Parallel Method** | `Timepartition` | | **Default Value** | `yyyy-MM-dd` | | **Valid Values** | `yyyy-MM-dd`, `yyyyMMdd` | | **Since Version** | 0.18 | ## Description[​](#description "Direct link to Description") With the `Timepartition` method, each parallel stream reads a range of dates, for example: ``` WHERE (l_shipdate >= '1996-07-01' AND l_shipdate < '1996-08-01') ``` The dates are written as text literals and converted by the source database. Most databases read `yyyy-MM-dd`. If your source needs the compact format, set `FASTTRANSFER_DATEFORMAT=yyyyMMdd`: ``` WHERE (l_shipdate >= '19960701' AND l_shipdate < '19960801') ``` For Oracle sources (`oraodp`), FastTransfer wraps the bounds in `TO_DATE('...', 'YYYY-MM-DD')` (or `'YYYYMMDD'`), so no implicit conversion is needed. warning Only the two values above are accepted. With the `Timepartition` method, any other value stops FastTransfer with an error before the transfer starts. ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Use the compact date format $env:FASTTRANSFER_DATEFORMAT = "yyyyMMdd" # Run FastTransfer .\FastTransfer.exe --parallelmethod Timepartition --distributekeycolumn "(order_date,year,month)" ... ``` **Temporary (current session):** ``` # Use the compact date format export FASTTRANSFER_DATEFORMAT=yyyyMMdd # Run FastTransfer ./FastTransfer --parallelmethod Timepartition --distributekeycolumn "(order_date,year,month)" ... ``` --- # FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES Controls the timeout for bulk load operations when using `msbulk` or `orabulk` target connection types. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | -------------------- | --------------------------------- | | **Connection Types** | `msbulk`, `orabulk` | | **Default Value** | 60 minutes | | **Valid Values** | Any positive integer (in minutes) | | **Since Version** | 0.17 | ## Description[​](#description "Direct link to Description") Sets the maximum time (in minutes) that FastTransfer will wait for a bulk load operation to complete. This is particularly useful for large data transfers that may exceed the default 60-minute timeout. When transferring large volumes of data, the bulk load operation can take longer than the default timeout. This variable allows you to extend the timeout to accommodate your specific data transfer requirements. ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Set timeout to 120 minutes set FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` **Temporary (current session):** ``` # Set timeout to 120 minutes export FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` --- # Environment Variables Overview FastTransfer 0.17+ supports environment variables to control runtime behavior for specific connection types. ## Available Environment Variables[​](#available-environment-variables "Direct link to Available Environment Variables") | Variable Name | Target Types | Default | Description | | ------------------------------------------------------------------------------------------------------ | ----------------------------------- | ------------ | -------------------------------------------------------------------------- | | [FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES](/0.18/documentation/environment-variables/loadsteptimeout.md) | `msbulk`, `orabulk` | 60 | Controls the timeout for bulk load operations | | [FASTTRANSFER\_SORTEDINPUT](/0.18/documentation/environment-variables/sortedinput.md) | `msbulk` | `false` | Forces the sorted input hint for SQL Server bulk copy operations | | [FASTTRANSFER\_DATEFORMAT](/0.18/documentation/environment-variables/dateformat.md) | Any source (`Timepartition` method) | `yyyy-MM-dd` | Format of the date bounds sent to the source by the `Timepartition` method | --- # FASTTRANSFER\_SORTEDINPUT Forces the sorted input hint for SQL Server bulk copy operations when using the `msbulk` target connection type. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | -------------------- | --------------- | | **Connection Types** | `msbulk` | | **Default Value** | `false` | | **Valid Values** | `true`, `false` | | **Since Version** | 0.17 | ## Description[​](#description "Direct link to Description") When set to `true`, FastTransfer instructs SQL Server's bulk copy API to treat incoming data as sorted according to the clustered index. This can significantly improve performance when: * The source data is already sorted by the target table's clustered index columns * The target table has a clustered index * You want to minimize page splits and fragmentation Partitioned targets The hint is applied on the partition column of a partitioned target table. ## With DataDriven, DBPartition and Timepartition[​](#with-datadriven-dbpartition-and-timepartition "Direct link to With DataDriven, DBPartition and Timepartition") With a partitioned SQL Server target, the `DataDriven`, `DBPartition` and `Timepartition` parallel methods send the sorted hint automatically, without this variable. Each parallel stream holds a slice of the data, but the rows are not sorted inside a stream. So, since 0.18, the hint is **not** sent when the target table has a rowstore clustered index. SQL Server would check the order and stop the load with this error: ``` Cannot bulk load. The bulk data stream was incorrectly specified as sorted or the data violates a uniqueness constraint imposed by the target table. ``` Heap and clustered columnstore targets still get the hint. If your source data is really sorted on the target partition column, for example with an `ORDER BY` in the `--query`, set `FASTTRANSFER_SORTEDINPUT=true` to force the hint. ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Enable sorted input hint set FASTTRANSFER_SORTEDINPUT=true # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` **Temporary (current session):** ``` # Enable sorted input hint export FASTTRANSFER_SORTEDINPUT=true # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` --- # Advanced Scenarios Advanced use cases including DuckDB integration, ClickHouse, SAP HANA, Teradata, and other complex transfer scenarios. ## DuckDB Integration[​](#duckdb-integration "Direct link to DuckDB Integration") DuckDB provides powerful data transformation capabilities with FastTransfer. ### DuckDB Memory - Parquet with Nested Fields to MSSQL[​](#duckdb-memory---parquet-with-nested-fields-to-mssql "Direct link to DuckDB Memory - Parquet with Nested Fields to MSSQL") Process complex nested JSON/Parquet files with DuckDB's in-memory engine: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdb" ` --sourceserver ":memory:" ` --query "select * EXCLUDE(Risques, Interlocuteurs),unnest(interlocuteurs,recursive := true ) from (select day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) from read_parquet('D:\CLIENTS\ENEDIS\BI4ALL\CHANTIER\**\*.parquet', hive_partitioning=true)) t_row_unest" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "ENDSBI4ALL" ` --targetschema "bi4all" ` --targettable "DuckChantiers_hpart" ` --parallelmethod "DataDriven" ` --distributekeycolumn "day" ` --loadmode "Truncate" ` --degree 8 ``` DuckDB Memory Mode Use `:memory:` as the server to process data without persisting a DuckDB database file. Perfect for ETL transformations. ### DuckDB Stream - Multiple CSV Files with DataDriven[​](#duckdb-stream---multiple-csv-files-with-datadriven "Direct link to DuckDB Stream - Multiple CSV Files with DataDriven") Process multiple CSV files in parallel using filename as distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - Single Large CSV with Random Method[​](#duckdb-stream---single-large-csv-with-random-method "Direct link to DuckDB Stream - Single Large CSV with Random Method") Process a single large CSV file with parallel Random distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributekeycolumn "l_orderkey" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - CSV with Column Slicing[​](#duckdb-stream---csv-with-column-slicing "Direct link to DuckDB Stream - CSV with Column Slicing") Use calculated column slices for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --loadmode "Truncate" ` --degree 13 ``` ### DuckDB Stream - CSV with Custom Format[​](#duckdb-stream---csv-with-custom-format "Direct link to DuckDB Stream - CSV with Custom Format") Specify CSV format parameters when auto-detection isn't sufficient: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --loadmode "Truncate" ` --degree 12 ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributekeycolumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## ClickHouse Integration[​](#clickhouse-integration "Direct link to ClickHouse Integration") ### PostgreSQL to ClickHouse - Single-threaded[​](#postgresql-to-clickhouse---single-threaded "Direct link to PostgreSQL to ClickHouse - Single-threaded") Transfer data to ClickHouse without parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ### PostgreSQL to ClickHouse - Parallel with Ctid[​](#postgresql-to-clickhouse---parallel-with-ctid "Direct link to PostgreSQL to ClickHouse - Parallel with Ctid") High-performance transfer using PostgreSQL's Ctid method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL - Multiple Methods[​](#clickhouse-to-postgresql---multiple-methods "Direct link to ClickHouse to PostgreSQL - Multiple Methods") Transfer from ClickHouse to PostgreSQL using various distribution methods: * Single-threaded * RangeId Method * DataDriven Method ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## SAP HANA Integration[​](#sap-hana-integration "Direct link to SAP HANA Integration") ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data to SAP HANA using the HANA bulk loader: **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer from SAP HANA to PostgreSQL: ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## Teradata Integration[​](#teradata-integration "Direct link to Teradata Integration") ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data to Teradata with parallel Ctid method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## Netezza Integration[​](#netezza-integration "Direct link to Netezza Integration") Transfer from Netezza to MSSQL using DATASLICEID for optimal parallelism: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "DATASLICEID" ` --degree 6 ``` Netezza DATASLICEID Use DATASLICEID as the distribution column to leverage Netezza's internal data distribution for optimal parallel extraction. ## Advanced SQL Server Techniques[​](#advanced-sql-server-techniques "Direct link to Advanced SQL Server Techniques") ### Using Partition Functions[​](#using-partition-functions "Direct link to Using Partition Functions") Leverage SQL Server partition functions for efficient parallel transfers: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` Partition Function Syntax Use `` `$PARTITION.FunctionName(ColumnName) `` to reference a partition function. The backtick (`` ` ``) escapes the dollar sign in PowerShell. ### Using Physloc Method[​](#using-physloc-method "Direct link to Using Physloc Method") Use physical location for parallel distribution (readonly tables only): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` Physloc Method The Physloc method should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Dynamic Degree with Negative Values[​](#dynamic-degree-with-negative-values "Direct link to Dynamic Degree with Negative Values") Use negative degree values to automatically calculate parallelism based on CPU cores: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree -4 ` --loadmode "Truncate" ``` Dynamic Degree A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value. With 16 cores, `-4` results in 4 parallel threads. ### Batch Size Optimization[​](#batch-size-optimization "Direct link to Batch Size Optimization") Adjust batch size based on connection type for optimal performance: * **MSSQL (msbulk)**: 10,000 - 100,000 rows * **PostgreSQL (pgcopy)**: 10,000 - 50,000 rows * **Oracle (orabulk)**: 100,000 - 500,000 rows * **Oracle (oradirect)**: 1,000 - 10,000 rows * **ClickHouse**: 10,000 - 1,000,000 rows * **SAP HANA**: 5,000 - 10,000 rows ### Debug Logging[​](#debug-logging "Direct link to Debug Logging") Enable detailed logging for troubleshooting: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` Debug Mode Use `--loglevel "debug"` to see detailed execution steps, connection information, and query generation details for troubleshooting. ## Using Input Files[​](#using-input-files "Direct link to Using Input Files") Process SQL queries from external files: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --fileinput "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ## Column Mapping[​](#column-mapping "Direct link to Column Mapping") ### Map by Name[​](#map-by-name "Direct link to Map by Name") Map source columns to target columns by name with `--mapmethod "Name"` (the default is `Position`): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # CSV Import FastTransfer leverages a powerful `read_csv` function and syntax to efficiently import CSV files into any supported database. This provides advanced features like automatic schema detection, parallel processing, and support for complex CSV formats. FastTransfer offers several advantages for CSV processing: * **Automatic schema detection** - No need to manually define column types * **High performance** - Optimized CSV parser with parallel reading * **Flexible formatting** - Handle various delimiters, quotes, and escape characters * **Multi-file support** - Process multiple CSV files with glob patterns * **In-memory processing** - No need for a persistent database file ## Basic CSV Import[​](#basic-csv-import "Direct link to Basic CSV Import") ### Single Small CSV File[​](#single-small-csv-file "Direct link to Single Small CSV File") Import a single CSV file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Using :memory: The `:memory:` server parameter tells FastTransfer to operate in-memory without creating a database file. This is perfect for one-time CSV imports. This does not mean that FastTransfer will load all the file in memory. The data are streamed and memory usage stay low. ### Medium CSV File - Single Thread[​](#medium-csv-file---single-thread "Direct link to Medium CSV File - Single Thread") Import a medium-sized CSV file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel CSV Import[​](#parallel-csv-import "Direct link to Parallel CSV Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(id/10000)::int` divides the ID column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large CSV[​](#random-method-on-large-csv "Direct link to Random Method on Large CSV") Process a large CSV file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributekeycolumn "l_orderkey" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 13 ``` ## Multiple CSV Files[​](#multiple-csv-files "Direct link to Multiple CSV Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple CSV files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_csv()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Advanced CSV Formats[​](#advanced-csv-formats "Direct link to Advanced CSV Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") When automatic detection doesn't work, specify the CSV format explicitly: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` **Format Parameters:** * `auto_detect=false` - Disable automatic schema detection * `delim=','` - Field delimiter (comma) * `quote='"'` - Quote character for fields containing delimiters * `escape='"'` - Escape character for quotes within quoted fields * `new_line='\n'` - Line terminator * `skip=0` - Number of lines to skip at the start * `comment=''` - Character indicating comment lines to ignore * `header=true` - First line contains column names * `columns={...}` - Explicit column names and types ### CSV with Vector Data to SQL Server[​](#csv-with-vector-data-to-sql-server "Direct link to CSV with Vector Data to SQL Server") Import CSV containing vector embeddings as VARCHAR: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id,url,title,text,title_vector::varchar tv,content_vector::varchar cv,vector_id from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') limit 100" ` --targetconnectiontype "msbulk" ` --targetserver "localhost\SS2025" ` --targettrusted ` --targetdatabase "wikipedia" ` --targetschema "dbo" ` --targettable "wikipedia_articles_embeddings_as_vector" ` --mapmethod "Name" ` --loadmode "Append" ``` ## Common CSV Scenarios[​](#common-csv-scenarios "Direct link to Common CSV Scenarios") ### Tab-Delimited Files[​](#tab-delimited-files "Direct link to Tab-Delimited Files") For tab-separated values (TSV): ``` --query "SELECT * FROM read_csv('file.tsv', delim='\t')" ``` ### CSV with Different Encodings[​](#csv-with-different-encodings "Direct link to CSV with Different Encodings") ``` --query "SELECT * FROM read_csv('file.csv', encoding='UTF-8')" ``` ### CSV with Custom Quote Character[​](#csv-with-custom-quote-character "Direct link to CSV with Custom Quote Character") ``` --query "SELECT * FROM read_csv('file.csv', quote='''', escape='''')" ``` ### CSV Without Headers[​](#csv-without-headers "Direct link to CSV Without Headers") ``` --query "SELECT * FROM read_csv('file.csv', header=false, columns={'col1': 'VARCHAR', 'col2': 'INTEGER'})" ``` ### Skip Header Lines[​](#skip-header-lines "Direct link to Skip Header Lines") ``` --query "SELECT * FROM read_csv('file.csv', skip=3)" ``` --- # JSON Import FastTransfer leverages a powerful `read_json` function to efficiently import JSON files into any supported database. It provides advanced features like automatic schema detection, nested structure handling, and support for both JSON objects and JSON Lines (JSONL/NDJSON) formats. FastTransfer offers several advantages for JSON processing: * **Automatic schema detection** - Automatically infers column types from JSON structure * **High performance** - Optimized JSON parser with parallel reading * **Nested structure support** - Handle complex nested objects and arrays * **Multiple formats** - Support for JSON, JSON Lines (JSONL), and NDJSON * **Array flattening** - Use `unnest()` to flatten nested arrays * **In-memory processing** - No need for a persistent database file ## Basic JSON Import[​](#basic-json-import "Direct link to Basic JSON Import") ### Single JSON File[​](#single-json-file "Direct link to Single JSON File") Import a single JSON file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\users.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "AppDB" ` --targetschema "dbo" ` --targettable "users" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` JSON Formats FastTransfer automatically detects the JSON format: * **JSON Array**: `[{...}, {...}]` - Array of objects * **JSON Lines (JSONL)**: One JSON object per line * **NDJSON**: Newline-delimited JSON objects ### JSON Lines File - Single Thread[​](#json-lines-file---single-thread "Direct link to JSON Lines File - Single Thread") Import a JSON Lines file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\events.jsonl', format='newline_delimited')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "analytics" ` --targetschema "public" ` --targettable "events" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel JSON Import[​](#parallel-json-import "Direct link to Parallel JSON Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\orders.jsonl')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(order_id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(order_id/10000)::int` divides the order\_id column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large JSON File[​](#random-method-on-large-json-file "Direct link to Random Method on Large JSON File") Process a large JSON Lines file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\transactions.jsonl')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "Random" ` --distributekeycolumn "transaction_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\logs.jsonl') rjson" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(event_timestamp::date)" ` --datadrivenquery "select distinct event_timestamp::date from read_json('D:\DATA\logs.jsonl') rjson" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple JSON Files[​](#multiple-json-files "Direct link to Multiple JSON Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple JSON files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_json('D:\DATA\daily\*.jsonl', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_metrics" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.jsonl')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_json()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Nested JSON Structures[​](#nested-json-structures "Direct link to Nested JSON Structures") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested JSON structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, user.name as user_name, user.email as user_email, order_date, total_amount FROM read_json('D:\DATA\orders.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within JSON objects: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(items, recursive := true) FROM read_json('D:\DATA\orders_with_items.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structure[​](#complex-nested-structure "Direct link to Complex Nested Structure") Handle deeply nested JSON with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, address.street as street, address.city as city, address.country as country, contacts[1] as primary_contact FROM read_json('D:\DATA\customers.json')" ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "crm" ` --targetuser "crmuser" ` --targetpassword "YourPassword" ` --targetschema "crm" ` --targettable "customers" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Advanced JSON Formats[​](#advanced-json-formats "Direct link to Advanced JSON Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") Specify JSON format explicitly when needed: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\data.json', format='array', maximum_depth=10)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "raw_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` **Format Parameters:** * `format='array'` - JSON array of objects * `format='newline_delimited'` - JSON Lines (JSONL/NDJSON) * `format='auto'` - Automatic detection (default) * `maximum_depth` - Maximum nesting depth to parse * `records='true'` - Parse records format * `columns={...}` - Explicit column names and types ### Compressed JSON Files[​](#compressed-json-files "Direct link to Compressed JSON Files") Import gzip-compressed JSON files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\logs.jsonl.gz', compression='gzip')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "compressed_logs" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Compression Support DuckDB automatically detects compression from file extensions: * `.gz` - Gzip compression * `.json.gz` or `.jsonl.gz` - Compressed JSON files ## JSON Type Conversions[​](#json-type-conversions "Direct link to JSON Type Conversions") ### Converting JSON Fields[​](#converting-json-fields "Direct link to Converting JSON Fields") Transform JSON data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, CAST(amount AS DECIMAL(10,2)) as amount, status FROM read_json('D:\DATA\payments.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "payments" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### JSON String to Array[​](#json-string-to-array "Direct link to JSON String to Array") Convert JSON string fields to arrays: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, json_extract(tags, '$') as tags_array FROM read_json('D:\DATA\products.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "catalog" ` --targetschema "public" ` --targettable "products" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # MySQL Examples Examples for transferring data from and to MySQL databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") MySQL transfers support: * **mysql**: Standard MySQL protocol for reading * **mysqlbulk**: MySQL bulk loader for high-performance target loading ## MySQL to MSSQL - Single-threaded Transfer[​](#mysql-to-mssql---single-threaded-transfer "Direct link to MySQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with Random Method[​](#mysql-to-mssql---parallel-transfer-with-random-method "Direct link to MySQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mysql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MySQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values. **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 10 ` --loadmode Truncate ``` **Using partitioned table with year column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## MSSQL to MySQL - Single-threaded Transfer[​](#mssql-to-mysql---single-threaded-transfer "Direct link to MSSQL to MySQL - Single-threaded Transfer") Transfer data from SQL Server to MySQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Parallel Transfer with Random Method[​](#mssql-to-mysql---parallel-transfer-with-random-method "Direct link to MSSQL to MySQL - Parallel Transfer with Random Method") Transfer with Random distribution. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Using Partition Function[​](#mssql-to-mysql---using-partition-function "Direct link to MSSQL to MySQL - Using Partition Function") Transfer with DataDriven method using SQL Server partition function. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Adding Computed Column[​](#mssql-to-mysql---adding-computed-column "Direct link to MSSQL to MySQL - Adding Computed Column") Transfer with additional computed column and DataDriven method. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select *,null as o_orderdate_year from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## Using ODBC Connection to MySQL[​](#using-odbc-connection-to-mysql "Direct link to Using ODBC Connection to MySQL") Transfer using ODBC DSN for MySQL connection. ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMySQLTPCH" ` --sourcedatabase "tpch" ` --query "select * from tpch.orders_part LIMIT 10" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for transferring data from and to Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle transfers support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended for source) * **orabulk**: Oracle Bulk Loader for high-performance target loading * **oradirect**: Oracle Direct Path for target loading * **odbc**: Using ODBC DSN ## Oracle to MSSQL - Single-threaded Transfer[​](#oracle-to-mssql---single-threaded-transfer "Direct link to Oracle to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "localhost:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ``` ## Oracle to MSSQL - Parallel Transfer with Rowid Method[​](#oracle-to-mssql---parallel-transfer-with-rowid-method "Direct link to Oracle to MSSQL - Parallel Transfer with Rowid Method") Oracle-specific parallel transfer using physical row identifier (ROWID). Oracle-Specific The Rowid method is unique to Oracle and uses the physical row identifier for parallel data distribution. This is very efficient for full table transfers. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "LOCALHOST:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS_FLAT" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Rowid" ` --loadmode "Truncate" ` --degree 12 ``` ## PostgreSQL to Oracle - Using orabulk (Bulk Loader)[​](#postgresql-to-oracle---using-orabulk-bulk-loader "Direct link to PostgreSQL to Oracle - Using orabulk (Bulk Loader)") Transfer data from PostgreSQL to Oracle using Oracle bulk loader. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## PostgreSQL to Oracle - Using oradirect (Direct Path)[​](#postgresql-to-oracle---using-oradirect-direct-path "Direct link to PostgreSQL to Oracle - Using oradirect (Direct Path)") Transfer data from PostgreSQL to Oracle using Oracle direct path loading. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 1000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "FREEPDB1" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## Using ODBC Connection to Oracle[​](#using-odbc-connection-to-oracle "Direct link to Using ODBC Connection to Oracle") Transfer using ODBC DSN for Oracle connection. **To MSSQL - single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNORA23CFREEPDB1" ` --sourcedatabase "FREEPDB1" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for transferring data from and to ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB databases. ## ClickHouse[​](#clickhouse "Direct link to ClickHouse") Transfer data from and to ClickHouse database. ### PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse using the bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL[​](#clickhouse-to-postgresql "Direct link to ClickHouse to PostgreSQL") Transfer data from ClickHouse to PostgreSQL with various parallelization methods. **Single-threaded:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with RangeId:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Ntile:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Ntile" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Random:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with DataDriven:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ClickHouse Connection Types * **clickhouse**: Standard connection for reading * **clickhousebulk**: High-performance bulk loader for writing ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Transfer data from and to SAP HANA database. ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA using the HANA bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Ctid:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Batch Size For SAP HANA, use batch sizes between 5,000 and 10,000 rows for optimal performance. ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer data from SAP HANA to PostgreSQL. ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Connection Types * **hana**: Standard connection for reading from SAP HANA * **hanabulk**: Bulk loader for writing to SAP HANA ## Netezza[​](#netezza "Direct link to Netezza") Transfer data from Netezza using the DATASLICEID for optimal parallelism. ### Netezza to MSSQL[​](#netezza-to-mssql "Direct link to Netezza to MSSQL") Transfer from Netezza to SQL Server using DataDriven method on DATASLICEID: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "DATASLICEID" ` --degree 6 ` --loadmode Truncate ``` Netezza DATASLICEID The DATASLICEID column in Netezza represents the internal data distribution. Using it as the distribution key provides optimal parallel extraction by leveraging Netezza's data placement. ## Teradata[​](#teradata "Direct link to Teradata") Transfer data from and to Teradata database. ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer data from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## DuckDB[​](#duckdb "Direct link to DuckDB") Transfer data from and to DuckDB database files or in-memory. ### MSSQL to DuckDB File[​](#mssql-to-duckdb-file "Direct link to MSSQL to DuckDB File") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributekeycolumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### DuckDB Stream - CSV Files[​](#duckdb-stream---csv-files "Direct link to DuckDB Stream - CSV Files") Process CSV files using DuckDB's in-memory engine and load into SQL Server: **Single CSV file:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Multiple CSV files with parallel processing:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` DuckDB Connection Types * **duckdb**: Direct connection to DuckDB file * **duckdbstream**: Streaming connection for in-memory processing or file-based operations * Use `:memory:` as server for in-memory processing tip Build your command with the [Wizard](/latest/wizard.md) --- # Parquet Import FastTransfer leverages a powerful `read_parquet` function to efficiently import Parquet files into any supported database. Parquet is a columnar storage format optimized for analytics, and it provides excellent performance and feature support for reading Parquet files. FastTransfer offers several advantages for Parquet processing: * **Columnar access** - Read only the columns you need for optimal performance * **Predicate pushdown** - Filter data at the file level before loading * **Automatic schema detection** - Column types preserved from Parquet metadata * **High performance** - Optimized Parquet reader with parallel processing * **Compression support** - Handles all Parquet compression codecs (Snappy, Gzip, LZ4, Zstd) * **Nested structure support** - Handle complex nested objects, arrays, and maps * **Multi-file support** - Process multiple Parquet files with glob patterns * **Partition support** - Hive-style partitioning for efficient data access ## Basic Parquet Import[​](#basic-parquet-import "Direct link to Basic Parquet Import") ### Single Parquet File[​](#single-parquet-file "Direct link to Single Parquet File") Import a single Parquet file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\sales.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "SalesDB" ` --targetschema "dbo" ` --targettable "sales" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Column Selection For optimal performance, select only the columns you need: ``` --query "SELECT customer_id, order_date, total_amount FROM read_parquet('file.parquet')" ``` This reduces I/O and memory usage significantly. ### Multiple Parquet Files - Single Thread[​](#multiple-parquet-files---single-thread "Direct link to Multiple Parquet Files - Single Thread") Import multiple Parquet files using glob pattern: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\orders\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel Parquet Import[​](#parallel-parquet-import "Direct link to Parallel Parquet Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\transactions\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "finance" ` --targetschema "public" ` --targettable "transactions" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(transaction_id/100000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(transaction_id/100000)::int` divides the ID by 100,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large Parquet Files[​](#random-method-on-large-parquet-files "Direct link to Random Method on Large Parquet Files") Process large Parquet files with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "events" ` --parallelmethod "Random" ` --distributekeycolumn "event_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\logs\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributekeycolumn "CAST(event_date AS VARCHAR)" ` --datadrivenquery "select distinct CAST(event_date AS VARCHAR) from read_parquet('D:\DATA\logs\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple Parquet Files[​](#multiple-parquet-files "Direct link to Multiple Parquet Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple Parquet files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_parquet('D:\DATA\daily\*.parquet', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_reports" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_parquet()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Hive-Style Partitioning[​](#hive-style-partitioning "Direct link to Hive-Style Partitioning") ### Reading Partitioned Data[​](#reading-partitioned-data "Direct link to Reading Partitioned Data") Read Parquet files with Hive-style partitioning: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\partitioned\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "warehouse" ` --targetschema "dbo" ` --targettable "partitioned_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Hive Partitioning For data organized like `year=2024/month=01/data.parquet`, DuckDB automatically extracts partition columns: * Partition columns become regular columns in the result * Use `hive_partitioning=true` to enable this feature * Excellent for partition pruning and efficient queries ### Parallel Processing on Partitioned Data[​](#parallel-processing-on-partitioned-data "Direct link to Parallel Processing on Partitioned Data") Use partition columns for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "sales_data" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year || '-' || month" ` --datadrivenquery "select distinct year || '-' || month as partition_key from read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` ## Nested Structures in Parquet[​](#nested-structures-in-parquet "Direct link to Nested Structures in Parquet") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested Parquet structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, customer.name as customer_name, customer.email as customer_email, order_date, total FROM read_parquet('D:\DATA\orders.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(line_items, recursive := true) FROM read_parquet('D:\DATA\orders_nested.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structures[​](#complex-nested-structures "Direct link to Complex Nested Structures") Handle complex nested Parquet data with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) FROM read_parquet('D:\DATA\chantier\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "construction" ` --targetschema "dbo" ` --targettable "site_details" ` --parallelmethod "DataDriven" ` --distributekeycolumn "day" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 8 ``` ## Advanced Filtering[​](#advanced-filtering "Direct link to Advanced Filtering") ### Predicate Pushdown[​](#predicate-pushdown "Direct link to Predicate Pushdown") Apply filters to reduce data read from Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet') WHERE event_date >= '2024-01-01' AND event_type = 'purchase'" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "purchases" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Append" ``` Predicate Pushdown Benefits DuckDB pushes filters down to the Parquet reader, which: * Skips entire row groups that don't match the filter * Reduces memory usage * Significantly improves performance for selective queries * Works best with filters on partition columns or columns with statistics ### Column Pruning with Selection[​](#column-pruning-with-selection "Direct link to Column Pruning with Selection") Select only needed columns for maximum performance: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT customer_id, order_date, total_amount, status FROM read_parquet('D:\DATA\orders_large.parquet') WHERE order_date >= '2024-01-01'" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "recent_orders" ` --parallelmethod "Random" ` --distributekeycolumn "customer_id" ` --mapmethod "Name" ` --loadmode "Append" ` --degree 12 ``` ## Schema and Metadata[​](#schema-and-metadata "Direct link to Schema and Metadata") ### Union Multiple Parquet Files[​](#union-multiple-parquet-files "Direct link to Union Multiple Parquet Files") Union Parquet files with compatible schemas: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet(['D:\DATA\2023\*.parquet', 'D:\DATA\2024\*.parquet'], union_by_name=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "archive" ` --targetschema "dbo" ` --targettable "historical_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Union By Name `union_by_name=true` allows reading files with different column orders or optional columns: * Columns are matched by name instead of position * Missing columns are filled with NULL * Extra columns are ignored * Useful for schema evolution scenarios ### Type Conversion[​](#type-conversion "Direct link to Type Conversion") Convert Parquet data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, amount::DECIMAL(18,2) as amount, status FROM read_parquet('D:\DATA\transactions.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # PostgreSQL Examples Comprehensive examples for transferring data from and to PostgreSQL databases using native connectors. ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL transfers support multiple connection types: * **pgsql**: Standard PostgreSQL protocol for reading/writing * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk transfers). Data is copied in binary format when both the source and the target use `pgcopy`, and in text format otherwise ## PostgreSQL to MSSQL - Single-threaded Transfer[​](#postgresql-to-mssql---single-threaded-transfer "Direct link to PostgreSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization using a SQL query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## PostgreSQL to MSSQL - Using Schema and Table[​](#postgresql-to-mssql---using-schema-and-table "Direct link to PostgreSQL to MSSQL - Using Schema and Table") Transfer specifying schema and table names instead of a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#postgresql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on a calculated column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "FLOOR(o_orderkey/10000000)" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Parallel Transfer with Ctid Method[​](#postgresql-to-mssql---parallel-transfer-with-ctid-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Ctid Method") PostgreSQL-specific parallel transfer using physical row identifier (ctid). PostgreSQL-Specific The Ctid method is unique to PostgreSQL and uses the physical row identifier (ctid) for parallel data distribution. This is very efficient for full table transfers. **For orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` **For lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with Random Method[​](#postgresql-to-mssql---parallel-transfer-with-random-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Dynamic Degree[​](#postgresql-to-mssql---dynamic-degree "Direct link to PostgreSQL to MSSQL - Dynamic Degree") Use negative degree values to automatically determine parallelism. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## PostgreSQL to MSSQL - Using Input File[​](#postgresql-to-mssql---using-input-file "Direct link to PostgreSQL to MSSQL - Using Input File") Transfer using a SQL query from an external file. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --fileinput "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ## PostgreSQL to PostgreSQL - Using Query[​](#postgresql-to-postgresql---using-query "Direct link to PostgreSQL to PostgreSQL - Using Query") Transfer between PostgreSQL databases using a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --query "select * from ""tpch_10"".orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## PostgreSQL to PostgreSQL - Using Ctid Method[​](#postgresql-to-postgresql---using-ctid-method "Direct link to PostgreSQL to PostgreSQL - Using Ctid Method") Transfer between PostgreSQL databases with parallel Ctid method. * Using pgcopy (COPY) * Using pgsql (INSERT UNNEST) ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 6 ` --loadmode "Truncate" ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgsql" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to PostgreSQL - Using pgcopy Binary[​](#postgresql-to-postgresql---using-pgcopy-binary "Direct link to PostgreSQL to PostgreSQL - Using pgcopy Binary") High-performance transfer using PostgreSQL binary COPY protocol: binary format is used because both the source and the target connection types are `pgcopy`. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Parallel with Ctid - orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` **Parallel with Ctid - lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "lineitem" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ``` ## PostgreSQL to Oracle[​](#postgresql-to-oracle "Direct link to PostgreSQL to Oracle") Transfer data from PostgreSQL to Oracle databases. * Using orabulk (Bulk Load) * Using oradirect (Direct Path) **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 1000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Ctid" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **With Ctid parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ## PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Ctid" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL (Hyper File) to MSSQL[​](#postgresql-hyper-file-to-mssql "Direct link to PostgreSQL (Hyper File) to MSSQL") Transfer data from a Tableau Hyper file (using pgsql driver) to MSSQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:8095" ` --sourcedatabase "D:\OpenData\TPCH\data\hyper\tpch_sf10.hyper" ` --sourceuser "tableau_internal_user" ` --sourcepassword "" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from ""ORDERS""" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for transferring data from and to SQL Server databases. ## MSSQL to MSSQL - Single-threaded Transfer[​](#mssql-to-mssql---single-threaded-transfer "Direct link to MSSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization for smaller datasets. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with Random Method[​](#mssql-to-mssql---parallel-transfer-with-random-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. * Windows Authentication * SQL Authentication ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with RangeId Method[​](#mssql-to-mssql---parallel-transfer-with-rangeid-method "Direct link to MSSQL to MSSQL - Parallel Transfer with RangeId Method") Transfer using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Using query with filter:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with Ntile Method[​](#mssql-to-mssql---parallel-transfer-with-ntile-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Ntile Method") Transfer using Ntile distribution for evenly distributed chunks. **Full table transfer:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Filtered transfer with date column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mssql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MSSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values of a column or partition function. **Using partition function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "DataDriven" ` --distributekeycolumn "YEAR(o_orderdate)" ` --degree 7 ` --loadmode Append ``` ## MSSQL to MSSQL - Using Physloc Method[​](#mssql-to-mssql---using-physloc-method "Direct link to MSSQL to MSSQL - Using Physloc Method") Transfer using physical location (should only be used on readonly/snapshot databases). warning The Physloc method should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --query "select * from dbo.orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physloc" ` --degree 10 ` --mapmethod "Name" ``` ## MSSQL to PostgreSQL[​](#mssql-to-postgresql "Direct link to MSSQL to PostgreSQL") Transfer data from SQL Server to PostgreSQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 10 ` --loadmode "Truncate" ``` ## MSSQL to MySQL[​](#mssql-to-mysql "Direct link to MSSQL to MySQL") Transfer data from SQL Server to MySQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` **With DataDriven method on partitioned table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer data from SQL Server to DuckDB. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## Using ODBC Connection[​](#using-odbc-connection "Direct link to Using ODBC Connection") Transfer using ODBC DSN for connection. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMsSQLTPCH" ` --sourcedatabase "tpch_test" ` --query "select top 1000 * from dbo.orders" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## Dynamic Degree[​](#dynamic-degree "Direct link to Dynamic Degree") Use negative degree values to automatically determine parallelism based on CPU cores. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## Load Modes[​](#load-modes "Direct link to Load Modes") FastTransfer supports different load modes for the target table: * `Truncate`: Truncates the target table before loading * `Append`: Appends data to existing table (default) Example with Append mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastTransfer\_Settings.json for Windows[​](#fasttransfer_settingsjson-for-windows "Direct link to FastTransfer_Settings.json for Windows") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastTransferLogs": "Server=localhost;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs\\FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastTransferLogs", "sinkOptionsSection": { "TableName": "EventLogs", "SchemaName": "dbo", "DatabaseName": "FastTransferLogs", "AutoCreateSqlDatabase": true, "AutoCreateSqlTable": true, "BatchPostingLimit": 50, "BatchPeriod": "0.00:00:05", "UseSqlBulkCopy": false }, "restrictedToMinimumLevel": "Information", "columnOptionsSection": { "disableTriggers": true, "clusteredColumnstoreIndex": false, "removeStandardColumns": [ "Id", "MessageTemplate", "Properties", "Exception" ], "additionalColumns": [ { "ColumnName": "ErrorSummary", "PropertyName": "rootcauseMessage", "DataType": "nvarchar", "DataLength": 4000 }, { "ColumnName": "EventType", "PropertyName": "EventType", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "FullTargetName", "PropertyName": "fulltargetname", "DataType": "nvarchar", "DataLength": 400 }, { "ColumnName": "Status", "PropertyName": "finalStatus", "DataType": "int" }, { "ColumnName": "Rows", "PropertyName": "loadedRows", "DataType": "bigint" }, { "ColumnName": "Columns", "PropertyName": "loadedCols", "DataType": "int" }, { "ColumnName": "ElaspedMs", "PropertyName": "loadElapsedMs", "DataType": "bigint" }, { "ColumnName": "MachineName", "PropertyName": "MachineName", "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "Application", "PropertyName": "Application", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "ProcessId", "PropertyName": "ProcessId", "DataType": "int" }, { "ColumnName": "ThreadId", "PropertyName": "ThreadId", "DataType": "int" }, { "ColumnName": "RunId", "PropertyName": "runid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "TraceId", "PropertyName": "traceid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "SpanId", "PropertyName": "SpanId", "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "Release", "PropertyName": "release", "DataType": "varchar", "DataLength": 32 }, { "ColumnName": "EnvironmentUserName", "PropertyName": "EnvironmentUserName", "DataType": "varchar", "DataLength": 200 }, { "ColumnName": "InputParameters", "PropertyName": "InputParameters", "DataType": "varchar", "DataLength": 8000 } ], "level": { "columnName": "Severity", "storeAsEnum": false, "DataType": "varchar", "DataLength": 50 }, "timeStamp": { "columnName": "EventTimestamp", "nonClusteredIndex": true, "convertToUtc": false }, "logEvent": { "excludeAdditionalProperties": false, "excludeStandardColumns": true }, "message": { "columnName": "EventMsg", "DataType": "varchar", "DataLength": 8000 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Linux\_Console\_Files.json[​](#fasttransfer_settings_linux_console_filesjson "Direct link to FastTransfer_Settings_Linux_Console_Files.json") For Linux with Console + Daily rolling Files: ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs/FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Windows.json[​](#fasttransfer_settings_map_for_windowsjson "Direct link to FastTransfer_Settings_Map_for_Windows.json") For Console and dynamically named log file targets (Windows): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "C:\\temp\\Logs\\{logdate}\\{sourcedatabase}\\{sourcetable}\\FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fasttransfer_settings_map_for_linux_and_containerjson "Direct link to FastTransfer_Settings_Map_for_Linux_and_Container.json") For Console and dynamically named log file targets (Linux/Container): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fasttransfer_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastTransfer_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastTransferLogs": "Host=localhost;Port=15432;Database=fastlogs;Username=FastUser;Password=FastPassword" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.PostgreSQL.Alternative", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "PostgreSQL", "Args": { "connectionString": "PG_FastTransferLogs", "tableName": "event_logs", "schemaName": "public", "needAutoCreateTable": true, "needAutoCreateSchema": false, "restrictedToMinimumLevel": "Information", "useCopy": false, "loggerColumnOptions": { "event_timestamp": { "Name": "Timestamp", "Format": "", "WriteMethod": "Timestamp", "NpgsqlDbType": "TimestampTz", "Order": 1 }, "event_msg": { "Name": "RenderedMessage", "Format": "", "WriteMethod": "RenderedMessage", "NpgsqlDbType": "Text", "Order": 2 }, "Level": { "Name": "LevelAsText", "Order": 3 }, "LevelInt": { "Name": "Level", "Order": 4 } }, "loggerPropertyColumnOptions": { "error_summary": { "Name": "rootcauseMessage", "Format": "{0}", "WriteMethod": "ToString", "NpgsqlDbType": "Text", "Order": 5 }, "source_database": { "Name": "SourceDatabase", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 6 }, "source_schema": { "Name": "SourceSchema", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 7 }, "source_table": { "Name": "SourceTable", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 8 }, "output_directory": { "Name": "OutputDirectory", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 9 }, "full_target_name": { "Name": "fulltargetname", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 10 }, "application": { "Name": "Application", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 11 }, "status": { "Name": "finalStatus", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 12 }, "rows": { "Name": "loadedRows", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Numeric", "Order": 13 }, "columns": { "Name": "loadedCols", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 14 }, "elapsed_ms": { "Name": "loadElapsedMs", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Numeric", "Order": 15 }, "machine_name": { "Name": "MachineName", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 16 }, "process_id": { "Name": "ProcessId", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 17 }, "thread_id": { "Name": "ThreadId", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 18 }, "run_id": { "Name": "runid", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 19 }, "trace_id": { "Name": "traceid", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 20 }, "span_id": { "Name": "SpanId", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 21 }, "release": { "Name": "release", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 22 }, "environment_user_name": { "Name": "EnvironmentUserName", "Format": "", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 23 }, "input_parameters": { "Name": "InputParameters", "WriteMethod": "Raw", "NpgsqlDbType": "Json", "Order": 24 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` --- # Log Database FastTransfer supports logging to a **Microsoft SQL Server** or **PostgreSQL** database. To enable database logging, configure the log database connection string in a settings file: * The default settings file is `FastTransfer_Settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Complete configuration examples for both MSSQL and PostgreSQL are available in the [Configuration Examples](/0.18/documentation/logging/examples.md#fasttransfer_settingsjson-for-windows) page. Information **In case the database is not reachable, FastTransfer will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastTransfer_Settings.json` file to something else (like `FastTransfer_Settings.json.save`) and FastTransfer will use the console log only. --- # Log Files Names Mapping using variables You can use variables to define the log file path and files names in the ***FastTransfer\_Settings.json*** In the **WriteTo** array you can use a **Map** like that : ``` { "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ] } ``` The available variables to customize log path or log filename are : | Variable Name | Description | | ------------------ | ------------------------------------------- | | `{logdate}` | Current date in yyyy-MM-dd format | | `{logtimestamp}` | Timestamp of the log entry | | `{sourcedatabase}` | Name of the source database | | `{sourceschema}` | Name of the source schema | | `{sourcetable}` | Name of the source table | | `{filename}` | Name of the file being processed | | `{runid}` | Run identifier provided in the command line | | `{traceid}` | Unique identifier generate at runtime | You can find complete configuration examples for both Windows and Linux: * **Windows**: [FastTransfer\_Settings\_Map\_for\_Windows.json](/0.18/documentation/logging/examples.md#fasttransfer_settings_map_for_windowsjson) * **Linux/Container**: [FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json](/0.18/documentation/logging/examples.md#fasttransfer_settings_map_for_linux_and_containerjson) --- # Log Levels FastTransfer uses Serilog for logging and supports multiple log levels to control the verbosity of output. You can set the loglevel using the `--loglevel` parameter followed by a value in the list of available log levels. ## Available Log Levels[​](#available-log-levels "Direct link to Available Log Levels") | Level | Description | Use Case | | --------------- | ------------------------------------ | ----------------------------------- | | **Verbose** | Most detailed tracing information | Deep troubleshooting | | **Debug** | Detailed diagnostic information | Development and troubleshooting | | **Information** | General informational messages | Normal operation (default) | | **Warning** | Potentially harmful situations | Issues that don't prevent operation | | **Error** | Error events that allow continuation | Operation failures | | **Fatal** | Severe errors causing termination | Fatal application errors | note The `--loglevel` parameter accepts `verbose`, `debug`, `information`, `warning` and `error`. `Fatal` can only be set through the `MinimumLevel` property of the settings file. ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastTransfer_Settings.json` file by modifying the `MinimumLevel` property: ``` { "Serilog": { "MinimumLevel": "Debug", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "path": "Logs\\FastTransfer_.json", "rollingInterval": "Day" } } ] } } ``` --- # Logging Overview ## Parameter Logs targets using FastTransfer\_Settings.json[​](#parameter-logs-targets-using-fasttransfer_settingsjson "Direct link to Parameter Logs targets using FastTransfer_Settings.json") FastTransfer can log information in 3 modes : * **[Console](/0.18/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/0.18/documentation/logging/log-database.md)** * **[File (or Map)](/0.18/documentation/logging/log-files-names-mapping-using-variables.md)** Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastTransfer_Settings.json` file. By default if no custom path is provided, FastTransfer looks for the settings file in : * the current directory (the working directory) * the same directory where the FastTransfer executable is located (the executable directory). If this file is not present, FastTransfer will use the console log only. You can specify a custom path to the settings file using the `--settingsfile` parameter. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --settingsfile "D:\logs\config\FastTransfer_Settings.json" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --query "select * from orders" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "None" \ --settingsfile "/etc/fasttransfer/FastTransfer_Settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/0.18/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` Expand-Archive -Path .\FastTransfer.zip -DestinationPath .\FastTransfer ``` You can verify the installation by checking the version: ``` .\FastTransfer.exe --version ``` To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` unzip FastTransfer.zip -d FastTransfer ``` On **Linux**, you need to give execution rights to the FastTransfer binary: ``` chmod +x FastTransfer ```
You can verify the installation by checking the version: ``` ./FastTransfer --version ``` FastTransfer is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)**. Pull the latest version: ``` docker pull arpeio/fasttransfer ``` Or pull a specific version: ``` docker pull arpeio/fasttransfer:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fasttransfer:latest --version ```
**You are now ready to run FastTransfer.** License Information After the trial period you will need a valid license. By default, FastTransfer will try to find a `FastTransfer.lic` file in the same directory as the executable. You can also provide another path, a URL, or even the license content using the `--license` parameter. ## Embedded Drivers[​](#embedded-drivers "Direct link to Embedded Drivers") The following database drivers are embedded in FastTransfer: | Database | Embedded Drivers | | ------------- | ---------------- | | Clickhouse | | | DuckDB | | | MS SQL Server | | | MySQL | | | Netezza | | | Oracle | | | PostgreSQL | | | SAP HANA | | | Teradata | | Warning If you need another database not in the list, you can use ODBC or OLEDB but you will need to install your ODBC or OLEDB drivers of your favorite database. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastTransfer can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: **Image:** `arpeio/fasttransfer:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastTransfer with Airflow, you need to install the Docker provider package: ``` pip install apache-airflow-providers-docker ``` Or add it to your Airflow requirements: ``` apache-airflow-providers-docker ``` ## Configure Airflow Connections[​](#configure-airflow-connections "Direct link to Configure Airflow Connections") Airflow connections allow you to securely store and manage credentials for external systems. FastTransfer integration requires connections for your source and target databases. ### A) Source Database Connection (MSSQL Example)[​](#a-source-database-connection-mssql-example "Direct link to A) Source Database Connection (MSSQL Example)") Create an MSSQL connection for your source database: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **ODBC** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `mssql_tpch10` (or your preferred name) * **Connection Type:** `ODBC` (select this from the dropdown) * **Host:** `192.168.65.254` (your database host) * **Port:** `11433` (your database port) * **Login:** Your database username (e.g., `FastLogin`) * **Password:** Your database password * **Extra:** `{"database":"tpch10"}` tip For ODBC connections, the database name should be specified in the Extra JSON field using `{"database":"your_database_name"}`. ### B) Target Database Connection (PostgreSQL Example)[​](#b-target-database-connection-postgresql-example "Direct link to B) Target Database Connection (PostgreSQL Example)") Create a PostgreSQL connection for your target database: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Postgres** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `pg_target` (or your preferred name) * **Connection Type:** `Postgres` (select this from the dropdown) * **Host:** `192.168.65.254` (your database host) * **Port:** `25433` (your database port) * **Schema:** `postgres` *(this is the database name)* * **Login:** `postgres` (your database username) * **Password:** Your database password tip For Postgres connections, the database name is specified in the **Schema** field. ## Integration with DockerOperator[​](#integration-with-dockeroperator "Direct link to Integration with DockerOperator") The [`DockerOperator`](https://airflow.apache.org/docs/apache-airflow-providers-docker/stable/operators.html) from the Docker provider allows you to execute FastTransfer commands in a Docker container directly from your Airflow DAGs. ### Complete DAG Example[​](#complete-dag-example "Direct link to Complete DAG Example") Create a DAG file (e.g., `fasttransfer_orders_mssql_to_pg.py`) in your Airflow DAGs folder: ``` from datetime import datetime from airflow import DAG from airflow.sdk.bases.hook import BaseHook from airflow.providers.docker.operators.docker import DockerOperator def _conn_parts(conn_id: str): """ Extract connection details from Airflow connection. Works with: - ODBC connections (for MSSQL): database in Extra JSON {"database":"name"} - Postgres connections: database in Schema field Returns: tuple: (host, port, user, password, database) """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # Database in Extra {"database": "..."} (for ODBC MSSQL) or in Schema (for Postgres) db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': database not found. Add it to Extra JSON " f'{{"database":"..."}} (for ODBC) or Schema field (for Postgres).' ) return host, port, user, pwd, db with DAG( dag_id="fasttransfer_orders_mssql_to_pg", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fasttransfer", "mssql", "postgres", "docker"], ) as dag: # Extract connection details mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _conn_parts("mssql_tpch10") pg_host, pg_port, pg_user, pg_pwd, pg_db = _conn_parts("pg_target") # FastTransfer Docker task transfer_task = DockerOperator( task_id="transfer_orders", image="arpeio/fasttransfer:latest", docker_url="tcp://host.docker.internal:2375", api_version="auto", auto_remove="success", mount_tmp_dir=False, # Avoids the remote-engine tmp mount warning do_xcom_push=False, command=[ "--sourceconnectiontype", "mssql", "--sourceserver", f"{mssql_host},{mssql_port}", "--sourcedatabase", mssql_db, "--sourceuser", mssql_user, "--sourcepassword", mssql_pwd, "--sourceschema", "dbo", "--sourcetable", "orders", "--targetconnectiontype", "pgcopy", "--targetserver", f"{pg_host}:{pg_port}", "--targetdatabase", pg_db, "--targetuser", pg_user, "--targetpassword", pg_pwd, "--targetschema", "public", "--targettable", "orders", "--loadmode", "Truncate", "--mapmethod", "Name", "--parallelmethod", "Ntile", "--degree", "12", "--distributekeycolumn", "o_orderkey", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastTransfer Docker image * `docker_url`: Docker daemon endpoint * `command`: List of FastTransfer CLI arguments * `auto_remove`: Automatically remove the container after successful execution * `mount_tmp_dir`: Set to `False` to avoid warnings with remote Docker daemons ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes a utility function to streamline connection management: #### `_conn_parts(conn_id)`[​](#_conn_partsconn_id "Direct link to _conn_partsconn_id") Extracts connection details from an Airflow connection. This function: * Retrieves host, port, username, and password from the connection * Extracts the database name from either the Extra JSON field (for ODBC connections) or the Schema field (for Postgres connections) * Returns all components needed to build the FastTransfer connection parameters * Validates that all required fields are present This approach ensures that credentials are managed centrally in Airflow and never hardcoded in DAG files. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Airflow and can be viewed in the Airflow UI: 1. Navigate to **DAGs** in the Airflow UI 2. Click on your DAG (e.g., `fasttransfer_orders_mssql_to_pg`) 3. Click on the task execution (green/red square in the Grid view) 4. Click the **Logs** tab ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") The logs provide detailed information about: * FastTransfer version and configuration * Source and target connection details (with masked passwords) * Data transfer progress * Performance metrics (rows/second, total time) * Exit status ``` [2026-03-02 15:51:45] INFO - Running docker container: arpeio/fasttransfer:latest [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.288 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8415ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.330 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000000 : 2999997 rows x 9 columns in 8458ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.349 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8476ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.442 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8569ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1702771 rows/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15324949 cells/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8809 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9135 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load [2026-03-02 15:51:54] INFO - Task instance in success state [2026-03-02 15:51:54] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 15:51:54] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastTransfer, a high-performance data transfer utility designed for data integration and automation workflows. ## Image Overview[​](#image-overview "Direct link to Image Overview") * **Base image**: `debian:trixie-slim` * **Entrypoint**: `/usr/local/bin/FastTransfer` * **Repository**: [arpe-io/FastTransfer-Image](https://github.com/arpe-io/FastTransfer-Image) * **DockerHub**: [arpeio/fasttransfer](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general) * **Updates**: Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * Optional: `FastTransfer_Settings.json` for custom logging configuration ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags**: Aligned with FastTransfer releases (e.g., `v0.15.0`) * **`latest` tag**: Always points to the most recent FastTransfer version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastTransfer versions are released * **Security updates**: The latest version of each minor branch is automatically rebuilt weekly (every Monday) with the latest base image and security patches ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fasttransfer:latest # Specific version docker pull arpeio/fasttransfer:v0.15.0 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fasttransfer:latest -? # Check version docker run --rm arpeio/fasttransfer:latest --version ``` ## License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.14.0, pass the license content directly via `--license "…"`: ``` export licenseContent=$(cat ./FastTransfer.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fasttransfer:latest \ --license "$licenseContent" \ [other parameters...] ``` Best Practice Prefer `--env-file`, Docker/Compose/Kubernetes secrets, or managed identities for cloud credentials. Avoid leaving the license content in shell history. ## Examples[​](#examples "Direct link to Examples") ### 1. SQL Server → SQL Server (Parallel DB-to-DB Transfer)[​](#1-sql-server--sql-server-parallel-db-to-db-transfer "Direct link to 1. SQL Server → SQL Server (Parallel DB-to-DB Transfer)") ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ arpeio/fasttransfer:latest \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "dest_db" \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "Ntile" \ --distributekeycolumn "id" \ --loadmode "Truncate" \ --degree 8 \ --license "$licenseContent" ``` ### 2. Import CSV Files to SQL Server in Parallel[​](#2-import-csv-files-to-sql-server-in-parallel "Direct link to 2. Import CSV Files to SQL Server in Parallel") ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ -v /local/data:/data \ arpeio/fasttransfer:latest \ --sourceconnectiontype "duckdbstream" \ --sourceserver ":memory:" \ --query "SELECT * FROM read_csv('/data/lineitem*.CSV')" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "tpch_test" \ --targetschema "dbo" \ --targettable "lineitem" \ --parallelmethod "Random" \ --distributekeycolumn "l_orderkey" \ --mapmethod "Name" \ --loadmode "Truncate" \ --degree 16 \ --license "$licenseContent" ``` ## Configuration[​](#configuration "Direct link to Configuration") ### Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` | Volume | Purpose | Access Mode | Notes | | --------- | ---------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | User-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory for file-based operations | Read-many/Write-many | Stores imported or exported data files | | `/work` | Temporary working directory (container WORKDIR) | Read-many/Write-many | Used internally for temporary processing | | `/logs` | Log output directory (per-run or aggregated logs) | Read-many/Write-many | Stores runtime and execution logs | ### Configuring FastTransfer Logging[​](#configuring-fasttransfer-logging "Direct link to Configuring FastTransfer Logging") Available from version 0.14.0 FastTransfer supports custom logging configuration through an external Serilog settings file in JSON format. #### Example: Logging to Console, Airflow, and Dynamic Log Files[​](#example-logging-to-console-airflow-and-dynamic-log-files "Direct link to Example: Logging to Console, Airflow, and Dynamic Log Files") ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context", "Serilog.Formatting.Compact" ], "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console", "applyThemeToRedirectedOutput": false } }, { "Name": "File", "Args": { "path": "/airflow/xcom/return.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" } }, { "Name": "Map", "Args": { "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/log-{filename}-{LogTimestamp}-{TraceId}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8" } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` note * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastTransfer automatically creates it. * The file `/airflow/xcom/return.json` is designed to provide run summaries compatible with Airflow's XCom mechanism. #### Available Tokens for Path or Filename Formatting[​](#available-tokens-for-path-or-filename-formatting "Direct link to Available Tokens for Path or Filename Formatting") | Token | Description | | ------------------ | -------------------------------------------- | | `{logdate}` | Current date in yyyy-MM-dd format | | `{logtimestamp}` | Full timestamp of the log entry | | `{sourcedatabase}` | Name of the source database | | `{sourceschema}` | Name of the source schema | | `{sourcetable}` | Name of the source table | | `{filename}` | Name of the file being processed | | `{runid}` | Run identifier provided in the command line | | `{traceid}` | Unique trace identifier generated at runtime | #### Mounting a Custom Settings File[​](#mounting-a-custom-settings-file "Direct link to Mounting a Custom Settings File") ``` # First, copy your config file to a volume location cp ~/FastTransfer_Settings.json /volumes/fasttransfer-config/ # Then run FastTransfer with mounted volumes docker run --rm \ -v fasttransfer-config:/config \ -v fasttransfer-logs:/logs \ arpeio/fasttransfer:latest \ --settingsfile "/config/FastTransfer_Settings.json" \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "pgcopy" \ --targetserver "host.docker.internal:5432" \ --targetuser "PgUser" \ --targetpassword "PgPass" \ --targetdatabase "pg_db" \ --targetschema "dbo" \ --targettable "orders" \ --degree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --license "$licenseContent" ``` --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastTransfer data migration workflows. FastTransfer can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: **Image:** `arpeio/fasttransfer:latest`
**Repository:** ## Integration Methods[​](#integration-methods "Direct link to Integration Methods") Kestra offers two primary methods to orchestrate FastTransfer execution: ### Method 1: Using Docker Run Plugin (Recommended)[​](#method-1-using-docker-run-plugin-recommended "Direct link to Method 1: Using Docker Run Plugin (Recommended)") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastTransfer commands in a Docker container. ``` id: fasttransfer_docker_kestra_v2 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - FastLogin - --sourcepassword - FastPassword - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - postgres - --targetpassword - postgres - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --parallelmethod - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastTransfer Docker image * `commands`: Array of FastTransfer CLI arguments ### Method 2: Using Shell Commands with Docker Task Runner[​](#method-2-using-shell-commands-with-docker-task-runner "Direct link to Method 2: Using Shell Commands with Docker Task Runner") Alternatively, you can use the [`io.kestra.plugin.scripts.shell.Commands`](https://kestra.io/plugins/plugin-script-shell/io.kestra.plugin.scripts.shell.commands) plugin with a Docker task runner: ``` id: fasttransfer_docker_kestra namespace: arpe.io tasks: - id: shell type: io.kestra.plugin.scripts.shell.Commands containerImage: arpeio/fasttransfer:latest taskRunner: type: io.kestra.plugin.scripts.runner.docker.Docker host: "tcp://host.docker.internal:2375" commands: - >- /usr/local/bin/FastTransfer --sourceconnectiontype mssql --sourceserver "192.168.65.254,11433" --sourcedatabase "tpch10" --sourceuser "FastLogin" --sourcepassword "FastPassword" --sourceschema "dbo" --sourcetable "orders" --targetconnectiontype pgcopy --targetserver "192.168.65.254:25433" --targetdatabase "postgres" --targetuser "postgres" --targetpassword "postgres" --targetschema "public" --targettable "orders" --loadmode Truncate --mapmethod Name --parallelmethod Ntile --degree 12 --distributekeycolumn "o_orderkey" --nobanner ``` This method allows you to execute shell commands within the FastTransfer Docker container, providing more flexibility for complex workflows. ## Securing Sensitive Data with Kestra Secrets[​](#securing-sensitive-data-with-kestra-secrets "Direct link to Securing Sensitive Data with Kestra Secrets") To protect sensitive information like passwords and connection strings, Kestra provides a built-in [secrets management](https://kestra.io/docs/concepts/secret) feature. You can store credentials securely and reference them in your flows using the `{{ secret('SECRET_NAME') }}` syntax. ### Creating Secrets in Kestra[​](#creating-secrets-in-kestra "Direct link to Creating Secrets in Kestra") To create secrets in Kestra: 1. Navigate to the Kestra UI 2. Go to **Tenant** → **Secrets** 3. Add your secrets with appropriate keys: * `FASTTRANSFER_MSSQL_USER` * `FASTTRANSFER_MSSQL_PASSWORD` * `FASTTRANSFER_PG_USER` * `FASTTRANSFER_PG_PASSWORD` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fasttransfer_docker_kestra_v3 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - "{{ secret('FASTTRANSFER_MSSQL_USER') }}" - --sourcepassword - "{{ secret('FASTTRANSFER_MSSQL_PASSWORD') }}" - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - "{{ secret('FASTTRANSFER_PG_USER') }}" - --targetpassword - "{{ secret('FASTTRANSFER_PG_PASSWORD') }}" - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --parallelmethod - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` This approach ensures that sensitive credentials are never exposed in your flow definitions and can be managed centrally. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Kestra and can be viewed directly in the Kestra UI. To access the logs: 1. Navigate to the Kestra UI 2. Go to **Executions** 3. Select your flow execution 4. Click on the **Logs** tab The logs provide detailed information about the transfer process, including configuration parameters, connection details, data transfer progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02 15:51:45.3752026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False 2026-03-02 15:51:45.3792026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit 2026-03-02 15:51:45.6342026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) 2026-03-02 15:51:45.8702026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms 2026-03-02 15:51:45.8722026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8842026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8912026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9002026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9112026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:54.2332026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms 2026-03-02 15:51:54.2382026-03-02T15:51:54.238 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8365ms 2026-03-02 15:51:54.2412026-03-02T15:51:54.241 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8368ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000004 : 3000001 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1766084 rows/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15894756 cells/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8494 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9142 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load 2026-03-02 15:51:54.448Command succeed with exit code 0 2026-03-02 15:51:54.450Container deleted: ca0de79e3eb4ede961668cb5080e4c20f858960c118d10731b8e0ade3ad87685 2026-03-02 15:51:54.455Volume deleted: a6b822d7677064a91d2dd555c360dc61ec49e3954149eacd5c22549c2a300850 ``` --- # PostgreSQL The **pg\_fasttransfer** extension allows you to run the FastTransfer tool directly from an SQL function, enabling fast data transfer between databases directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fasttransfer](https://github.com/arpe-io/pg_fasttransfer) * **License**: MIT * **Latest version**: v0.16.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fasttransfer Demo](/assets/images/pg_fasttransfer-830298c99dd0228e80b5337126bb0c7c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastTransfer commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get transfer statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastTransfer parameters ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * FastTransfer binaries installed on the system Important The PostgreSQL server process usually runs under the `postgres` user account. You must ensure that this user has the appropriate permissions to execute the `FastTransfer` binary and read the license file. ## Compatibility[​](#compatibility "Direct link to Compatibility") * Windows * Linux | PostgreSQL Version | Supported | | ------------------ | --------- | | PostgreSQL 18 | | | PostgreSQL 17 | | | PostgreSQL 16 | | | PostgreSQL 15 | | **Debian/Ubuntu 22.04 LTS** | PostgreSQL Version | Supported | | ------------------ | --------- | | PostgreSQL 18 | | | PostgreSQL 17 | | | PostgreSQL 16 | | | PostgreSQL 15 | | info Other distributions or PostgreSQL versions may work but have not been officially tested. ## Installation[​](#installation "Direct link to Installation") Download the Extension Download the appropriate release for your PostgreSQL version and operating system from the [pg\_fasttransfer releases page](https://github.com/arpe-io/pg_fasttransfer/releases). * Linux * Windows **Automated Installation** The easiest way to install the extension on Linux is by using the `install-linux.sh` script included in the archive. 1. Extract the contents of the archive into a folder. This folder should contain: * `pg_fasttransfer.so` * `pg_fasttransfer.control` * `pg_fasttransfer--1.0.sql` * `install-linux.sh` 2. Make the script executable: ``` chmod +x install-linux.sh ``` 3. Run the script with administrator privileges: ``` sudo ./install-linux.sh ``` The script will automatically detect your PostgreSQL installation and copy the files to the correct locations. **Manual Installation** If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service: ``` sudo systemctl stop postgresql ``` 2. Locate your PostgreSQL installation directory, typically: `/usr/lib/postgresql/` 3. Copy the files into the appropriate directories: ``` sudo cp pg_fasttransfer.so /usr/lib/postgresql//lib/ sudo cp pg_fasttransfer.control pg_fasttransfer--1.0.sql /usr/share/postgresql//extension/ ``` 4. Restart your PostgreSQL service: ``` sudo systemctl start postgresql ``` **Permissions Setup** Ensure the `postgres` user has proper permissions: ``` # Grant execute permission on the FastTransfer binary sudo chmod +x /path/to/FastTransfer sudo chown postgres:postgres /path/to/FastTransfer sudo chmod 750 /path/to/FastTransfer # Grant read permission on the license file sudo chown postgres:postgres /path/to/license.lic sudo chmod 640 /path/to/license.lic ``` **Automated Installation** 1. Extract the contents of the ZIP file into a folder. This folder should contain: * `pg_fasttransfer.dll` * `pg_fasttransfer.control` * `pg_fasttransfer--1.0.sql` * `install-win.bat` 2. Right-click on the `install-win.bat` file and select "Run as administrator" 3. The script will automatically detect your PostgreSQL installation and copy the files to the correct locations **Manual Installation** If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service 2. Locate your PostgreSQL installation folder, typically: ``` C:\Program Files\PostgreSQL\ ``` 3. Copy the `pg_fasttransfer.dll` file into the `lib` folder 4. Copy the `pg_fasttransfer.control` and `pg_fasttransfer--1.0.sql` files into the `share\extension` folder 5. Restart your PostgreSQL service **Permissions Setup** Make sure that the PostgreSQL service account (by default `NT AUTHORITY\NetworkService` or `postgres`) has: * Execute permission on the `FastTransfer.exe` binary * Read permission on the `.lic` file ## SQL Setup[​](#sql-setup "Direct link to SQL Setup") After the files are in place, you need to set up the extension in your database. ### Drop existing extension (if any)[​](#drop-existing-extension-if-any "Direct link to Drop existing extension (if any)") ``` DROP EXTENSION IF EXISTS pg_fasttransfer CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fasttransfer CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fasttransfer\_encrypt[​](#pg_fasttransfer_encrypt "Direct link to pg_fasttransfer_encrypt") This function encrypts a given text string using `pgp_sym_encrypt` and encodes the result in base64. It is useful for storing sensitive information, such as passwords, in a secure manner within your SQL scripts. The `xp_RunFastTransfer_secure` function will automatically decrypt any values passed to its `--sourcepassword` and `--targetpassword` arguments. **Syntax:** ``` pg_fasttransfer_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fasttransfer_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastTransfer\_secure[​](#xp_runfasttransfer_secure "Direct link to xp_RunFastTransfer_secure") This is the main function to execute the FastTransfer tool. It takes various parameters to configure the data transfer operation. Password arguments (`sourcepassword`, `targetpassword`) will be automatically decrypted. **Syntax:** ``` xp_RunFastTransfer_secure( sourceconnectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, sourcedsn text DEFAULT NULL, sourceprovider text DEFAULT NULL, sourceserver text DEFAULT NULL, sourceuser text DEFAULT NULL, sourcepassword text DEFAULT NULL, sourcetrusted boolean DEFAULT FALSE, sourcedatabase text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, query text DEFAULT NULL, fileinput text DEFAULT NULL, targetconnectiontype text DEFAULT NULL, targetconnectstring text DEFAULT NULL, targetserver text DEFAULT NULL, targetuser text DEFAULT NULL, targetpassword text DEFAULT NULL, targettrusted boolean DEFAULT FALSE, targetdatabase text DEFAULT NULL, targetschema text DEFAULT NULL, targettable text DEFAULT NULL, degree integer DEFAULT NULL, method text DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, loadmode text DEFAULT NULL, batchsize integer DEFAULT NULL, useworktables boolean DEFAULT FALSE, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, mapmethod text DEFAULT NULL, license text DEFAULT NULL, loglevel text DEFAULT NULL, nobanner boolean DEFAULT NULL, fasttransfer_path text DEFAULT NULL, debug boolean DEFAULT FALSE ) RETURNS TABLE ( exit_code integer, output text, error_message text, total_rows bigint, total_columns integer, transfer_time_ms bigint, total_time_ms bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to SQL Server[​](#linux-example---postgresql-to-sql-server "Direct link to Linux Example - PostgreSQL to SQL Server") Transfer data from PostgreSQL to SQL Server using the extension: ``` SELECT * FROM xp_RunFastTransfer_secure( targetconnectiontype := 'msbulk', sourceconnectiontype := 'pgsql', sourceserver := 'localhost:5432', sourceuser := 'postgres', sourcepassword := pg_fasttransfer_encrypt('MyActualPassword'), sourcedatabase := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', targetserver := 'localhost,1433', targetuser := 'migadmin', targetpassword := pg_fasttransfer_encrypt('AnotherSecurePassword'), targetdatabase := 'target_db', targetschema := 'tpch_1', targettable := 'orders', loadmode := 'Truncate', license := '/tmp/FastTransfer_linux-x64_v0.15.0/FastTransfer.lic', loglevel := 'information', nobanner := false, fasttransfer_path := '/tmp/FastTransfer_linux-x64_v0.15.0', debug := true ); ``` ### Windows Example - SQL Server to PostgreSQL[​](#windows-example---sql-server-to-postgresql "Direct link to Windows Example - SQL Server to PostgreSQL") Transfer data from SQL Server to PostgreSQL: ``` SELECT * FROM xp_RunFastTransfer_secure( sourceconnectiontype := 'mssql', sourceserver := 'localhost', sourcepassword := pg_fasttransfer_encrypt('MyWindowsPassword'), sourceuser := 'FastLogin', sourcedatabase := 'tpch10', sourceschema := 'dbo', sourcetable := 'orders', targetconnectiontype := 'pgcopy', targetserver := 'localhost:15433', targetuser := 'postgres', targetpassword := pg_fasttransfer_encrypt('MyPostgresPassword'), targetdatabase := 'postgres', targetschema := 'public', targettable := 'orders', method := 'Ntile', degree := 12, distributekeycolumn := 'o_orderkey', loadmode := 'Truncate', batchsize := 1048576, mapmethod := 'Position', loglevel := 'information', nobanner := true, fasttransfer_path := 'D:\sources\FastTransfer', debug := true ); ``` ## Function Return Structure[​](#function-return-structure "Direct link to Function Return Structure") The function returns a table with the following columns: | Column | Type | Description | | ------------------ | ------- | -------------------------------------------------------- | | `exit_code` | integer | The exit code of the FastTransfer process | | `output` | text | The full log output from FastTransfer (if debug is TRUE) | | `error_message` | text | Only the lines containing ERROR from the output | | `total_rows` | bigint | The total number of rows transferred | | `total_columns` | integer | The total number of columns transferred | | `transfer_time_ms` | bigint | Transfer time in milliseconds | | `total_time_ms` | bigint | Total execution time in milliseconds | ## Debug Parameter[​](#debug-parameter "Direct link to Debug Parameter") The `debug` parameter is a boolean flag that controls whether the full FastTransfer output is returned in the `output` column: * When `debug := true`, `output` contains the entire log from FastTransfer * When `debug := false` (default), `output` is an empty string, but `error_message` will still contain any error lines ## Resources[​](#resources "Direct link to Resources") * [pg\_fasttransfer GitHub Repository](https://github.com/arpe-io/pg_fasttransfer) * [FastTransfer Documentation](https://fasttransfer.arpe.io/) * [Get a Trial License](https://arpe.io/get-trial?product=FastTransfer) * [Report Issues](https://github.com/arpe-io/pg_fasttransfer/issues) --- # SQL Server The **FastWrappers-TSQL** project wraps FastTransfer (and FastBCP) in a CLR Assembly, allowing you to call them directly from T-SQL using extended stored procedures. This enables seamless data transfer operations without leaving your SQL Server environment. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [aetperf/FastWrappers-TSQL](https://github.com/aetperf/FastWrappers-TSQL) * **Latest version**: v0.7.0 * **Platforms**: Windows and Linux * **Compatibility**: SQL Server 2016+ info This wrapper includes both **FastTransfer** (for database-to-database transfers and file imports) and **FastBCP** (for database-to-file exports). This documentation focuses on the FastTransfer functionality. ## Features[​](#features "Direct link to Features") * **Native SQL Server Integration**: Execute FastTransfer commands directly from T-SQL * **Secure Password Management**: Built-in AES-256 encryption for sensitive credentials * **CLR Assembly Integration**: Runs as extended stored procedures * **Detailed Result Return**: Get transfer statistics and performance metrics as SQL results * **Flexible Configuration**: Support for all FastTransfer parameters and connection types * **Role-Based Security**: Predefined database roles for access control ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * SQL Server 2016 or later * CLR integration enabled * Valid FastTransfer binaries * Valid FastTransfer license (request a [trial license](https://arpe.io/get-trial?product=FastTransfer)) * Administrator privileges for initial setup Important The SQL Server service account must have read/execute permissions on the FastTransfer directory and binaries. ## Installation[​](#installation "Direct link to Installation") Download the latest release from the [Releases page](https://github.com/aetperf/FastWrappers-TSQL/releases). Choose the installation method based on your SQL Server version: ### Recommended Installation Methods[​](#recommended-installation-methods "Direct link to Recommended Installation Methods") 1. **[FastWrappers-TSQL.bak](https://github.com/aetperf/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.bak)** - SQL Server Backup file (**recommended for SQL Server 2019+** - restore using SSMS)
Requires manual CLR activation and trusted assembly configuration after restore 2. **[FastWrappers-TSQL.sql](https://github.com/aetpefl/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.sql)** - Pure SQL Script (**recommended for SQL Server 2016+** - all-in-one installation)
Complete installation in a single script - execute using sqlcmd or SSMS ### Post-Installation Configuration[​](#post-installation-configuration "Direct link to Post-Installation Configuration") info This section only applies to the **.bak** installation method. The **.sql** script includes all necessary configuration steps automatically. After restoring the database, you **must** configure CLR integration. Two options are available: * Trusted Assembly (Recommended) * TRUSTWORTHY ON (Dev/Test) This approach is **more secure** as it keeps TRUSTWORTHY OFF and doesn't require changing the database owner: ``` -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Extract the assembly hash and add it to trusted assemblies DECLARE @hash VARBINARY(64); SELECT @hash = HASHBYTES('SHA2_512', content) FROM sys.assembly_files WHERE assembly_id = ( SELECT assembly_id FROM sys.assemblies WHERE name = 'FastWrappers_TSQL' ); EXEC sys.sp_add_trusted_assembly @hash = @hash, @description = N'FastWrappers_TSQL Assembly v0.7.0'; GO ``` **Advantages:** * TRUSTWORTHY remains OFF (more secure) * No need to change database owner * Only this specific assembly is trusted tip The assembly hash changes with each version. When upgrading, remove the old hash first: ``` EXEC sys.sp_drop_trusted_assembly @hash = ; ``` This approach is simpler but **less secure**. Use only for development/testing environments: ``` -- Enable TRUSTWORTHY for signed UNSAFE assemblies ALTER DATABASE [FastWrappers-TSQL] SET TRUSTWORTHY ON; GO -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Set database owner to 'sa' (required for signed UNSAFE assemblies) EXEC sp_changedbowner 'sa'; GO ``` Critical The `sp_changedbowner 'sa'` command is **required**. Without it, you will encounter error 0x80FC80F1 when executing stored procedures. ## Security Roles[​](#security-roles "Direct link to Security Roles") ### FastTransfer\_Executor[​](#fasttransfer_executor "Direct link to FastTransfer_Executor") The FastWrappers-TSQL database includes a predefined database role that grants `EXECUTE` permission on the **xp\_RunFastTransfer\_secure** stored procedure. ``` -- Add a user to the role ALTER ROLE [FastTransfer_Executor] ADD MEMBER [YourUserName]; GO ``` tip Users also need access to the **dbo.EncryptString** function to generate encrypted passwords: ``` GRANT EXECUTE ON dbo.EncryptString TO [YourUserName]; GO ``` ## Available Functions[​](#available-functions "Direct link to Available Functions") ### dbo.EncryptString - Password Encryption[​](#dboencryptstring---password-encryption "Direct link to dbo.EncryptString - Password Encryption") Encrypts passwords using AES-256 encryption for secure storage and transmission. ``` SELECT dbo.EncryptString('YourPassword') ``` **Returns:** Base64-encoded encrypted string **Example:** ``` SELECT dbo.EncryptString('MySecretPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== ``` ### dbo.xp\_RunFastTransfer\_secure - Data Transfer[​](#dboxp_runfasttransfer_secure---data-transfer "Direct link to dbo.xp_RunFastTransfer_secure - Data Transfer") Wraps the FastTransfer CLI to transfer data between databases with streaming and parallel processing. **Example:** ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'D:\FastTransfer\', @sourceConnectionType = 'mssql', @sourceServer = 'localhost,11433', @sourceUser = 'FastLogin', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = 'tpch10', @sourceSchema = 'dbo', @sourceTable = 'orders', @targetConnectionType = 'pgcopy', @targetServer = 'localhost:25433', @targetUser = 'postgres', @targetPasswordSecure = 'RAAFe/XJ7O0P1I5T0rJhjQ==', @targetDatabase = 'postgres', @targetSchema = 'public', @targetTable = 'orders', @loadmode = 'Truncate', @method = 'Ntile', @distributeKeyColumn = 'o_orderkey', @degree = 12, @mapmethod = 'Name', @debug = 1, @noBanner = 0, @useWorkTables = 0, @loglevel = 'debug' ``` ## Output and Logging[​](#output-and-logging "Direct link to Output and Logging") ### Transfer Metrics[​](#transfer-metrics "Direct link to Transfer Metrics") The **xp\_RunFastTransfer\_secure** stored procedure returns a structured result set: | Column | Type | Description | | -------------- | ------------- | ----------------------------------------- | | targetdatabase | nvarchar(128) | Target database name | | targetSchema | nvarchar(128) | Target schema name | | targetTable | nvarchar(128) | Target table name | | TotalRows | bigint | Number of rows transferred | | TotalColumns | int | Number of columns transferred | | TotalCells | bigint | Total cells transferred (rows × columns) | | TotalTimeMs | bigint | Total execution time in milliseconds | | Status | int | Exit code (0 = success, non-zero = error) | | StdErr | nvarchar(max) | Error message if Status ≠ 0 | **Example output:** ``` targetdatabase targetSchema targetTable TotalRows TotalColumns TotalCells TotalTimeMs Status postgres public orders 15000000 9 135000000 27502 0 ``` ### Debug Mode[​](#debug-mode "Direct link to Debug Mode") Set `@debug = 1` to output additional information: * Complete command line being executed (passwords masked) * Full console output from FastTransfer * Real-time progress updates * Performance metrics ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest', -- ... other parameters ... @debug = 1 -- Enable verbose logging ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### SQL Server to SQL Server (12 threads)[​](#sql-server-to-sql-server-12-threads "Direct link to SQL Server to SQL Server (12 threads)") Transfer a table between two SQL Server instances using parallel processing: ``` -- First, encrypt your password SELECT dbo.EncryptString('YourPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== -- Then execute the transfer EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = N'mssql', @sourceServer = N'localhost', @sourceUser = N'FastUser', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = N'tpch_test', @sourceSchema = N'dbo', @sourceTable = N'orders', @targetConnectionType = N'msbulk', @targetServer = N'localhost\SS2025', @targetUser = N'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = N'tpch_test', @targetSchema = N'dbo', @targetTable = N'orders_copy', @loadMode = N'Truncate', @batchSize = 130000, @method = N'RangeId', @distributeKeyColumn = N'o_orderkey', @degree = 12, @mapmethod = 'Name', @runId = N'SQL_to_SQL_Parallel_Transfer'; ``` ### Oracle to SQL Server (12 threads)[​](#oracle-to-sql-server-12-threads "Direct link to Oracle to SQL Server (12 threads)") Transfer data from Oracle to SQL Server with parallel RangeId method: ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'oraodp', @sourceServer = 'oracle-server:1521/ORCL', @sourceUser = 'oracle_user', @sourcePasswordSecure = '', @sourceSchema = 'SALES', @sourceTable = 'ORDERS', @targetConnectionType = 'msbulk', @targetServer = 'localhost\SS2025', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'tpch_test', @targetSchema = 'dbo', @targetTable = 'orders_from_oracle', @loadMode = 'Truncate', @batchSize = 130000, @method = 'RangeId', @distributeKeyColumn = 'order_id', @degree = 12, @mapmethod = 'Name', @runId = 'Oracle_to_SQL_Transfer'; ``` ### PostgreSQL to SQL Server (8 threads)[​](#postgresql-to-sql-server-8-threads "Direct link to PostgreSQL to SQL Server (8 threads)") Use PostgreSQL's native Ctid method for optimal performance: ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'pgcopy', @sourceServer = 'postgres-server:5432', @sourceUser = 'postgres', @sourcePasswordSecure = '', @sourceDatabase = 'sales_db', @sourceSchema = 'public', @sourceTable = 'customers', @targetConnectionType = 'msbulk', @targetServer = 'localhost', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'crm', @targetSchema = 'dbo', @targetTable = 'customers', @loadMode = 'Append', @batchSize = 100000, @method = 'Ctid', @degree = 8, @mapmethod = 'Name', @runId = 'PG_to_SQL_Ctid'; ``` ## Additional Resources[​](#additional-resources "Direct link to Additional Resources") * [FastTransfer Documentation](/0.18/.md) * [GitHub Repository](https://github.com/aetperf/FastWrappers-TSQL) ## Support[​](#support "Direct link to Support") For issues or questions: * FastWrappers-TSQL: [GitHub Issues](https://github.com/aetperf/FastWrappers-TSQL/issues) * FastTransfer: [Contact ARPE Support](https://arpe.io/contact) --- # Release Notes 0.16 ## New Parameters[​](#new-parameters "Direct link to New Parameters") * Added the `--version` to display the version ## Other[​](#other "Direct link to Other") * Improve logging * Bump dependencies # Fixes * Sap HANA fix drivers inclusion for Linux See [Advanced Parameters](/0.18/documentation/cli/advanced_parameters.md) for complete details. ### Notes[​](#notes "Direct link to Notes") * v0.16.2 is the final release supporting .NET 7. ⚠️ Future versions will drop .NET 7 support, which may reduce operating system compatibility. --- # Release Notes 0.17 ## .NET Runtime Updates[​](#net-runtime-updates "Direct link to .NET Runtime Updates") * **Removed .NET 7 support** - FastTransfer no longer supports .NET 7 runtime * **Upgraded to .NET 10.0** - Migrated from .NET 8.0 to .NET 10.0 for improved performance and security ## New Features[​](#new-features "Direct link to New Features") ### Environment Variables[​](#environment-variables "Direct link to Environment Variables") FastTransfer 0.17 introduces support for environment variables to configure runtime behavior: #### FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES[​](#fasttransfer_loadsteptimeout_minutes "Direct link to FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES") Controls the bulk load timeout for `msbulk` and `orabulk` target connection types. * **Default**: 60 minutes * **Usage**: Set this variable to override the default timeout (in minutes) * **Example**: ``` # Windows set FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Linux export FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 ``` #### FASTTRANSFER\_SORTEDINPUT[​](#fasttransfer_sortedinput "Direct link to FASTTRANSFER_SORTEDINPUT") Forces the sorted hint for `msbulk` target connections, which can improve performance when data is already sorted by the clustered index. * **Values**: `true` or `false` * **Default**: `false` * **Usage**: Set to `true` to force sorted input mode, or `false` to disable it * **Example**: ``` # Windows set FASTTRANSFER_SORTEDINPUT=true # Linux export FASTTRANSFER_SORTEDINPUT=true ``` See [Environment Variables](/0.18/documentation/environment-variables/overview.md) for complete details. ## Other Improvements[​](#other-improvements "Direct link to Other Improvements") --- # Release Notes 0.18 ## 0.18.1 - Security Update[​](#0181---security-update "Direct link to 0.18.1 - Security Update") FastTransfer 0.18.1 is a maintenance release. It fixes two .NET vulnerabilities in a bundled dependency and includes a consistency fix for the `Ctid` method. **Upgrading is recommended for all 0.18.0 users.** ### Security Fixes[​](#security-fixes "Direct link to Security Fixes") FastTransfer 0.18.0 and earlier bundle `System.Security.Cryptography.Pkcs` 9.0.13, a transitive dependency of the SQL Server and Oracle drivers. This version is affected by two vulnerabilities disclosed by Microsoft on **October 13, 2026**: | CVE | Severity | Issue | Platforms | | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------------------- | | [CVE-2026-84008](https://www.cve.org/CVERecord?id=CVE-2026-84008) ([GHSA-846f-f764-76mx](https://github.com/advisories/GHSA-846f-f764-76mx)) | High (CVSS 7.5) | Denial of service: `SignedCms.CheckSignature` can repeatedly reparse attacker-controlled X.509 data, causing CPU exhaustion | Windows, Linux, macOS | | [CVE-2026-70162](https://www.cve.org/CVERecord?id=CVE-2026-70162) ([GHSA-2fmv-rv2c-59x7](https://github.com/advisories/GHSA-2fmv-rv2c-59x7)) | Moderate (CVSS 5.9) | Denial of service: `EnvelopedCms.Decode` can perform quadratic work on attacker-supplied CMS / PKCS#7 data, causing CPU exhaustion | Windows | FastTransfer 0.18.1 ships the patched version, `System.Security.Cryptography.Pkcs` **10.0.13**. **Who is affected?** All FastTransfer versions up to and including 0.18.0 contain the vulnerable library. The actual exposure is low: * Both vulnerabilities only affect **availability** (high CPU usage). They cannot leak or modify your data. * FastTransfer itself does not call the vulnerable APIs, and neither do the bundled drivers in a standard transfer (SQL Server, PostgreSQL, Oracle, MySQL, etc.). The license check does not use this library. * The only related code path is SQL Server **Always Encrypted with secure enclaves (VBS/HGS attestation)**. In that case, the SQL Server driver decodes signed data returned by the attestation service. It does not call the vulnerable `CheckSignature` method. Vulnerability scanners (Dependabot, NuGet audit, binary scanners) flag the vulnerable version whatever the code path, so upgrading is still required for compliance. **How to fix it?** Replace the FastTransfer binary with version 0.18.1. FastTransfer is a self-contained executable that embeds its own .NET runtime and libraries: updating the .NET runtime installed on the server does **not** fix it. ### Dependency Updates[​](#dependency-updates "Direct link to Dependency Updates") | Package | 0.18.0 | 0.18.1 | | ---------------------------------------------------------------------- | --------- | --------- | | System.Security.Cryptography.Pkcs | 9.0.13 | 10.0.13 | | Microsoft.Data.SqlClient | 7.0.1 | 7.1.1 | | Oracle.ManagedDataAccess.Core | 23.26.200 | 23.26.301 | | Npgsql | 10.0.2 | 10.0.3 | | MySqlConnector | 2.5.0 | 2.6.2 | | DuckDB.NET.Data.Full | 1.5.2 | 1.5.6.1 | | Teradata.Client.Provider | 20.0.9 | 20.0.10 | | Microsoft.Extensions.Configuration / Logging, System.Data.Odbc / OleDb | 10.0.8 | 10.0.13 | | Serilog | 4.3.1 | 4.4.0 | The .NET runtime embedded in the binary is 10.0.13, which includes the October 2026 .NET security fixes. ### Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **`Ctid` method, `pgcopy` source and `pgcopy` target**: every chunk now reads from the same snapshot (`REPEATABLE READ` with an exported snapshot). Before, these chunks each used their own `READ COMMITTED` snapshot, so a `Ctid` transfer of a table being written to could be inconsistent across chunks. Queries containing the word `COPY` (for example a table named `COPYTABLE`) are no longer truncated. *** *The sections below describe the changes introduced in 0.18.0.* ## New Parallel Methods[​](#new-parallel-methods "Direct link to New Parallel Methods") ### DBPartition[​](#dbpartition "Direct link to DBPartition") `DBPartition` uses the native partitions of the source table: each partition is transferred in its own stream, biggest partitions first. No distribute key column is needed. * **Sources**: SQL Server (`mssql`, `msoledbsql`), PostgreSQL (`pgsql`, `pgcopy`), Oracle (`oraodp`), MySQL (`mysql`), Teradata (`teradata`, row partitioning only) * **Requires**: `--sourceschema` and `--sourcetable` (`--query` is not allowed) * **Fallback**: if the table is not partitioned, FastTransfer logs a warning and transfers it with `None` ``` ./FastTransfer \ --sourceconnectiontype "mssql" --sourceserver "localhost" --sourcedatabase "tpch" --sourcetrusted \ --sourceschema "dbo" --sourcetable "lineitem_part" \ --targetconnectiontype "pgcopy" --targetserver "localhost:5432" --targetdatabase "tpch" \ --targetuser "postgres" --targetpassword "mypassword" \ --targetschema "public" --targettable "lineitem" \ --parallelmethod "DBPartition" --degree 8 --loadmode "Truncate" ``` See [Parallel Parameters - DBPartition](/0.18/documentation/cli/parallel_parameters.md#dbpartition). ### Timepartition[​](#timepartition "Direct link to Timepartition") `Timepartition` splits the data on the time parts of a date column: one stream per year, month, day or ISO week, biggest first. `--distributekeycolumn` is a tuple: | Tuple | One stream per | | ------------------------------ | -------------- | | `(date_column,year)` | Year | | `(date_column,year,month)` | Month | | `(date_column,year,month,day)` | Day | | `(date_column,year,week)` | ISO week | * Works with a source table or a `--query` * Rows with a NULL date are transferred in a dedicated stream ``` ./FastTransfer \ --sourceconnectiontype "mssql" --sourceserver "localhost" --sourcedatabase "tpch" --sourcetrusted \ --query "SELECT * FROM dbo.lineitem WHERE l_shipmode = 'AIR'" \ --targetconnectiontype "pgcopy" --targetserver "localhost:5432" --targetdatabase "tpch" \ --targetuser "postgres" --targetpassword "mypassword" \ --targetschema "public" --targettable "lineitem_air" \ --parallelmethod "Timepartition" --distributekeycolumn "(l_shipdate,year,month)" --degree 8 ``` See [Parallel Parameters - Timepartition](/0.18/documentation/cli/parallel_parameters.md#timepartition). ### New Environment Variable: FASTTRANSFER\_DATEFORMAT[​](#new-environment-variable-fasttransfer_dateformat "Direct link to New Environment Variable: FASTTRANSFER_DATEFORMAT") Sets the format of the date bounds sent by the `Timepartition` method: `yyyy-MM-dd` (default) or `yyyyMMdd`. ``` # Windows (PowerShell) $env:FASTTRANSFER_DATEFORMAT = "yyyyMMdd" # Linux export FASTTRANSFER_DATEFORMAT=yyyyMMdd ``` See [FASTTRANSFER\_DATEFORMAT](/0.18/documentation/environment-variables/dateformat.md). ## Bug Fixes[​](#bug-fixes-1 "Direct link to Bug Fixes") * **`msbulk` target, partitioned table with a rowstore clustered index**: `DataDriven` (and the new `DBPartition` / `Timepartition` methods) no longer fail with *"Cannot bulk load. The bulk data stream was incorrectly specified as sorted"*. The sorted hint is now only sent to heap and columnstore targets, or when [FASTTRANSFER\_SORTEDINPUT](/0.18/documentation/environment-variables/sortedinput.md) is `true`. See [SQL Server target and sorted hint](/0.18/documentation/cli/parallel_parameters.md#sql-server-target-and-sorted-hint). * **`pgcopy` target, NULL values**: NULL values coming from a non-PostgreSQL source are now loaded as NULL. Before, NULL dates (and other non-text types) failed the load with *"invalid input syntax"*, and NULL text values were loaded as empty strings. ## Wizard[​](#wizard "Direct link to Wizard") The [Command Wizard](/0.18/wizard.md) now offers the `DBPartition` and `Timepartition` methods. --- # Sitemap ## [Installation](/0.18/installation.md)[​](#installation "Direct link to installation") ## [Wizard GUI](/0.18/wizard.md)[​](#wizard-gui "Direct link to wizard-gui") ## Documentation[​](#documentation "Direct link to Documentation") * [Getting Started](/0.18/.md) * CLI * [Authentication](/0.18/documentation/cli/authentication.md) * [Source Connection Parameters](/0.18/documentation/cli/source_connection_parameters.md) * [Target Connection Parameters](/0.18/documentation/cli/target_connection_parameters.md) * [Transfer Parameters](/0.18/documentation/cli/transfer_parameters.md) * [Parallel Parameters](/0.18/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/0.18/documentation/cli/advanced_parameters.md) * [License](/0.18/documentation/cli/license.md) * Environment Variables * [Overview](/0.18/documentation/environment-variables/overview.md) * [FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES](/0.18/documentation/environment-variables/loadsteptimeout.md) * [FASTTRANSFER\_SORTEDINPUT](/0.18/documentation/environment-variables/sortedinput.md) * [FASTTRANSFER\_DATEFORMAT](/0.18/documentation/environment-variables/dateformat.md) * Logging * [Overview](/0.18/documentation/logging/Overview.md) * [Logs Level](/0.18/documentation/logging/logs-level.md) * [Log Database](/0.18/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/0.18/documentation/logging/log-files-names-mapping-using-variables.md) * [Examples](/0.18/documentation/logging/examples.md) * Examples * [SQL Server Examples](/0.18/documentation/examples/sql-server.md) * [PostgreSQL Examples](/0.18/documentation/examples/postgresql.md) * [MySQL Examples](/0.18/documentation/examples/mysql.md) * [Oracle Examples](/0.18/documentation/examples/oracle.md) * [Other Databases](/0.18/documentation/examples/other-databases.md) * [CSV Import](/0.18/documentation/examples/csv-import.md) * [JSON Import](/0.18/documentation/examples/json-import.md) * [Parquet Import](/0.18/documentation/examples/parquet-import.md) * [Advanced Scenarios](/0.18/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/0.18/documentation/compatibility/sources_platforms.md) * [Operating Systems](/0.18/documentation/compatibility/operating_systems.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/0.18/integration/docker-integration.md) * [Kestra](/0.18/integration/kestra-integration.md) * [PostgreSQL](/0.18/integration/postgresql-integration.md) * [SQL Server](/0.18/integration/sqlserver-integration.md) * [Airflow](/0.18/integration/airflow-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 0.18](/0.18/release-notes/release-notes-0.18.md) * [Release Notes 0.17](/0.18/release-notes/release-notes-0.17.md) * [Release Notes 0.16](/0.18/release-notes/release-notes-0.16.md) ## AI Integrations[​](#ai-integrations "Direct link to AI Integrations") * [FastTransfer Agent Skill](/0.18/ai/agent-skills.md) * [FastTransfer MCP Server](/0.18/ai/mcp-server.md) --- # FastTransfer Command Wizard Transfer (DB to DB) Import Files (Files to DB) Expand All\[ ] ### Operating SystemWindows Windows ![Linux](/img/tux.svg)Linux ### Source Connection Parameterspgsql Connection Type ? : clickhouse duckdb duckdbstream hana msoledbsql mssql mysql nzcopy nzoledb nzsql odbc oledb oraodp pgcopy pgsql teradata | Server ? : | localhost | | ------------------ | ---------------------------------- | | Connect String ? : | Server=localhost;Database=mydb;... | | DSN ? : | | | Provider ? : | | | Database ? : | mydatabase | | Trusted ? : | \[ ] | | User ? : | username | | Password ? : | •••••••• | ### Target Connection Parametersmsbulk ### Transfer Parameters ### Parallel ParametersNone ### Advanced Parameters ### License ### Generated Command multi-line\[x] sharecopy ``` .\FastTransfer.exe ` --sourceconnectiontype pgsql ` --targetconnectiontype msbulk ` --loadmode Truncate ` --mapmethod Name ` --license "C:\MyFreeTrialLicense.lic" ``` --- # Getting Started with FastTransfer FastTransfer is a **high-performance data ingestion and transfer engine** that enables fast, parallel data movement between database systems, or from files to database systems. New in 1.0 ADBC connections for SQL Server, PostgreSQL, Oracle, Db2, Teradata and Netezza, and the `Physical` parallel method. See the [1.0 release notes](/1.0/release-notes/release-notes-1.0.md). ## Your first transfer in three steps[​](#your-first-transfer-in-three-steps "Direct link to Your first transfer in three steps") 1. 1InstallDownload and unzip FastTransfer, or pull the Docker image: see [Installation](/1.0/installation.md) 2. 2Build your commandPick your source, target and options in the interactive [Doc Wizard](/1.0/wizard.md) 3. 3RunPaste the generated `./FastTransfer` command in your terminal ## The CLI at a glance[​](#the-cli-at-a-glance "Direct link to The CLI at a glance") A FastTransfer command is built in three stages. Each box opens the matching page of the CLI reference. ## Watch the demo[​](#watch-the-demo "Direct link to Watch the demo") [FastTransfer Mini-Demo](https://www.youtube.com/embed/CL3031FWwqo) ## Explore the documentation[​](#explore-the-documentation "Direct link to Explore the documentation") Examples by source Ready-to-run commands for each source database * [![](/img/logos/sqlserver.svg)SQL Server](/1.0/documentation/examples/sql-server.md) * [![](/img/logos/postgresql.svg)PostgreSQL](/1.0/documentation/examples/postgresql.md) * [![](/img/logos/mysql.svg)MySQL](/1.0/documentation/examples/mysql.md) * [![](/img/logos/oracle.svg)Oracle](/1.0/documentation/examples/oracle.md) * [Other databases](/1.0/documentation/examples/other-databases.md) * [ADBC](/1.0/documentation/examples/adbc.md) File imports Load files into a database with DuckDB * [CSV Import](/1.0/documentation/examples/csv-import.md)`read_csv` * [Parquet Import](/1.0/documentation/examples/parquet-import.md)`read_parquet` * [JSON Import](/1.0/documentation/examples/json-import.md)`read_json` Reference Parameters, settings and behaviour * [CLI parameters](/1.0/documentation/cli/source_connection_parameters.md)connections, transfer options and parallelism * [Environment variables](/1.0/documentation/environment-variables/overview.md)fine-tune runtime behavior * [Logging](/1.0/documentation/logging/Overview.md)log levels, log database and log file names * [Compatibility](/1.0/documentation/compatibility/sources_platforms.md)database sources and platforms --- # FastTransfer Agent Skill arpe.io publishes official agent skills in the [arpe-io/arpeio-skills](https://github.com/arpe-io/arpeio-skills) GitHub repository. The [`fasttransfer`](https://github.com/arpe-io/arpeio-skills/tree/main/plugins/fasttransfer/skills/fasttransfer) skill teaches your AI agent how to build, explain and troubleshoot FastTransfer commands: which parameters exist, which source and target combinations work, which parallel method to choose, and which mistakes to avoid. The same repository also has skills for FastBCP, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. Skill or MCP server? The skill is a set of instructions: it teaches the agent how FastTransfer works, and the agent writes the command. The [arpe.io MCP server](/1.0/ai/mcp-server.md) gives the agent tools that build, validate and, if you allow it, run FastTransfer commands. The two work well together, so install both if your agent supports them. ## Claude Code[​](#claude-code "Direct link to Claude Code") Install the skill as a plugin from the arpe.io marketplace: ``` /plugin install fasttransfer --marketplace arpe-io/arpeio-skills ``` Or in two steps: ``` /plugin marketplace add arpe-io/arpeio-skills /plugin install fasttransfer@arpe-io ``` Then just ask, for example: *"Copy the PostgreSQL table public.orders to SQL Server with FastTransfer"*. To get the latest version of the skill later: ``` /plugin marketplace update arpe-io /plugin update fasttransfer@arpe-io ``` ## Other agents (Codex, Cursor, GitHub Copilot, Gemini CLI…)[​](#other-agents-codex-cursor-github-copilot-gemini-cli "Direct link to Other agents (Codex, Cursor, GitHub Copilot, Gemini CLI…)") Copy the skill folder into the directory your agent reads skills from: ``` git clone https://github.com/arpe-io/arpeio-skills.git cp -r arpeio-skills/plugins/fasttransfer/skills/fasttransfer / ``` For agents without skill support, paste the content of [`SKILL.md`](https://github.com/arpe-io/arpeio-skills/blob/main/plugins/fasttransfer/skills/fasttransfer/SKILL.md) as custom instructions. The files in its `references/` folder can be attached or pasted when needed. ## Product version[​](#product-version "Direct link to Product version") The skill states the FastTransfer version its facts were checked against. Before building a command, it asks the agent to check the installed version (`FastTransfer --version`) and to confirm against this documentation when the installed product is newer. ## Reporting issues[​](#reporting-issues "Direct link to Reporting issues") If the agent gets something wrong, open an issue at [github.com/arpe-io/arpeio-skills/issues](https://github.com/arpe-io/arpeio-skills/issues) with the FastTransfer version, the prompt you gave, and the command the agent produced (with passwords and licence text removed). --- # FastTransfer MCP Server The [arpe.io MCP server](https://github.com/arpe-io/arpeio-mcp) (`arpeio-mcp`) gives AI assistants a set of tools for the arpe.io products: FastBCP, FastTransfer, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. [MCP](https://modelcontextprotocol.io) (Model Context Protocol) is the open standard that Claude, ChatGPT, Cursor, VS Code and most other assistants use to call external tools. For FastTransfer, the assistant can ask the server to validate a set of parameters and render the exact FastTransfer command, look up what FastTransfer supports, read the release notes and search this documentation. If FastTransfer is installed on your machine, it can also run the command. The server runs in one of two modes: * **Command builder**, the default. The tools build, validate and explain commands; no FastTransfer binary is needed. The hosted server works this way, so it never connects to your databases. * **Execution**. When you install the server on your own machine and point it at your FastTransfer binary, the assistant can also run the command it built, once you confirm it. MCP server or agent skill? The MCP server gives the assistant tools to call. The [agent skill](/1.0/ai/agent-skills.md) is a set of instructions that teaches it how the product works. The two work well together, so install both if your assistant supports them. ## Connect your assistant[​](#connect-your-assistant "Direct link to Connect your assistant") arpe.io hosts the server, so there is nothing to install. Add this URL to your assistant: ``` https://arpe-io-arpeio-mcp.hf.space/sse ``` * Claude Code * Claude Desktop * ChatGPT * Cursor * VS Code (Copilot) * Gemini CLI * Windsurf * Le Chat (Mistral) ``` claude mcp add --transport sse arpeio https://arpe-io-arpeio-mcp.hf.space/sse ``` Add the server to your Claude Desktop configuration file: * **Linux**: `~/.config/Claude/claude_desktop_config.json` * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` ``` { "mcpServers": { "arpeio": { "command": "npx", "args": [ "mcp-remote", "https://arpe-io-arpeio-mcp.hf.space/sse" ] } } } ``` Custom connectors need a paid plan (Plus, Pro, Team or Enterprise). 1. Open ChatGPT in your browser, go to **Settings** > **Apps and connectors**. 2. Open **Advanced settings** and enable **Developer mode**. 3. Go to **Connectors** > **Browse connectors** > **Add a new connector**. 4. Set the URL to `https://arpe-io-arpeio-mcp.hf.space/sse` and save. Open Cursor Settings, search for "MCP" and add a server with this configuration: ``` { "mcpServers": { "arpeio": { "url": "https://arpe-io-arpeio-mcp.hf.space/sse" } } } ``` Run **MCP: Open User Configuration** from the Command Palette and add: ``` { "servers": { "arpeio": { "url": "https://arpe-io-arpeio-mcp.hf.space/sse", "type": "sse" } } } ``` Add the server to `~/.gemini/settings.json`: ``` { "mcpServers": { "arpeio": { "uri": "https://arpe-io-arpeio-mcp.hf.space/sse" } } } ``` Add the server to `~/.codeium/windsurf/mcp_config.json` (Windows: `%USERPROFILE%\.codeium\windsurf\mcp_config.json`): ``` { "mcpServers": { "arpeio": { "command": "npx", "args": [ "-y", "mcp-remote", "https://arpe-io-arpeio-mcp.hf.space/sse" ] } } } ``` Available on all plans, including the free one. 1. Go to **Intelligence** > **Connectors**. 2. Click **Add connector** > **Custom MCP Connector**. 3. Set the name to `Arpe.io` and the URL to `https://arpe-io-arpeio-mcp.hf.space/sse`. 4. Leave authentication disabled and click **Create**. Instructions for HuggingChat and Kiro are in the [server README](https://github.com/arpe-io/arpeio-mcp#connect-your-ai-assistant). ## Run FastTransfer from the assistant[​](#run-fasttransfer-from-the-assistant "Direct link to Run FastTransfer from the assistant") To let the assistant run FastTransfer, install the server on the machine where FastTransfer is installed (Python 3.10 or later): ``` pip install arpeio-mcp ``` Then register the `arpeio-mcp` command instead of the hosted URL, with the path to your binary. In Claude Code: ``` claude mcp add --transport stdio --env FASTTRANSFER_PATH=/path/to/FastTransfer arpeio -- arpeio-mcp ``` In Claude Desktop, and in other clients that use the `mcpServers` format: ``` { "mcpServers": { "arpeio": { "command": "arpeio-mcp", "env": { "FASTTRANSFER_PATH": "/path/to/FastTransfer" } } } } ``` | Variable | Description | | ---------------------- | ----------------------------------------------------------------------------- | | `FASTTRANSFER_PATH` | Path to the FastTransfer binary. Without it, the server only builds commands. | | `FASTTRANSFER_TIMEOUT` | Execution timeout, in seconds. Optional. | | `FASTTRANSFER_LOG_DIR` | Directory for the execution logs. Optional. | | `LOG_LEVEL` | Server log level: `DEBUG`, `INFO` (default), `WARNING` or `ERROR`. | ## Tools[​](#tools "Direct link to Tools") | Tool | What it does | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `fasttransfer_info` | Reference information, picked with `action`: supported source/target combinations, parallel methods, workflow tips, version detection. | | `fasttransfer_preview_transfer` | Validates the parameters and renders the FastTransfer command. When no parallel method is given, it suggests one. | | `fasttransfer_execute_transfer` | Runs the previewed command. Needs a local FastTransfer binary and `confirmation: true`. | Tools shared by all arpe.io products: | Tool | What it does | | -------------------- | ------------------------------------------------------------------------------------------------------- | | `arpe_quick_start` | Picks the right arpe.io product for a use case described in plain English and returns a workflow guide. | | `arpe_get_status` | Shows which arpe.io binaries the server can run, and which are in command-builder mode only. | | `arpe_release_notes` | Returns release notes for a product, or for one version. | | `search_docs` | Full-text search over the arpe.io documentation sites, this one included, and the arpe.io blog. | ## How a request flows[​](#how-a-request-flows "Direct link to How a request flows") 1. You describe what you want, for example: *"Copy the public.orders table from PostgreSQL to SQL Server, in parallel on the order\_id column"*. 2. The assistant calls `fasttransfer_preview_transfer`. The tool checks the parameters and returns the FastTransfer command, an explanation, and warnings when an option does not exist in the FastTransfer version you run. 3. You review the command. Passwords are masked in the displayed version. 4. If execution is enabled, the assistant calls `fasttransfer_execute_transfer`. The tool refuses to run unless the call carries `confirmation: true`, and it returns the exit code, the output and a diagnosis of known errors. Most clients also ask for your approval before each tool call. ## Prompts and resources[​](#prompts-and-resources "Direct link to Prompts and resources") Clients that support MCP prompts (Claude Desktop, Cursor and others) list conversation starters: `transfer-data` for FastTransfer, and `troubleshoot` to explain a failed run from its error message. The server also exposes the FastTransfer capability matrix as the MCP resource `arpeio://capabilities/fasttransfer-combinations`. ## Reporting issues[​](#reporting-issues "Direct link to Reporting issues") If a tool returns a wrong command or wrong information, open an issue at [github.com/arpe-io/arpeio-mcp/issues](https://github.com/arpe-io/arpeio-mcp/issues) with the prompt you gave and the tool output (with passwords and licence text removed). --- # ADBC Connections FastTransfer 1.0 ships with the **Arpe.io ADBC drivers**. With an `adbc_*` connection type, the rows travel from the source to the target as Arrow columnar data, without any conversion to .NET objects in between. Nothing else to install: the drivers are bundled in the FastTransfer binary. ## Connection Types[​](#connection-types "Direct link to Connection Types") The same types are used for the source (`--sourceconnectiontype`) and the target (`--targetconnectiontype`). ![](/img/logos/sqlserver.svg)SQL Server * `adbc_mssql`ADBCSQL Server, default port 1433 ![](/img/logos/postgresql.svg)PostgreSQL * `adbc_pgsql`ADBCPostgreSQL, default port 5432 ![](/img/logos/oracle.svg)Oracle * `adbc_oracle`ADBCOracle, default port 1521 ![](/img/logos/db2.svg)IBM Db2 * `adbc_db2`ADBCDb2 for LUW, default port 50000 ![](/img/logos/teradata.svg)Teradata * `adbc_teradata`ADBCTeradata, default port 1025 ![](/img/logos/netezza.svg)IBM Netezza * `adbc_netezza`ADBCNetezza, default port 5480 ### Rules[​](#rules "Direct link to Rules") * ADBC on both endsAn `adbc_*` source goes with an `adbc_*` target. Mixing an `adbc_*` type with a native type is refused. * PlatformsWindows x64 and Linux x64. Not available on Linux ARM64. * LicenseThe drivers need an ADBC driver block in the license file. See [License](#license). ## Connecting[​](#connecting "Direct link to Connecting") ### With the usual parameters[​](#with-the-usual-parameters "Direct link to With the usual parameters") `--sourceserver`, `--sourcedatabase`, `--sourceuser`, `--sourcepassword` and `--sourcetrusted` (and their target equivalents) work as with the native types. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_oracle" ` --sourceserver "oraserver:1521/ORCLPDB1" ` --sourceuser "TPCH" ` --sourcepassword "mypassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "adbc_oracle" \ --sourceserver "oraserver:1521/ORCLPDB1" \ --sourceuser "TPCH" \ --sourcepassword "mypassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --targetconnectiontype "adbc_mssql" \ --targetserver "localhost" \ --targettrusted \ --targetdatabase "tpch" \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "Physical" \ --degree 8 \ --loadmode "Truncate" ``` `--sourceserver`/`--targetserver` `host`, `host:port` or `host,port`. SQL Server named instance: `host\INSTANCE`. Oracle: `host:port/service` or a TNS alias. `--sourcetrusted`/`--targettrusted` Windows (SSPI) or Kerberos for SQL Server and PostgreSQL; Kerberos for Oracle, Db2 and Teradata. Not available for Netezza. ### With a connection string[​](#with-a-connection-string "Direct link to With a connection string") `--sourceconnectstring` and `--targetconnectstring` take a `uri=` in the driver's format: * SQL Server * PostgreSQL * Oracle * Db2 * Teradata * Netezza ``` uri=sqlserver://user:password@host:1433/?database=tpch ``` ``` uri=postgresql://user:password@host:5432/tpch ``` ``` uri=oracle://user:password@host:1521/orclpdb1 ``` ``` uri=db2://user:password@host:50000/TPCH ``` ``` uri=teradata://user:password@host/SALES ``` ``` uri=netezza://user:password@host:5480/system ``` tip * Special characters in a password must be percent-encoded: `@` → `%40`, `:` → `%3A`, `/` → `%2F`. * SQL Server or PostgreSQL .NET keywords (`Data Source=`, `Trusted_Connection=Yes`, ...) are not understood here: use the usual parameters or a `uri=`. ## Target Table[​](#target-table "Direct link to Target Table") As with the native targets, the target table **must exist**: FastTransfer does not create it. The schema and table names are used **exactly as typed**, case included. Use the name as the database stores it: usually `ORDERS` on Oracle, Db2 and Teradata, `orders` on PostgreSQL. If the table is not found, FastTransfer stops before truncating or loading anything. ## Parallel Methods[​](#parallel-methods "Direct link to Parallel Methods") All the parallel methods work with ADBC sources: `Physical` `adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza` `DBPartition` `adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_teradata`, `adbc_db2` `RangeId`,`Ntile`,`Random`,`DataDriven`,`Timepartition` All ADBC sources See [Parallel Parameters](/1.0/documentation/cli/parallel_parameters.md). ## License[​](#license "Direct link to License") The ADBC drivers need an **ADBC driver block** in addition to the FastTransfer block. Both blocks can be in the same license file: FastTransfer passes the ADBC block to the drivers, and nothing else is needed. Without an ADBC driver block, an `adbc_*` transfer stops with exit code 99. Contact [Arpe.io](https://www.arpe.io) to add it to your license. ## Differences with the Native Types[​](#differences-with-the-native-types "Direct link to Differences with the Native Types") `--useworktables`Not available The parallel streams load the target table directly. `--batchsize`Ignored A warning is logged: the drivers size their own batches. `Time zones` SQL Server `datetimeoffset` and Oracle `TIMESTAMP WITH TIME ZONE` values arrive as the same instant in UTC. `Driver messages` Written to the FastTransfer log, with the connection type as label. Related * [Source Connection Parameters](/1.0/documentation/cli/source_connection_parameters.md)all the source connection types * [Target Connection Parameters](/1.0/documentation/cli/target_connection_parameters.md)all the target connection types * [License](/1.0/documentation/cli/license.md)the license file and its blocks --- # Advanced Parameters This section covers advanced configuration options for FastTransfer, including tracing, logging, and display settings. * Run IDA custom identifier to trace the transfer in the logs * Settings FileLogging and other options from a custom file * Log LevelOverride the log level of the settings file * No BannerA cleaner console output for scripts ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter allows you to specify a custom identifier for tracing the transfer process. This is useful for correlating logs and tracking operations across systems. **Example:** ``` ./FastTransfer \ ... --runid "transfer-2024-01-15-001" \ ... ``` `--runid`default `a random GUID` `--runid "RunSpanID"` Tracing Use a meaningful Run ID to make it easier to search logs and trace specific transfer operations, especially in production environments or when running multiple transfers. ## Settings File[​](#settings-file "Direct link to Settings File") Specify a custom settings file for logging and other configuration options. This allows you to use different configuration profiles for different environments or scenarios. **Example:** ``` ./FastTransfer \ ... --settingsfile "config/production-settings.json" \ ... ``` `--settingsfile` `--settingsfile "file_path"`. Default: `FastTransfer_Settings.json` in the same folder as the executable. Configuration File The settings file contains logging configuration, connection settings, and other advanced options. You can maintain separate configuration files for development, staging, and production environments. ## Log Level[​](#log-level "Direct link to Log Level") Override the log level defined in the settings file. This is useful for temporary debugging or troubleshooting without modifying the settings file. **Example:** ``` ./FastTransfer \ ... --loglevel debug \ ... ``` `--loglevel`default `information` `--loglevel "level"` **Allowed Values:** `verbose` Most detailed tracing information `debug` Detailed debugging information `information`Default General informational messages `warning` Warning messages for potentially harmful situations `error` Error messages for failures Debugging Use `--loglevel debug` when troubleshooting issues to get the most detailed logging output. Remember to switch back to `information` or `warning` for production use to avoid excessive log volume. ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastTransfer banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastTransfer \ ... --nobanner \ ... ``` `--nobanner` Switch, no value. Clean Output Using `--nobanner` is recommended when running FastTransfer from scripts or CI/CD pipelines where you want to minimize console output or parse the results programmatically. ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using advanced parameters: | | This example | | ----------------- | ------------------------------------ | | **Tracing** | A custom Run ID | | **Configuration** | Loaded from a custom settings file | | **Logging** | Log level set to information | | **Output** | Banner disabled for a cleaner output | * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "sales" ` --query "select * from sales where order_date >= '2024-01-01'" ` --runid "daily-sales-sync-2024-01-15" ` --settingsfile "config/production-settings.json" ` --loglevel information ` --nobanner ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "sales" \ --query "select * from sales where order_date >= '2024-01-01'" \ --runid "daily-sales-sync-2024-01-15" \ --settingsfile "config/production-settings.json" \ --loglevel information \ --nobanner ``` Related * [Logging overview](/1.0/documentation/logging/Overview.md)the settings file and its sinks * [Log Levels](/1.0/documentation/logging/logs-level.md)what each level writes --- # Authentication FastTransfer supports two types of authentication methods depending on your database platform. Authentication can be configured separately for source and target databases. Trusted Connection * CredentialsThe current Windows user, or the operating system authentication if allowed by the RDBMS * Source`--sourcetrusted` * Target`--targettrusted` SQL Login * CredentialsExplicit username and password * Source`--sourceuser` and `--sourcepassword` * Target`--targetuser` and `--targetpassword` ## Source Authentication[​](#source-authentication "Direct link to Source Authentication") * Trusted Connection * SQL Login ### Trusted Connection (Source)[​](#trusted-connection-source "Direct link to Trusted Connection (Source)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --sourcetrusted ` ... ``` `--sourcetrusted` Switch, no value. Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### SQL Login with Username and Password (Source)[​](#sql-login-with-username-and-password-source "Direct link to SQL Login with Username and Password (Source)") Standard database authentication with explicit credentials for the source database. ``` ./FastTransfer ` ... --sourceuser "myuser" ` --sourcepassword "mypassword" ` ... ``` `--sourceuser`or`-u` Username: `--sourceuser "username"` (short form: `-u "username"`) `--sourcepassword`or`-x` Password: `--sourcepassword "password"` (short form: `-x "password"`) ## Target Authentication[​](#target-authentication "Direct link to Target Authentication") * Trusted Connection * SQL Login ### Trusted Connection (Target)[​](#trusted-connection-target "Direct link to Trusted Connection (Target)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --targettrusted ` ... ``` `--targettrusted` Switch, no value. ### SQL Login with Username and Password (Target)[​](#sql-login-with-username-and-password-target "Direct link to SQL Login with Username and Password (Target)") Standard database authentication with explicit credentials for the target database. ``` ./FastTransfer ` ... --targetuser "myuser" ` --targetpassword "mypassword" ` ... ``` `--targetuser`or`-U` Username: `--targetuser "username"` (short form: `-U "username"`) `--targetpassword`or`-X` Password: `--targetpassword "password"` (short form: `-X "password"`) ## Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use connection string parameters where you pass the user and password directly in the connection string: * [Source Connection Parameters](/1.0/documentation/cli/source_connection_parameters.md#source-connection-string)`--sourceconnectstring` for the source database connection * [Target Connection Parameters](/1.0/documentation/cli/target_connection_parameters.md#target-connection-string)`--targetconnectstring` for the target database connection Password Security in Logs All passwords passed either through the `--sourcepassword`, `--targetpassword` parameters or within the `--sourceconnectstring`, `--targetconnectstring` parameters are automatically hidden in all logs (Console, Files, and Database). This ensures your credentials remain secure in logging outputs. Tips For Login/Password you can also use the environment variables like FastTransfer\_SOURCEUSER and FastTransfer\_SOURCEPASSWORD for example or store the password in an encrypted file. Up to you to decrypt the file and its content before using it in a shell variable that will be used with FastTransfer. --- # License Configure how FastTransfer retrieves and uses its license file. ## License Parameter[​](#license-parameter "Direct link to License Parameter") Use the `--license` parameter to specify the location or content of your FastTransfer license. `--license`Long form only `--license ""`: a file path, an HTTP(S) URL or the license content itself. By default, FastTransfer will try to use the license file named `FastTransfer.lic` in the same directory as the FastTransfer executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastTransfer supports multiple ways to provide a license: * 1\. File path * 2\. HTTP(S) endpoint * 3\. License content (inline) Specify a custom license file path: Windows ``` .\FastTransfer.exe ` ... --license "C:\licenses\FastTransfer.lic" ` ... ``` Linux ``` ./FastTransfer \ ... --license "/path/to/licenses/FastTransfer.lic" \ ... ``` Retrieve the license from a remote URL where you put the license content and distribute it using HTTPS: Windows ``` .\FastTransfer.exe ` ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" ` ... ``` Linux ``` ./FastTransfer \ ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" \ ... ``` Provide the license content directly. Using a variable or environment variable is recommended. Useful for Docker or Lambda deployment: Windows ``` # Using environment variable $env:FastTransfer_LICENSE = "LICENSE_CONTENT_HERE" .\FastTransfer.exe ` ... --license $env:FastTransfer_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastTransfer.lic" -Raw .\FastTransfer.exe ` ... --license $license ` ... ``` Linux ``` # Using environment variable export FastTransfer_LICENSE="LICENSE_CONTENT_HERE" ./FastTransfer \ ... --license "$FastTransfer_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastTransfer.lic) ./FastTransfer \ ... --license "$license" \ ... ``` ## ADBC Driver License[​](#adbc-driver-license "Direct link to ADBC Driver License") The [ADBC connection types](/1.0/documentation/cli/adbc_connections.md) (`adbc_*`) need an **ADBC driver block** in addition to the FastTransfer block. Keep both blocks in the same file and pass it with `--license`: FastTransfer hands the ADBC block to the drivers. | Exit code | When | | --------- | ------------------------------------------------- | | **99** | An `adbc_*` transfer without an ADBC driver block | ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using a license from a remote server with a database transfer: | | This example | | ----------- | -------------------------------------------------------------------------------- | | **License** | Retrieved from a remote UNC path | | **Source** | A PostgreSQL database, orders from 2024 onwards | | **Target** | A SQL Server database, loaded with bulk insert | | **Method** | `DataDriven` parallel method with 4 threads, one chunk per month of `order_date` | * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" ` --parallelmethod DataDriven ` --distributekeycolumn "EXTRACT(MONTH FROM order_date)" ` --degree 4 ` --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` ``` ./FastTransfer \ --sourceconnectiontype "pgsql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourceuser "FastUser" \ --sourcepassword "FastPassword" \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" \ --parallelmethod DataDriven \ --distributekeycolumn "EXTRACT(MONTH FROM order_date)" \ --degree 4 \ --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` Related * [ADBC Connections](/1.0/documentation/cli/adbc_connections.md)the `adbc_*` connection types and their license block * [Installation](/1.0/installation.md)where FastTransfer looks for `FastTransfer.lic` --- # Parallel Parameters FastTransfer can parallelize data export to significantly improve performance. This section covers the parameters that control parallel execution. ## Parallel Method[​](#parallel-method "Direct link to Parallel Method") Use the `--parallelmethod` parameter to specify how data will be split across parallel threads. * Windows * Linux ``` .\FastTransfer.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastTransfer \ ... --parallelmethod Ntile \ ... ``` `--parallelmethod`default `None` `--parallelmethod ` ### Available Methods[​](#available-methods "Direct link to Available Methods") [`Physical`](#physical)SQL Server, PostgreSQL, Oracle, Netezza Physical location of the rows, chosen by FastTransfer for the source engine. Key columnNot needed [`DBPartition`](#dbpartition)SQL Server, PostgreSQL, Oracle, MySQL, Teradata, Db2 One stream per native partition of the source table. Key columnNot needed `None`Any source No split, one stream. Key columnNot needed `RangeId`Any source Numeric ranges of the key. Key column--distributekeycolumn `Ntile`Any source Even slices of the key (number, date or string). Key column--distributekeycolumn `Random`Any source Modulo of the key. Key column--distributekeycolumn [`DataDriven`](#data-driven-query)Any source One stream per distinct value of the key (or of `--datadrivenquery`). Key column--distributekeycolumn, optionally --datadrivenquery [`Timepartition`](#timepartition)Any source One stream per year, month, day or week of a date column. Key columnA date tuple in --distributekeycolumn Which method to choose? * **A large table on SQL Server, PostgreSQL, Oracle or Netezza:** start with `Physical`. No key column to choose. * **A partitioned table:** `DBPartition`. * **An integer key without big gaps (identity, sequence):** `RangeId`. * **Any other key, or a `--query` source:** `Ntile`, or `Timepartition` on a date column. Each method in detail **Physical** - Uses the physical location of the rows. FastTransfer picks the right technique for the source: `Ctid` on PostgreSQL, `Rowid` on Oracle, `Physloc` on SQL Server (rowstore and clustered columnstore tables), data slices on Netezza. Requires `--sourceschema` and `--sourcetable` (not on Netezza). A `--query` can be added to filter the table. See [Physical](#physical) below. **DBPartition** - Uses the native partitions of the source table: one transfer per partition, biggest partitions first. Requires `--sourceschema` and `--sourcetable`; `--query` is not allowed. See [DBPartition](#dbpartition) below. **RangeId** - Splits a numeric key into ranges. Best with an identity column or a sequence without big gaps. **Ntile** - Splits the key into slices of the same number of rows. The key can be a number, a date or a string. Rows with a NULL key are transferred in a stream of their own. **Random** - Uses a modulo on the key. **DataDriven** - One transfer per distinct value of the key, or per value returned by `--datadrivenquery`. The NULL value is one of them. **Timepartition** - Splits the data on the time parts of a date column: one transfer per year, month, day or ISO week. `--distributekeycolumn` uses a tuple such as `"(order_date,year,month)"`. See [Timepartition](#timepartition) below. tip You can use an expression instead of a column name in the distribute key column.
Example: `YEAR(o_orderdate)` Deprecated methods `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` are replaced by `Physical`. They still work in 1.0, with a warning, and will be removed in 2.0. When to Use Parallelism If you want to use a parallel export/import use other than None. Try to use Parallelism only if you have a large amount of data to transfer (more than 1M cells). ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastTransfer will use SQL queries that run in parallel against the source. Each query will have a WHERE clause that retrieves a part of the total data. Information This parameter is mandatory when using methods that require a distributed column: Random, DataDriven, RangeId, Ntile or Timepartition. FastTransfer stops with an error if it is missing. Timepartition With the `Timepartition` method, `--distributekeycolumn` is a tuple made of a date column and time parts: `"(order_date,year)"`, `"(order_date,year,month)"`, `"(order_date,year,month,day)"` or `"(order_date,year,week)"`. See [Timepartition](#timepartition). * Windows * Linux ``` # Using a column name .\FastTransfer.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastTransfer.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastTransfer \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastTransfer \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` `--distributekeycolumn` `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `--degree` parameter to control how many parallel threads will be used for the export. `--degree`default `-4` `--degree ` ### DOP Values[​](#dop-values "Direct link to DOP Values") `n > 0`e.g. 4 Uses exactly that number of parallel threads. If greater than twice the number of CPU cores/threads, it will be downscaled to the number of available cores. `0` Automatically aligns with the number of cores (or threads if Hyper-Threading is enabled) on the machine. `n < 0`e.g. -2 Computed as `number of cores / abs(dop)`. For example, if you have 16 cores and set DOP to -2, the actual DOP will be 8. * Windows * Linux ``` # Use 8 parallel threads .\FastTransfer.exe ` ... --degree 8 ` ... # Auto-detect based on CPU cores .\FastTransfer.exe ` ... --degree 0 ` ... # Use half of available cores .\FastTransfer.exe ` ... --degree -2 ` ... ``` ``` # Use 8 parallel threads ./FastTransfer \ ... --degree 8 \ ... # Auto-detect based on CPU cores ./FastTransfer \ ... --degree 0 \ ... # Use half of available cores ./FastTransfer \ ... --degree -2 \ ... ``` ## Data Driven Query[​](#data-driven-query "Direct link to Data Driven Query") Use the `--datadrivenquery` parameter when using the DataDriven method to provide a query that returns the list of values that will be used to split the data. This allows you to filter the values that will be exported and used to split the data. `--datadrivenquery` `--datadrivenquery ""` * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` ## Physical[​](#physical "Direct link to Physical") The `Physical` method splits the source table on the physical location of its rows. It needs no key column, and each stream reads its own part of the table. `ctid (page ranges)`![](/img/logos/postgresql.svg)PostgreSQL Technique used on PostgreSQL. Source typespgsql, pgcopy, adbc\_pgsql `ROWID ranges`![](/img/logos/oracle.svg)Oracle Technique used on Oracle. Source typesoraodp, adbc\_oracle `%%physloc%%`![](/img/logos/sqlserver.svg)SQL Server Technique used on SQL Server (rowstore and clustered columnstore). Source typesmssql, msoledbsql, adbc\_mssql `Data slices`![](/img/logos/netezza.svg)Netezza Technique used on Netezza. Source typesnzsql, nzoledb, adbc\_netezza Other sources are refused: use another method. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "postgres" ` --sourcepassword "mypassword" ` --sourcedatabase "tpch" ` --sourceschema "public" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --parallelmethod "Physical" ` --degree 8 ` --targettable "lineitem" ` --loadmode "Truncate" ``` ``` ./FastTransfer --sourceconnectiontype "pgsql" --sourceserver "localhost:5432" --sourceuser "postgres" --sourcepassword "mypassword" --sourcedatabase "tpch" --sourceschema "public" --sourcetable "lineitem" --targetconnectiontype "msbulk" --targetserver "localhost" --targettrusted --targetdatabase "tpch" --targetschema "dbo" --parallelmethod "Physical" --degree 8 --targettable "lineitem" --loadmode "Truncate" ``` Filtering the table On PostgreSQL, Oracle and SQL Server, add a `--query` to filter the table, for example `--query "SELECT * FROM public.lineitem WHERE l_shipdate >= '2025-01-01'"`. `--sourceschema` and `--sourcetable` are still required. ## DBPartition[​](#dbpartition "Direct link to DBPartition") The `DBPartition` method reads the partitions of the source table from the database catalog and transfers each partition in its own stream. The biggest partitions are transferred first, so the parallel threads stay busy until the end. How each partition is read depends on the source: `SQL Server`![](/img/logos/sqlserver.svg)mssql, msoledbsql, adbc\_mssql Partitions of the partition scheme. Read withWHERE $PARTITION.\(\) = n `PostgreSQL`![](/img/logos/postgresql.svg)pgsql, pgcopy, adbc\_pgsql Leaf partitions (sub-partitions included). Read withThe leaf table is read directly `Oracle`![](/img/logos/oracle.svg)oraodp, adbc\_oracle Partitions and sub-partitions. Read withPARTITION (...) / SUBPARTITION (...) clause `MySQL`![](/img/logos/mysql.svg)mysql Partitions and sub-partitions. Read withPARTITION (...) clause `Teradata`![](/img/logos/teradata.svg)teradata, adbc\_teradata Populated row partitions (PPI / MLPPI). Read withWHERE PARTITION = n `Db2 LUW`![](/img/logos/db2.svg)adbc\_db2 Data partitions (range partitioning). Read withA range predicate per partition * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --sourceschema "dbo" ` --sourcetable "lineitem_part" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "mypassword" ` --targetdatabase "tpch" ` --parallelmethod "DBPartition" ` --degree 8 ` --targetschema "public" ` --targettable "lineitem" ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --sourceschema "dbo" \ --sourcetable "lineitem_part" \ --targetconnectiontype "pgcopy" \ --targetserver "localhost:5432" \ --targetuser "postgres" \ --targetpassword "mypassword" \ --targetdatabase "tpch" \ --parallelmethod "DBPartition" \ --degree 8 \ --targetschema "public" \ --targettable "lineitem" \ --loadmode "Truncate" ``` This example transfers a SQL Server table partitioned by month on `l_shipdate`: each monthly partition is loaded into PostgreSQL by one of the 8 parallel threads. tip DBPartition works best when the source partitions have similar sizes. If the table is not partitioned, or the source type is not supported, FastTransfer logs a warning and falls back to `None` (a single stream): use another method, such as `Timepartition` or `Ntile`, instead. ## Timepartition[​](#timepartition "Direct link to Timepartition") The `Timepartition` method splits the data on the time parts of a date column. FastTransfer first runs a query that groups the source by these time parts and counts the rows of each group. Then it transfers each group in its own stream, biggest first. `--distributekeycolumn` is a tuple made of the date column and the time parts: `(date_column,year)` One stream per year `(date_column,year,month)` One stream per month `(date_column,year,month,day)` One stream per day `(date_column,year,week)` One stream per ISO week * The source can be a table (`--sourceschema` / `--sourcetable`) or a `--query`. With a query, the date column must be in the query output. * Rows with a NULL date are transferred in a dedicated stream. * The date bounds are sent to the source in the `yyyy-MM-dd` format. If your source needs `yyyyMMdd`, use the [FASTTRANSFER\_DATEFORMAT](/1.0/documentation/environment-variables/dateformat.md) environment variable. - Windows - Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "mypassword" ` --targetdatabase "tpch" ` --query "SELECT * FROM dbo.lineitem WHERE l_shipmode = 'AIR'" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(l_shipdate,year,month)" ` --degree 8 ` --targetschema "public" ` --targettable "lineitem_air" ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "pgcopy" \ --targetserver "localhost:5432" \ --targetuser "postgres" \ --targetpassword "mypassword" \ --targetdatabase "tpch" \ --query "SELECT * FROM dbo.lineitem WHERE l_shipmode = 'AIR'" \ --parallelmethod "Timepartition" \ --distributekeycolumn "(l_shipdate,year,month)" \ --degree 8 \ --targetschema "public" \ --targettable "lineitem_air" \ --loadmode "Truncate" ``` This example transfers the `AIR` shipments month by month, with 8 parallel threads. Choosing the granularity Pick a granularity that gives several times more groups than the degree of parallelism, but not tens of thousands of small groups. For 7 years of data, `(col,year,month)` gives about 84 streams, which is a good fit for 8 to 16 threads. ## SQL Server target and sorted hint[​](#sql-server-target-and-sorted-hint "Direct link to SQL Server target and sorted hint") With a partitioned SQL Server target (`msbulk`), the `DataDriven`, `DBPartition` and `Timepartition` methods send a sorted hint on the target partition column to the bulk copy. This hint is not sent when the target table has a rowstore clustered index: SQL Server would check the order of the rows and reject the load. Set [FASTTRANSFER\_SORTEDINPUT](/1.0/documentation/environment-variables/sortedinput.md) to `true` to force the hint when your source data is really sorted. ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: | | This example | | ------------------ | ---------------------------------------------------------------------------------------------- | | **Source** | A SQL Server database on localhost, a custom query on the orders table | | **Target** | A SQL Server database, loaded with BulkCopy | | **Authentication** | Trusted, for both source and target | | **Method** | `DataDriven`, on the month of the order date (`o_ordermonth` column) | | **Values** | Generated by a custom query, instead of a `SELECT DISTINCT o_ordermonth` from the source query | | **Threads** | 10 parallel threads (even though there are 12 months to export) | * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "select * from orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_ordermonth" ` --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" ` --degree 10 ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "select * from orders" \ --parallelmethod "DataDriven" \ --distributekeycolumn "o_ordermonth" \ --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" \ --degree 10 ``` Related * [Transfer Parameters](/1.0/documentation/cli/transfer_parameters.md)`--sourceschema`, `--sourcetable` and `--query` * [ADBC Connections](/1.0/documentation/cli/adbc_connections.md)the parallel methods with `adbc_*` sources * [Environment variables](/1.0/documentation/environment-variables/overview.md)`FASTTRANSFER_DATEFORMAT` and `FASTTRANSFER_SORTEDINPUT` --- # Source Connection Parameters FastTransfer requires connection information to access your source database where data will be extracted. This page covers all source connection-related parameters. ## Source Connection Type[​](#source-connection-type "Direct link to Source Connection Type") Specify the type of source database connection driver to use. This parameter determines how FastTransfer connects to your source database. ``` ./FastTransfer \ ... --sourceconnectiontype mssql \ ... ``` `--sourceconnectiontype` `--sourceconnectiontype "connection_type"` **Available Connection Types**, grouped by database. The types marked **ADBC** use the Arpe.io ADBC drivers (bundled; Windows x64 and Linux x64): see [ADBC Connections](/1.0/documentation/cli/adbc_connections.md). ![](/img/logos/sqlserver.svg)SQL Server * `mssql`SQL Server Native Client (.Net) * `msoledbsql`SQL Server OleDB * `adbc_mssql`ADBCSQL Server (ADBC) ![](/img/logos/postgresql.svg)PostgreSQL * `pgsql`PostgreSQL Native (.Net) * `pgcopy`PostgreSQL Copy * `adbc_pgsql`ADBCPostgreSQL (ADBC) ![](/img/logos/oracle.svg)Oracle * `oraodp`Oracle ODP.Net * `adbc_oracle`ADBCOracle (ADBC) ![](/img/logos/teradata.svg)Teradata * `teradata`Teradata (.Net) * `adbc_teradata`ADBCTeradata (ADBC) ![](/img/logos/netezza.svg)IBM Netezza * `nzsql`Netezza Native (.net driver) * `nzoledb`Netezza OleDB * `adbc_netezza`ADBCNetezza (ADBC) ![](/img/logos/db2.svg)IBM Db2 * `adbc_db2`ADBCDb2 for LUW (ADBC) ![](/img/logos/duckdb.svg)DuckDB * `duckdb`DuckDB * `duckdbstream`DuckDB using streaming (more memory efficient) ![](/img/logos/mysql.svg)MySQL * `mysql`MySQL ![](/img/logos/sap.svg)SAP HANA * `hana`SAP HANA (.net driver) ![](/img/logos/clickhouse.svg)ClickHouse * `clickhouse`ClickHouse Generic drivers * `odbc`ODBC datasource (DSN must be configured) * `oledb`Generic OleDB datasource note An `adbc_*` source needs an `adbc_*` target. See [ADBC Connections](/1.0/documentation/cli/adbc_connections.md). ## Source DSN (Data Source Name)[​](#source-dsn-data-source-name "Direct link to Source DSN (Data Source Name)") If you have chosen an ODBC connection type for the source, you must define the DSN with the `--sourcedsn` parameter, or alternatively define a connection string using `--sourceconnectstring`. ``` ./FastTransfer \ ... --sourceconnectiontype odbc \ --sourcedsn "MySourceODBCDataSource" \ ... ``` `--sourcedsn` `--sourcedsn "DSN_name"` ## Source Provider[​](#source-provider "Direct link to Source Provider") If you have chosen an OLEDB connection type for the source, you must define the OLEDB provider with the `--sourceprovider` parameter. * SQL Server (MSOLEDBSQL) * Netezza (NZOLEDB) ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider MSOLEDBSQL \ ... ``` ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider NZOLEDB \ ... ``` `--sourceprovider` `--sourceprovider "provider_name"` ## Source Server[​](#source-server "Direct link to Source Server") Except if you have defined a source connection string, you must define a source server (or could also be a TNS entry for Oracle). `--sourceserver` `--sourceserver "server"` ### Source Server Format Examples[​](#source-server-format-examples "Direct link to Source Server Format Examples") The source server parameter accepts different formats depending on your database: IP address or DNS name `mysourceserver.mydomain.com`Host IP address or DNS name with port number `mysourceserver.mydomain.com`Host: or ,`2433`Port IP address or DNS name with named instance `mysourceserver.mydomain.com`Host\\`myinstance`Named instance Oracle: Easy Connect string `mysourceserver.mydomain.com`Host:`1521`Port/`myinstance`Instance Oracle: TNS entry `MYTNS`TNS entry The same formats in a command **IP address or DNS name:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:2433" \ ... ``` or ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:1521/myinstance" \ ... ``` **For Oracle - TNS entry:** ``` ./FastTransfer \ ... --sourceserver "MYTNS" \ ... ``` ## Source Connection String[​](#source-connection-string "Direct link to Source Connection String") Tips You can use a connection string to define the connection to the source database. This connection string will override any other connection parameters and can be used if the other authentication modes are not enough for your case. You can use the connection string for any source connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastTransfer \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` `--sourceconnectstring` `--sourceconnectstring "connection_string"` Password Security in Logs All passwords within the `--sourceconnectstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Source Database[​](#source-database "Direct link to Source Database") Define the source database name. **Example:** ``` ./FastTransfer \ ... --sourcedatabase "AdventureWorks" \ ... ``` `--sourcedatabase` `--sourcedatabase "database_name"` Related * [Target Connection Parameters](/1.0/documentation/cli/target_connection_parameters.md)where the data goes * [Authentication](/1.0/documentation/cli/authentication.md)trusted connection or SQL login * [ADBC Connections](/1.0/documentation/cli/adbc_connections.md)the `adbc_*` connection types --- # Target Connection Parameters FastTransfer requires connection information to access your target database where data will be transferred. This page covers all target connection-related parameters. ## Target Connection Type[​](#target-connection-type "Direct link to Target Connection Type") Specify the type of target database connection driver to use. This parameter determines how FastTransfer connects to your target database. ``` ./FastTransfer \ ... --targetconnectiontype msbulk \ ... ``` `--targetconnectiontype` `--targetconnectiontype "connection_type"` **Available Connection Types**, grouped by database. The types marked **ADBC** use the Arpe.io ADBC drivers (bundled; Windows x64 and Linux x64): see [ADBC Connections](/1.0/documentation/cli/adbc_connections.md). ![](/img/logos/sqlserver.svg)SQL Server * `msbulk`SQL Server BulkCopy * `adbc_mssql`ADBCSQL Server (ADBC) ![](/img/logos/postgresql.svg)PostgreSQL * `pgcopy`PostgreSQL using COPY (binary format when the source connection type is also `pgcopy`, text format otherwise) * `pgsql`PostgreSQL Native (.Net) * `adbc_pgsql`ADBCPostgreSQL (ADBC) ![](/img/logos/oracle.svg)Oracle * `orabulk`Oracle BulkCopy * `oradirect`Oracle Direct * `adbc_oracle`ADBCOracle (ADBC) ![](/img/logos/teradata.svg)Teradata * `teradata`Teradata (.Net) * `adbc_teradata`ADBCTeradata (ADBC) ![](/img/logos/netezza.svg)IBM Netezza * `nzbulk`Netezza BulkCopy * `adbc_netezza`ADBCNetezza (ADBC) ![](/img/logos/db2.svg)IBM Db2 * `adbc_db2`ADBCDb2 for LUW (ADBC) ![](/img/logos/duckdb.svg)DuckDB * `duckdb`DuckDB ![](/img/logos/mysql.svg)MySQL * `mysqlbulk`MySQL BulkCopy ![](/img/logos/sap.svg)SAP HANA * `hanabulk`SAP HANA ![](/img/logos/clickhouse.svg)ClickHouse * `clickhousebulk`ClickHouse BulkCopy note An `adbc_*` target needs an `adbc_*` source. See [ADBC Connections](/1.0/documentation/cli/adbc_connections.md). ## Target Server[​](#target-server "Direct link to Target Server") Except if you have defined a target connection string, you must define a target server (or could also be a TNS entry for Oracle). `--targetserver` `--targetserver "server"` ### Target Server Format Examples[​](#target-server-format-examples "Direct link to Target Server Format Examples") The target server parameter accepts different formats depending on your database: IP address or DNS name `mytargetserver.mydomain.com`Host IP address or DNS name with port number `mytargetserver.mydomain.com`Host: or ,`1433`Port IP address or DNS name with named instance (SQL Server) `mytargetserver.mydomain.com`Host\\`TARGETINSTANCE`Named instance Oracle: Easy Connect string `mytargetserver.mydomain.com`Host:`1521`Port/`TARGETPDB`Service DuckDB: local file path `/path/to/target.duckdb`Database file The same formats in a command **IP address or DNS name:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:3306" \ ... ``` or ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com,1433" \ ... ``` **IP address or DNS name with named instance (SQL Server):** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com\TARGETINSTANCE" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:1521/TARGETPDB" \ ... ``` **For DuckDB - Local file path:** ``` ./FastTransfer \ ... --targetconnectiontype duckdb \ --targetserver "/path/to/target.duckdb" \ ... ``` ## Target Connection String[​](#target-connection-string "Direct link to Target Connection String") Advanced Connection Options You can use a connection string to define the connection to the target database. This connection string will override any other target connection parameters and can be used if the standard authentication modes are not sufficient for your use case. You can use the target connection string for any connection type. The connection string must be enclosed in double quotes. * SQL Server * PostgreSQL ``` ./FastTransfer \ ... --targetconnectstring "Server=mytargetserver;Database=mytargetdb;User ID=TargetUser;Password=TargetPassword;Encrypt=True;TrustServerCertificate=True" ... ``` ``` ./FastTransfer \ ... --targetconnectstring "Host=mytargetserver;Database=mytargetdb;Username=TargetUser;Password=TargetPassword;SSL Mode=Require" ... ``` `--targetconnectstring` `--targetconnectstring "connection_string"` Password Security in Logs All passwords within the `--targetconnectstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Target Database[​](#target-database "Direct link to Target Database") Define the target database name. **Example:** ``` ./FastTransfer \ ... --targetdatabase "AdventureWorks" \ ... ``` `--targetdatabase` `--targetdatabase "database_name"` Matching Schema Requirements The target table must already exist with a compatible schema. FastTransfer does not automatically create target tables. Ensure column data types are compatible between source and target databases. Related * [Source Connection Parameters](/1.0/documentation/cli/source_connection_parameters.md)where the data comes from * [Authentication](/1.0/documentation/cli/authentication.md)trusted connection or SQL login * [Transfer Parameters](/1.0/documentation/cli/transfer_parameters.md)target schema and table, load mode, column mapping --- # 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 ConfigurationWhat data to extract: a table, a query or a SQL file * Target ConfigurationWhere to load the data: target schema and table * Load BehaviorHow the data is loaded: load mode, batch size, work tables, column mapping ## Source Configuration[​](#source-configuration "Direct link to Source Configuration") These parameters define what data to extract from the source database. ### Source Schema[​](#source-schema "Direct link to Source Schema") Define the source schema name. This parameter is required by the `Physical` and `DBPartition` parallel methods. **Example:** ``` ./FastTransfer \ ... --sourceschema "public" \ ... ``` `--sourceschema` `--sourceschema "schema_name"` Required for Physical and DBPartition This parameter must be set if the `Physical` (except on Netezza) or `DBPartition` parallel method is used. ### Source Table[​](#source-table "Direct link to Source Table") Define the source table name. This parameter is required by the `Physical` and `DBPartition` parallel methods. **Example:** ``` ./FastTransfer \ ... --sourcetable "customers" \ ... ``` `--sourcetable` `--sourcetable "table_name"` Required for Physical and DBPartition This parameter must be set if the `Physical` (except on Netezza) or `DBPartition` parallel method is used. ### Query[​](#query "Direct link to Query") Plain text SQL query. Will be used instead of source table if provided. **Example:** ``` ./FastTransfer \ ... --query "SELECT * FROM customers WHERE country = 'USA'" \ ... ``` `--query` `--query "sql_query"` Tips When using a custom query, FastTransfer will execute this query on the source database instead of reading from a table directly. ### File Input[​](#file-input "Direct link to 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" \ ... ``` `--fileinput` `--fileinput "file_path"` File Requirement The specified file must exist and contain a valid SQL query. ## Target Configuration[​](#target-configuration "Direct link to Target Configuration") These parameters define where to load the data in the target database. * Target Schema * Target Table ### Target Schema[​](#target-schema "Direct link to Target Schema") Define the target schema name. **Example:** ``` ./FastTransfer \ ... --targetschema "dbo" \ ... ``` `--targetschema` `--targetschema "schema_name"` ### Target Table[​](#target-table "Direct link to Target Table") Define the target table name. **Example:** ``` ./FastTransfer \ ... --targettable "customers" \ ... ``` `--targettable` `--targettable "table_name"` ## Load Behavior[​](#load-behavior "Direct link to Load Behavior") These parameters control how data is loaded into the target table. ### Load Mode[​](#load-mode "Direct link to Load Mode") Load mode of the data into the target table. **Example:** ``` ./FastTransfer \ ... --loadmode Truncate \ ... ``` `--loadmode`default `Append` `--loadmode "mode"` **Allowed Values:** `Append`Default Append data to the target table. `Truncate` Truncate the target table before loading. ### Batch Size[​](#batch-size "Direct link to Batch Size") Batch Size for BulkCopy operations. **Example:** ``` ./FastTransfer \ ... --batchsize 500000 \ ... ``` `--batchsize`default `1048576` `--batchsize "size"` Performance Tuning 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. ADBC Ignored with the `adbc_*` connection types: the drivers size their own batches. ### Use Work Tables[​](#use-work-tables "Direct link to Use Work Tables") Switch that will activate the usage of intermediate work tables. Useful in some rare cases. **Example:** ``` ./FastTransfer \ ... --useworktables \ ... ``` `--useworktables` Switch, no value. When to Use This option is useful in rare scenarios where direct loading causes issues. Work tables act as an intermediate staging area. ADBC Not available with an `adbc_*` target. ### Map Method[​](#map-method "Direct link to Map Method") Mapping method for the columns between source and target. **Example:** ``` ./FastTransfer \ ... --mapmethod Name \ ... ``` `--mapmethod`default `Position` `--mapmethod "method"` **Allowed Values:** `Position`Default Map columns by their position in the source and target tables. `Name` Map columns by their name (case insensitive) and ignore missing columns. Column Mapping 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. Related * [Parallel Parameters](/1.0/documentation/cli/parallel_parameters.md)split the transfer over several threads * [Target Connection Parameters](/1.0/documentation/cli/target_connection_parameters.md)the target database * [ADBC Connections](/1.0/documentation/cli/adbc_connections.md)batch size and work tables with `adbc_*` types --- # Operating Systems FastTransfer supports Windows, Linux, and macOS across different architectures. ## Supported Operating Systems[​](#supported-operating-systems "Direct link to Supported Operating Systems") * Windows * Linux | OS | Versions | Architectures | Supported | | ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------- | --------- | | Nano Server | 2025, 2022, 2019 | x64 | Supported | | Windows | 11 24H2 (IoT), 11 24H2 (E), 11 24H2, 11 23H2, 11 22H2 (E), 10 22H2, 10 21H2 (E), 10 21H2 (IoT), 10 1809 (E), 10 1607 (E) | x64 | Supported | | Windows Server | 2025, 23H2, 2022, 2019, 2016, 2012-R2, 2012 | x64 | Supported | | Windows Server Core | 2025, 2022, 2019, 2016, 2012-R2, 2012 | x64 | Supported | | OS | Versions | Architectures | Supported | | ------------------------ | -------------------------- | ------------- | --------- | | Alpine | 3.21, 3.20, 3.19, 3.18 | Arm64, x64 | Supported | | Azure Linux | 3.0 | Arm64, x64 | Supported | | CentOS Stream | 10, 9 | Arm64, x64 | Supported | | Debian | 12 | Arm64, x64 | Supported | | Fedora | 41, 40 | Arm64, x64 | Supported | | openSUSE Leap | 15.6 | Arm64, x64 | Supported | | Red Hat Enterprise Linux | 10, 9, 8 | Arm64, x64 | Supported | | SUSE Enterprise Linux | 15.6 | Arm64, x64 | Supported | | Ubuntu | 24.10, 24.04, 22.04, 20.04 | Arm64, x64 | Supported | --- # Database Sources & Platforms FastTransfer supports a wide range of database systems across different platforms. The ADBC connection types (new in 1.0) are described in [ADBC Connections](/1.0/documentation/cli/adbc_connections.md). ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") | Source | Windows AMD64 | Linux AMD64 | Linux ARM64 | | ------------------------------------------------------------------------------------------------- | ------------- | ------------- | ------------- | | **ADBC** (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_db2`, `adbc_teradata`, `adbc_netezza`) | Supported | Supported | Not supported | | **ClickHouse** | Supported | Supported | Supported | | **DuckDB** | Supported | Supported | Supported | | **MySQL** | Supported | Supported | Supported | | **Netezza** | Supported | Supported | Supported | | **ODBC** | Supported | Supported | Supported | | **OLEDB** | Supported | Not supported | Not supported | | **Oracle** | Supported | Supported | Supported | | **PostgreSQL** | Supported | Supported | Supported | | **SQL Server** | Supported | Supported | Supported | | **SAP Hana** | Supported | Supported | Not supported | | **Teradata** | Supported | Supported | Not supported | ## Supported Targets[​](#supported-targets "Direct link to Supported Targets") | Target | Windows AMD64 | Linux AMD64 | Linux ARM64 | | ------------------------------------------------------------------------------------------------- | ------------- | ------------- | ------------- | | **ADBC** (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_db2`, `adbc_teradata`, `adbc_netezza`) | Supported | Supported | Not supported | | **ClickHouse** | Supported | Supported | Supported | | **DuckDB** | Supported | Supported | Supported | | **MySQL** | Supported | Supported | Supported | | **Netezza** | Supported | Supported | Supported | | **ODBC** | Not supported | Not supported | Not supported | | **OLEDB** | Not supported | Not supported | Not supported | | **Oracle** | Supported | Supported | Supported | | **PostgreSQL** | Supported | Supported | Supported | | **SQL Server** | Supported | Supported | Supported | | **SAP Hana** | Supported | Supported | Not supported | | **Teradata** | Supported | Supported | Not supported | Good to know The ADBC connection types (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_db2`, `adbc_teradata`, `adbc_netezza`) are not supported on **Linux ARM64**, as source or as target. --- # FASTTRANSFER\_DATEFORMAT Sets the format of the date bounds that the [Timepartition](/1.0/documentation/cli/parallel_parameters.md#timepartition) parallel method sends to the source database. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | ------------------- | ------------------------ | | **Parallel Method** | `Timepartition` | | **Default Value** | `yyyy-MM-dd` | | **Valid Values** | `yyyy-MM-dd`, `yyyyMMdd` | | **Since Version** | 0.18 | ## Description[​](#description "Direct link to Description") With the `Timepartition` method, each parallel stream reads a range of dates, for example: ``` WHERE (l_shipdate >= '1996-07-01' AND l_shipdate < '1996-08-01') ``` The dates are written as text literals and converted by the source database. Most databases read `yyyy-MM-dd`. If your source needs the compact format, set `FASTTRANSFER_DATEFORMAT=yyyyMMdd`: ``` WHERE (l_shipdate >= '19960701' AND l_shipdate < '19960801') ``` For Oracle sources (`oraodp`), FastTransfer wraps the bounds in `TO_DATE('...', 'YYYY-MM-DD')` (or `'YYYYMMDD'`), so no implicit conversion is needed. warning Only the two values above are accepted. With the `Timepartition` method, any other value stops FastTransfer with an error before the transfer starts. ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Use the compact date format $env:FASTTRANSFER_DATEFORMAT = "yyyyMMdd" # Run FastTransfer .\FastTransfer.exe --parallelmethod Timepartition --distributekeycolumn "(order_date,year,month)" ... ``` **Temporary (current session):** ``` # Use the compact date format export FASTTRANSFER_DATEFORMAT=yyyyMMdd # Run FastTransfer ./FastTransfer --parallelmethod Timepartition --distributekeycolumn "(order_date,year,month)" ... ``` --- # FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES Controls the timeout for bulk load operations when using `msbulk` or `orabulk` target connection types. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | -------------------- | --------------------------------- | | **Connection Types** | `msbulk`, `orabulk` | | **Default Value** | 60 minutes | | **Valid Values** | Any positive integer (in minutes) | | **Since Version** | 0.17 | ## Description[​](#description "Direct link to Description") Sets the maximum time (in minutes) that FastTransfer will wait for a bulk load operation to complete. This is particularly useful for large data transfers that may exceed the default 60-minute timeout. When transferring large volumes of data, the bulk load operation can take longer than the default timeout. This variable allows you to extend the timeout to accommodate your specific data transfer requirements. ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Set timeout to 120 minutes set FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` **Temporary (current session):** ``` # Set timeout to 120 minutes export FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` --- # Environment Variables Overview FastTransfer 0.17+ supports environment variables to control runtime behavior for specific connection types. ## Available Environment Variables[​](#available-environment-variables "Direct link to Available Environment Variables") | Variable Name | Target Types | Default | Description | | ----------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------ | -------------------------------------------------------------------------- | | [FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES](/1.0/documentation/environment-variables/loadsteptimeout.md) | `msbulk`, `orabulk` | 60 | Controls the timeout for bulk load operations | | [FASTTRANSFER\_SORTEDINPUT](/1.0/documentation/environment-variables/sortedinput.md) | `msbulk` | `false` | Forces the sorted input hint for SQL Server bulk copy operations | | [FASTTRANSFER\_DATEFORMAT](/1.0/documentation/environment-variables/dateformat.md) | Any source (`Timepartition` method) | `yyyy-MM-dd` | Format of the date bounds sent to the source by the `Timepartition` method | --- # FASTTRANSFER\_SORTEDINPUT Forces the sorted input hint for SQL Server bulk copy operations when using the `msbulk` target connection type. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | -------------------- | --------------- | | **Connection Types** | `msbulk` | | **Default Value** | `false` | | **Valid Values** | `true`, `false` | | **Since Version** | 0.17 | ## Description[​](#description "Direct link to Description") When set to `true`, FastTransfer instructs SQL Server's bulk copy API to treat incoming data as sorted according to the clustered index. This can significantly improve performance when: * The source data is already sorted by the target table's clustered index columns * The target table has a clustered index * You want to minimize page splits and fragmentation Partitioned targets The hint is applied on the partition column of a partitioned target table. ## With DataDriven, DBPartition and Timepartition[​](#with-datadriven-dbpartition-and-timepartition "Direct link to With DataDriven, DBPartition and Timepartition") With a partitioned SQL Server target, the `DataDriven`, `DBPartition` and `Timepartition` parallel methods send the sorted hint automatically, without this variable. Each parallel stream holds a slice of the data, but the rows are not sorted inside a stream. So, since 0.18, the hint is **not** sent when the target table has a rowstore clustered index. SQL Server would check the order and stop the load with this error: ``` Cannot bulk load. The bulk data stream was incorrectly specified as sorted or the data violates a uniqueness constraint imposed by the target table. ``` Heap and clustered columnstore targets still get the hint. If your source data is really sorted on the target partition column, for example with an `ORDER BY` in the `--query`, set `FASTTRANSFER_SORTEDINPUT=true` to force the hint. ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Enable sorted input hint set FASTTRANSFER_SORTEDINPUT=true # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` **Temporary (current session):** ``` # Enable sorted input hint export FASTTRANSFER_SORTEDINPUT=true # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` --- # ADBC Examples with the `adbc_*` connection types, new in FastTransfer 1.0. Both ends use ADBC, and the target table must exist. See [ADBC Connections](/1.0/documentation/cli/adbc_connections.md) for the rules. ## PostgreSQL to SQL Server[​](#postgresql-to-sql-server "Direct link to PostgreSQL to SQL Server") Parallel transfer with the `Physical` method (ctid on PostgreSQL), integrated authentication on the target. ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_pgsql" ` --sourceserver "pgserver:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ## Oracle to PostgreSQL[​](#oracle-to-postgresql "Direct link to Oracle to PostgreSQL") Parallel transfer with the `RangeId` method on the order key. The Oracle table name is in upper case, as stored. ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_oracle" ` --sourceserver "oraserver:1521/ORCLPDB1" ` --sourceuser "TPCH" ` --sourcepassword "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --targetconnectiontype "adbc_pgsql" ` --targetserver "pgserver:5432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "RangeId" ` --distributekeycolumn "O_ORDERKEY" ` --degree 8 ` --loadmode "Truncate" ``` ## Db2 to SQL Server[​](#db2-to-sql-server "Direct link to Db2 to SQL Server") Db2 for LUW is available as an ADBC source and target. Here a range-partitioned Db2 table is transferred with `DBPartition`: one stream per data partition. ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_db2" ` --sourceserver "db2server:50000" ` --sourcedatabase "TPCH" ` --sourceuser "db2inst1" ` --sourcepassword "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "LINEITEM_PART" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DBPartition" ` --degree 8 ` --loadmode "Truncate" ``` ## Teradata to SQL Server[​](#teradata-to-sql-server "Direct link to Teradata to SQL Server") Parallel transfer with the `Random` method. ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_teradata" ` --sourceserver "tdserver" ` --sourcedatabase "TPCH" ` --sourceuser "dbc" ` --sourcepassword "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "O_ORDERKEY" ` --degree 4 ` --loadmode "Truncate" ``` ## SQL Server to Oracle with connection strings[​](#sql-server-to-oracle-with-connection-strings "Direct link to SQL Server to Oracle with connection strings") The connection strings use the drivers' `uri=` format. Special characters in a password must be percent-encoded (`@` → `%40`). ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_mssql" ` --sourceconnectstring "uri=sqlserver://FastUser:FastPassword@sqlserver:1433/?database=tpch" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetconnectiontype "adbc_oracle" ` --targetconnectstring "uri=oracle://TPCH:FastPassword@oraserver:1521/ORCLPDB1" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ## Linux[​](#linux "Direct link to Linux") The same commands work on Linux x64, with `./FastTransfer` and `\` as the line continuation: ``` ./FastTransfer \ --sourceconnectiontype "adbc_pgsql" \ --sourceserver "pgserver:5432" \ --sourcedatabase "tpch" \ --sourceuser "FastUser" \ --sourcepassword "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --targetconnectiontype "adbc_pgsql" \ --targetserver "pgtarget:5432" \ --targetdatabase "tpch" \ --targetuser "FastUser" \ --targetpassword "FastPassword" \ --targetschema "public" \ --targettable "orders" \ --parallelmethod "Physical" \ --degree 8 \ --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Advanced Scenarios Advanced use cases including DuckDB integration, ClickHouse, SAP HANA, Teradata, and other complex transfer scenarios. ## DuckDB Integration[​](#duckdb-integration "Direct link to DuckDB Integration") DuckDB provides powerful data transformation capabilities with FastTransfer. ### DuckDB Memory - Parquet with Nested Fields to MSSQL[​](#duckdb-memory---parquet-with-nested-fields-to-mssql "Direct link to DuckDB Memory - Parquet with Nested Fields to MSSQL") Process complex nested JSON/Parquet files with DuckDB's in-memory engine: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdb" ` --sourceserver ":memory:" ` --query "select * EXCLUDE(Risques, Interlocuteurs),unnest(interlocuteurs,recursive := true ) from (select day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) from read_parquet('D:\CLIENTS\ENEDIS\BI4ALL\CHANTIER\**\*.parquet', hive_partitioning=true)) t_row_unest" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "ENDSBI4ALL" ` --targetschema "bi4all" ` --targettable "DuckChantiers_hpart" ` --parallelmethod "DataDriven" ` --distributekeycolumn "day" ` --loadmode "Truncate" ` --degree 8 ``` DuckDB Memory Mode Use `:memory:` as the server to process data without persisting a DuckDB database file. Perfect for ETL transformations. ### DuckDB Stream - Multiple CSV Files with DataDriven[​](#duckdb-stream---multiple-csv-files-with-datadriven "Direct link to DuckDB Stream - Multiple CSV Files with DataDriven") Process multiple CSV files in parallel using filename as distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - Single Large CSV with Random Method[​](#duckdb-stream---single-large-csv-with-random-method "Direct link to DuckDB Stream - Single Large CSV with Random Method") Process a single large CSV file with parallel Random distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributekeycolumn "l_orderkey" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - CSV with Column Slicing[​](#duckdb-stream---csv-with-column-slicing "Direct link to DuckDB Stream - CSV with Column Slicing") Use calculated column slices for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --loadmode "Truncate" ` --degree 13 ``` ### DuckDB Stream - CSV with Custom Format[​](#duckdb-stream---csv-with-custom-format "Direct link to DuckDB Stream - CSV with Custom Format") Specify CSV format parameters when auto-detection isn't sufficient: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --loadmode "Truncate" ` --degree 12 ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributekeycolumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## ClickHouse Integration[​](#clickhouse-integration "Direct link to ClickHouse Integration") ### PostgreSQL to ClickHouse - Single-threaded[​](#postgresql-to-clickhouse---single-threaded "Direct link to PostgreSQL to ClickHouse - Single-threaded") Transfer data to ClickHouse without parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ### PostgreSQL to ClickHouse - Parallel with Physical[​](#postgresql-to-clickhouse---parallel-with-physical "Direct link to PostgreSQL to ClickHouse - Parallel with Physical") High-performance transfer using the Physical method (ctid on PostgreSQL): ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL - Multiple Methods[​](#clickhouse-to-postgresql---multiple-methods "Direct link to ClickHouse to PostgreSQL - Multiple Methods") Transfer from ClickHouse to PostgreSQL using various distribution methods: * Single-threaded * RangeId Method * DataDriven Method ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## SAP HANA Integration[​](#sap-hana-integration "Direct link to SAP HANA Integration") ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data to SAP HANA using the HANA bulk loader: **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Physical:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer from SAP HANA to PostgreSQL: ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## Teradata Integration[​](#teradata-integration "Direct link to Teradata Integration") ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data to Teradata with the parallel Physical method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## Netezza Integration[​](#netezza-integration "Direct link to Netezza Integration") Transfer from Netezza to MSSQL using DATASLICEID for optimal parallelism: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "DATASLICEID" ` --degree 6 ``` Netezza DATASLICEID Use DATASLICEID as the distribution column to leverage Netezza's internal data distribution for optimal parallel extraction. ## Advanced SQL Server Techniques[​](#advanced-sql-server-techniques "Direct link to Advanced SQL Server Techniques") ### Using Partition Functions[​](#using-partition-functions "Direct link to Using Partition Functions") Leverage SQL Server partition functions for efficient parallel transfers: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` Partition Function Syntax Use `` `$PARTITION.FunctionName(ColumnName) `` to reference a partition function. The backtick (`` ` ``) escapes the dollar sign in PowerShell. ### Using the Physical Method on SQL Server[​](#using-the-physical-method-on-sql-server "Direct link to Using the Physical Method on SQL Server") Use physical location for parallel distribution (readonly tables only): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physical" ` --degree 10 ` --mapmethod "Name" ``` Physical Method on SQL Server On SQL Server, the Physical method (Physloc) should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Dynamic Degree with Negative Values[​](#dynamic-degree-with-negative-values "Direct link to Dynamic Degree with Negative Values") Use negative degree values to automatically calculate parallelism based on CPU cores: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree -4 ` --loadmode "Truncate" ``` Dynamic Degree A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value. With 16 cores, `-4` results in 4 parallel threads. ### Batch Size Optimization[​](#batch-size-optimization "Direct link to Batch Size Optimization") Adjust batch size based on connection type for optimal performance: * **MSSQL (msbulk)**: 10,000 - 100,000 rows * **PostgreSQL (pgcopy)**: 10,000 - 50,000 rows * **Oracle (orabulk)**: 100,000 - 500,000 rows * **Oracle (oradirect)**: 1,000 - 10,000 rows * **ClickHouse**: 10,000 - 1,000,000 rows * **SAP HANA**: 5,000 - 10,000 rows ### Debug Logging[​](#debug-logging "Direct link to Debug Logging") Enable detailed logging for troubleshooting: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` Debug Mode Use `--loglevel "debug"` to see detailed execution steps, connection information, and query generation details for troubleshooting. ## Using Input Files[​](#using-input-files "Direct link to Using Input Files") Process SQL queries from external files: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --fileinput "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Physical" ` --degree 6 ` --loadmode "Truncate" ``` ## Column Mapping[​](#column-mapping "Direct link to Column Mapping") ### Map by Name[​](#map-by-name "Direct link to Map by Name") Map source columns to target columns by name with `--mapmethod "Name"` (the default is `Position`): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physical" ` --degree 10 ` --mapmethod "Name" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # CSV Import FastTransfer leverages a powerful `read_csv` function and syntax to efficiently import CSV files into any supported database. This provides advanced features like automatic schema detection, parallel processing, and support for complex CSV formats. FastTransfer offers several advantages for CSV processing: * **Automatic schema detection** - No need to manually define column types * **High performance** - Optimized CSV parser with parallel reading * **Flexible formatting** - Handle various delimiters, quotes, and escape characters * **Multi-file support** - Process multiple CSV files with glob patterns * **In-memory processing** - No need for a persistent database file ## Basic CSV Import[​](#basic-csv-import "Direct link to Basic CSV Import") ### Single Small CSV File[​](#single-small-csv-file "Direct link to Single Small CSV File") Import a single CSV file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Using :memory: The `:memory:` server parameter tells FastTransfer to operate in-memory without creating a database file. This is perfect for one-time CSV imports. This does not mean that FastTransfer will load all the file in memory. The data are streamed and memory usage stay low. ### Medium CSV File - Single Thread[​](#medium-csv-file---single-thread "Direct link to Medium CSV File - Single Thread") Import a medium-sized CSV file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel CSV Import[​](#parallel-csv-import "Direct link to Parallel CSV Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(id/10000)::int` divides the ID column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large CSV[​](#random-method-on-large-csv "Direct link to Random Method on Large CSV") Process a large CSV file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributekeycolumn "l_orderkey" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 13 ``` ## Multiple CSV Files[​](#multiple-csv-files "Direct link to Multiple CSV Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple CSV files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_csv()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Advanced CSV Formats[​](#advanced-csv-formats "Direct link to Advanced CSV Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") When automatic detection doesn't work, specify the CSV format explicitly: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` **Format Parameters:** * `auto_detect=false` - Disable automatic schema detection * `delim=','` - Field delimiter (comma) * `quote='"'` - Quote character for fields containing delimiters * `escape='"'` - Escape character for quotes within quoted fields * `new_line='\n'` - Line terminator * `skip=0` - Number of lines to skip at the start * `comment=''` - Character indicating comment lines to ignore * `header=true` - First line contains column names * `columns={...}` - Explicit column names and types ### CSV with Vector Data to SQL Server[​](#csv-with-vector-data-to-sql-server "Direct link to CSV with Vector Data to SQL Server") Import CSV containing vector embeddings as VARCHAR: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id,url,title,text,title_vector::varchar tv,content_vector::varchar cv,vector_id from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') limit 100" ` --targetconnectiontype "msbulk" ` --targetserver "localhost\SS2025" ` --targettrusted ` --targetdatabase "wikipedia" ` --targetschema "dbo" ` --targettable "wikipedia_articles_embeddings_as_vector" ` --mapmethod "Name" ` --loadmode "Append" ``` ## Common CSV Scenarios[​](#common-csv-scenarios "Direct link to Common CSV Scenarios") ### Tab-Delimited Files[​](#tab-delimited-files "Direct link to Tab-Delimited Files") For tab-separated values (TSV): ``` --query "SELECT * FROM read_csv('file.tsv', delim='\t')" ``` ### CSV with Different Encodings[​](#csv-with-different-encodings "Direct link to CSV with Different Encodings") ``` --query "SELECT * FROM read_csv('file.csv', encoding='UTF-8')" ``` ### CSV with Custom Quote Character[​](#csv-with-custom-quote-character "Direct link to CSV with Custom Quote Character") ``` --query "SELECT * FROM read_csv('file.csv', quote='''', escape='''')" ``` ### CSV Without Headers[​](#csv-without-headers "Direct link to CSV Without Headers") ``` --query "SELECT * FROM read_csv('file.csv', header=false, columns={'col1': 'VARCHAR', 'col2': 'INTEGER'})" ``` ### Skip Header Lines[​](#skip-header-lines "Direct link to Skip Header Lines") ``` --query "SELECT * FROM read_csv('file.csv', skip=3)" ``` --- # JSON Import FastTransfer leverages a powerful `read_json` function to efficiently import JSON files into any supported database. It provides advanced features like automatic schema detection, nested structure handling, and support for both JSON objects and JSON Lines (JSONL/NDJSON) formats. FastTransfer offers several advantages for JSON processing: * **Automatic schema detection** - Automatically infers column types from JSON structure * **High performance** - Optimized JSON parser with parallel reading * **Nested structure support** - Handle complex nested objects and arrays * **Multiple formats** - Support for JSON, JSON Lines (JSONL), and NDJSON * **Array flattening** - Use `unnest()` to flatten nested arrays * **In-memory processing** - No need for a persistent database file ## Basic JSON Import[​](#basic-json-import "Direct link to Basic JSON Import") ### Single JSON File[​](#single-json-file "Direct link to Single JSON File") Import a single JSON file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\users.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "AppDB" ` --targetschema "dbo" ` --targettable "users" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` JSON Formats FastTransfer automatically detects the JSON format: * **JSON Array**: `[{...}, {...}]` - Array of objects * **JSON Lines (JSONL)**: One JSON object per line * **NDJSON**: Newline-delimited JSON objects ### JSON Lines File - Single Thread[​](#json-lines-file---single-thread "Direct link to JSON Lines File - Single Thread") Import a JSON Lines file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\events.jsonl', format='newline_delimited')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "analytics" ` --targetschema "public" ` --targettable "events" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel JSON Import[​](#parallel-json-import "Direct link to Parallel JSON Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\orders.jsonl')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(order_id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(order_id/10000)::int` divides the order\_id column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large JSON File[​](#random-method-on-large-json-file "Direct link to Random Method on Large JSON File") Process a large JSON Lines file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\transactions.jsonl')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "Random" ` --distributekeycolumn "transaction_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\logs.jsonl') rjson" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(event_timestamp::date)" ` --datadrivenquery "select distinct event_timestamp::date from read_json('D:\DATA\logs.jsonl') rjson" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple JSON Files[​](#multiple-json-files "Direct link to Multiple JSON Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple JSON files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_json('D:\DATA\daily\*.jsonl', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_metrics" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.jsonl')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_json()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Nested JSON Structures[​](#nested-json-structures "Direct link to Nested JSON Structures") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested JSON structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, user.name as user_name, user.email as user_email, order_date, total_amount FROM read_json('D:\DATA\orders.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within JSON objects: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(items, recursive := true) FROM read_json('D:\DATA\orders_with_items.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structure[​](#complex-nested-structure "Direct link to Complex Nested Structure") Handle deeply nested JSON with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, address.street as street, address.city as city, address.country as country, contacts[1] as primary_contact FROM read_json('D:\DATA\customers.json')" ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "crm" ` --targetuser "crmuser" ` --targetpassword "YourPassword" ` --targetschema "crm" ` --targettable "customers" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Advanced JSON Formats[​](#advanced-json-formats "Direct link to Advanced JSON Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") Specify JSON format explicitly when needed: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\data.json', format='array', maximum_depth=10)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "raw_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` **Format Parameters:** * `format='array'` - JSON array of objects * `format='newline_delimited'` - JSON Lines (JSONL/NDJSON) * `format='auto'` - Automatic detection (default) * `maximum_depth` - Maximum nesting depth to parse * `records='true'` - Parse records format * `columns={...}` - Explicit column names and types ### Compressed JSON Files[​](#compressed-json-files "Direct link to Compressed JSON Files") Import gzip-compressed JSON files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\logs.jsonl.gz', compression='gzip')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "compressed_logs" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Compression Support DuckDB automatically detects compression from file extensions: * `.gz` - Gzip compression * `.json.gz` or `.jsonl.gz` - Compressed JSON files ## JSON Type Conversions[​](#json-type-conversions "Direct link to JSON Type Conversions") ### Converting JSON Fields[​](#converting-json-fields "Direct link to Converting JSON Fields") Transform JSON data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, CAST(amount AS DECIMAL(10,2)) as amount, status FROM read_json('D:\DATA\payments.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "payments" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### JSON String to Array[​](#json-string-to-array "Direct link to JSON String to Array") Convert JSON string fields to arrays: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, json_extract(tags, '$') as tags_array FROM read_json('D:\DATA\products.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "catalog" ` --targetschema "public" ` --targettable "products" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # MySQL Examples Examples for transferring data from and to MySQL databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") MySQL transfers support: * **mysql**: Standard MySQL protocol for reading * **mysqlbulk**: MySQL bulk loader for high-performance target loading ## MySQL to MSSQL - Single-threaded Transfer[​](#mysql-to-mssql---single-threaded-transfer "Direct link to MySQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with Random Method[​](#mysql-to-mssql---parallel-transfer-with-random-method "Direct link to MySQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mysql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MySQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values. **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 10 ` --loadmode Truncate ``` **Using partitioned table with year column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## MSSQL to MySQL - Single-threaded Transfer[​](#mssql-to-mysql---single-threaded-transfer "Direct link to MSSQL to MySQL - Single-threaded Transfer") Transfer data from SQL Server to MySQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Parallel Transfer with Random Method[​](#mssql-to-mysql---parallel-transfer-with-random-method "Direct link to MSSQL to MySQL - Parallel Transfer with Random Method") Transfer with Random distribution. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Using Partition Function[​](#mssql-to-mysql---using-partition-function "Direct link to MSSQL to MySQL - Using Partition Function") Transfer with DataDriven method using SQL Server partition function. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Adding Computed Column[​](#mssql-to-mysql---adding-computed-column "Direct link to MSSQL to MySQL - Adding Computed Column") Transfer with additional computed column and DataDriven method. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select *,null as o_orderdate_year from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## Using ODBC Connection to MySQL[​](#using-odbc-connection-to-mysql "Direct link to Using ODBC Connection to MySQL") Transfer using ODBC DSN for MySQL connection. ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMySQLTPCH" ` --sourcedatabase "tpch" ` --query "select * from tpch.orders_part LIMIT 10" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for transferring data from and to Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle transfers support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended for source) * **orabulk**: Oracle Bulk Loader for high-performance target loading * **oradirect**: Oracle Direct Path for target loading * **odbc**: Using ODBC DSN ## Oracle to MSSQL - Single-threaded Transfer[​](#oracle-to-mssql---single-threaded-transfer "Direct link to Oracle to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "localhost:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ``` ## Oracle to MSSQL - Parallel Transfer with the Physical Method[​](#oracle-to-mssql---parallel-transfer-with-the-physical-method "Direct link to Oracle to MSSQL - Parallel Transfer with the Physical Method") Oracle-specific parallel transfer using physical row identifier (ROWID). Oracle-Specific On Oracle, the Physical method uses the physical row identifier (ROWID) for parallel data distribution. This is very efficient for full table transfers. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "LOCALHOST:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS_FLAT" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --loadmode "Truncate" ` --degree 12 ``` ## PostgreSQL to Oracle - Using orabulk (Bulk Loader)[​](#postgresql-to-oracle---using-orabulk-bulk-loader "Direct link to PostgreSQL to Oracle - Using orabulk (Bulk Loader)") Transfer data from PostgreSQL to Oracle using Oracle bulk loader. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## PostgreSQL to Oracle - Using oradirect (Direct Path)[​](#postgresql-to-oracle---using-oradirect-direct-path "Direct link to PostgreSQL to Oracle - Using oradirect (Direct Path)") Transfer data from PostgreSQL to Oracle using Oracle direct path loading. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 1000 ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "FREEPDB1" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## Using ODBC Connection to Oracle[​](#using-odbc-connection-to-oracle "Direct link to Using ODBC Connection to Oracle") Transfer using ODBC DSN for Oracle connection. **To MSSQL - single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNORA23CFREEPDB1" ` --sourcedatabase "FREEPDB1" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for transferring data from and to ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB databases. ## ClickHouse[​](#clickhouse "Direct link to ClickHouse") Transfer data from and to ClickHouse database. ### PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse using the bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with Physical:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL[​](#clickhouse-to-postgresql "Direct link to ClickHouse to PostgreSQL") Transfer data from ClickHouse to PostgreSQL with various parallelization methods. **Single-threaded:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with RangeId:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Ntile:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Ntile" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Random:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with DataDriven:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ClickHouse Connection Types * **clickhouse**: Standard connection for reading * **clickhousebulk**: High-performance bulk loader for writing ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Transfer data from and to SAP HANA database. ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA using the HANA bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Physical:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Batch Size For SAP HANA, use batch sizes between 5,000 and 10,000 rows for optimal performance. ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer data from SAP HANA to PostgreSQL. ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Connection Types * **hana**: Standard connection for reading from SAP HANA * **hanabulk**: Bulk loader for writing to SAP HANA ## Netezza[​](#netezza "Direct link to Netezza") Transfer data from Netezza using the DATASLICEID for optimal parallelism. ### Netezza to MSSQL[​](#netezza-to-mssql "Direct link to Netezza to MSSQL") Transfer from Netezza to SQL Server using DataDriven method on DATASLICEID: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "DATASLICEID" ` --degree 6 ` --loadmode Truncate ``` Netezza DATASLICEID The DATASLICEID column in Netezza represents the internal data distribution. Using it as the distribution key provides optimal parallel extraction by leveraging Netezza's data placement. ## Teradata[​](#teradata "Direct link to Teradata") Transfer data from and to Teradata database. ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer data from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## DuckDB[​](#duckdb "Direct link to DuckDB") Transfer data from and to DuckDB database files or in-memory. ### MSSQL to DuckDB File[​](#mssql-to-duckdb-file "Direct link to MSSQL to DuckDB File") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributekeycolumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### DuckDB Stream - CSV Files[​](#duckdb-stream---csv-files "Direct link to DuckDB Stream - CSV Files") Process CSV files using DuckDB's in-memory engine and load into SQL Server: **Single CSV file:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Multiple CSV files with parallel processing:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` DuckDB Connection Types * **duckdb**: Direct connection to DuckDB file * **duckdbstream**: Streaming connection for in-memory processing or file-based operations * Use `:memory:` as server for in-memory processing tip Build your command with the [Wizard](/latest/wizard.md) --- # Parquet Import FastTransfer leverages a powerful `read_parquet` function to efficiently import Parquet files into any supported database. Parquet is a columnar storage format optimized for analytics, and it provides excellent performance and feature support for reading Parquet files. FastTransfer offers several advantages for Parquet processing: * **Columnar access** - Read only the columns you need for optimal performance * **Predicate pushdown** - Filter data at the file level before loading * **Automatic schema detection** - Column types preserved from Parquet metadata * **High performance** - Optimized Parquet reader with parallel processing * **Compression support** - Handles all Parquet compression codecs (Snappy, Gzip, LZ4, Zstd) * **Nested structure support** - Handle complex nested objects, arrays, and maps * **Multi-file support** - Process multiple Parquet files with glob patterns * **Partition support** - Hive-style partitioning for efficient data access ## Basic Parquet Import[​](#basic-parquet-import "Direct link to Basic Parquet Import") ### Single Parquet File[​](#single-parquet-file "Direct link to Single Parquet File") Import a single Parquet file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\sales.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "SalesDB" ` --targetschema "dbo" ` --targettable "sales" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Column Selection For optimal performance, select only the columns you need: ``` --query "SELECT customer_id, order_date, total_amount FROM read_parquet('file.parquet')" ``` This reduces I/O and memory usage significantly. ### Multiple Parquet Files - Single Thread[​](#multiple-parquet-files---single-thread "Direct link to Multiple Parquet Files - Single Thread") Import multiple Parquet files using glob pattern: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\orders\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel Parquet Import[​](#parallel-parquet-import "Direct link to Parallel Parquet Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\transactions\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "finance" ` --targetschema "public" ` --targettable "transactions" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(transaction_id/100000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(transaction_id/100000)::int` divides the ID by 100,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large Parquet Files[​](#random-method-on-large-parquet-files "Direct link to Random Method on Large Parquet Files") Process large Parquet files with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "events" ` --parallelmethod "Random" ` --distributekeycolumn "event_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\logs\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributekeycolumn "CAST(event_date AS VARCHAR)" ` --datadrivenquery "select distinct CAST(event_date AS VARCHAR) from read_parquet('D:\DATA\logs\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple Parquet Files[​](#multiple-parquet-files "Direct link to Multiple Parquet Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple Parquet files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_parquet('D:\DATA\daily\*.parquet', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_reports" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_parquet()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Hive-Style Partitioning[​](#hive-style-partitioning "Direct link to Hive-Style Partitioning") ### Reading Partitioned Data[​](#reading-partitioned-data "Direct link to Reading Partitioned Data") Read Parquet files with Hive-style partitioning: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\partitioned\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "warehouse" ` --targetschema "dbo" ` --targettable "partitioned_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Hive Partitioning For data organized like `year=2024/month=01/data.parquet`, DuckDB automatically extracts partition columns: * Partition columns become regular columns in the result * Use `hive_partitioning=true` to enable this feature * Excellent for partition pruning and efficient queries ### Parallel Processing on Partitioned Data[​](#parallel-processing-on-partitioned-data "Direct link to Parallel Processing on Partitioned Data") Use partition columns for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "sales_data" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year || '-' || month" ` --datadrivenquery "select distinct year || '-' || month as partition_key from read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` ## Nested Structures in Parquet[​](#nested-structures-in-parquet "Direct link to Nested Structures in Parquet") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested Parquet structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, customer.name as customer_name, customer.email as customer_email, order_date, total FROM read_parquet('D:\DATA\orders.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(line_items, recursive := true) FROM read_parquet('D:\DATA\orders_nested.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structures[​](#complex-nested-structures "Direct link to Complex Nested Structures") Handle complex nested Parquet data with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) FROM read_parquet('D:\DATA\chantier\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "construction" ` --targetschema "dbo" ` --targettable "site_details" ` --parallelmethod "DataDriven" ` --distributekeycolumn "day" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 8 ``` ## Advanced Filtering[​](#advanced-filtering "Direct link to Advanced Filtering") ### Predicate Pushdown[​](#predicate-pushdown "Direct link to Predicate Pushdown") Apply filters to reduce data read from Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet') WHERE event_date >= '2024-01-01' AND event_type = 'purchase'" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "purchases" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Append" ``` Predicate Pushdown Benefits DuckDB pushes filters down to the Parquet reader, which: * Skips entire row groups that don't match the filter * Reduces memory usage * Significantly improves performance for selective queries * Works best with filters on partition columns or columns with statistics ### Column Pruning with Selection[​](#column-pruning-with-selection "Direct link to Column Pruning with Selection") Select only needed columns for maximum performance: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT customer_id, order_date, total_amount, status FROM read_parquet('D:\DATA\orders_large.parquet') WHERE order_date >= '2024-01-01'" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "recent_orders" ` --parallelmethod "Random" ` --distributekeycolumn "customer_id" ` --mapmethod "Name" ` --loadmode "Append" ` --degree 12 ``` ## Schema and Metadata[​](#schema-and-metadata "Direct link to Schema and Metadata") ### Union Multiple Parquet Files[​](#union-multiple-parquet-files "Direct link to Union Multiple Parquet Files") Union Parquet files with compatible schemas: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet(['D:\DATA\2023\*.parquet', 'D:\DATA\2024\*.parquet'], union_by_name=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "archive" ` --targetschema "dbo" ` --targettable "historical_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Union By Name `union_by_name=true` allows reading files with different column orders or optional columns: * Columns are matched by name instead of position * Missing columns are filled with NULL * Extra columns are ignored * Useful for schema evolution scenarios ### Type Conversion[​](#type-conversion "Direct link to Type Conversion") Convert Parquet data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, amount::DECIMAL(18,2) as amount, status FROM read_parquet('D:\DATA\transactions.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # PostgreSQL Examples Comprehensive examples for transferring data from and to PostgreSQL databases using native connectors. ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL transfers support multiple connection types: * **pgsql**: Standard PostgreSQL protocol for reading/writing * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk transfers). Data is copied in binary format when both the source and the target use `pgcopy`, and in text format otherwise ## PostgreSQL to MSSQL - Single-threaded Transfer[​](#postgresql-to-mssql---single-threaded-transfer "Direct link to PostgreSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization using a SQL query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## PostgreSQL to MSSQL - Using Schema and Table[​](#postgresql-to-mssql---using-schema-and-table "Direct link to PostgreSQL to MSSQL - Using Schema and Table") Transfer specifying schema and table names instead of a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#postgresql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on a calculated column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "FLOOR(o_orderkey/10000000)" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Parallel Transfer with the Physical Method[​](#postgresql-to-mssql---parallel-transfer-with-the-physical-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with the Physical Method") PostgreSQL-specific parallel transfer using physical row identifier (ctid). PostgreSQL-Specific On PostgreSQL, the Physical method uses the physical row identifier (ctid) for parallel data distribution. This is very efficient for full table transfers. **For orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ``` **For lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with Random Method[​](#postgresql-to-mssql---parallel-transfer-with-random-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Dynamic Degree[​](#postgresql-to-mssql---dynamic-degree "Direct link to PostgreSQL to MSSQL - Dynamic Degree") Use negative degree values to automatically determine parallelism. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## PostgreSQL to MSSQL - Using Input File[​](#postgresql-to-mssql---using-input-file "Direct link to PostgreSQL to MSSQL - Using Input File") Transfer using a SQL query from an external file. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --fileinput "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Physical" ` --degree 6 ` --loadmode "Truncate" ``` ## PostgreSQL to PostgreSQL - Using Query[​](#postgresql-to-postgresql---using-query "Direct link to PostgreSQL to PostgreSQL - Using Query") Transfer between PostgreSQL databases using a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --query "select * from ""tpch_10"".orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## PostgreSQL to PostgreSQL - Using the Physical Method[​](#postgresql-to-postgresql---using-the-physical-method "Direct link to PostgreSQL to PostgreSQL - Using the Physical Method") Transfer between PostgreSQL databases with the parallel Physical method (ctid). * Using pgcopy (COPY) * Using pgsql (INSERT UNNEST) ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 6 ` --loadmode "Truncate" ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgsql" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to PostgreSQL - Using pgcopy Binary[​](#postgresql-to-postgresql---using-pgcopy-binary "Direct link to PostgreSQL to PostgreSQL - Using pgcopy Binary") High-performance transfer using PostgreSQL binary COPY protocol: binary format is used because both the source and the target connection types are `pgcopy`. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Parallel with Physical - orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ``` **Parallel with Physical - lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "lineitem" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ``` ## PostgreSQL to Oracle[​](#postgresql-to-oracle "Direct link to PostgreSQL to Oracle") Transfer data from PostgreSQL to Oracle databases. * Using orabulk (Bulk Load) * Using oradirect (Direct Path) **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 1000 ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ## PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL (Hyper File) to MSSQL[​](#postgresql-hyper-file-to-mssql "Direct link to PostgreSQL (Hyper File) to MSSQL") Transfer data from a Tableau Hyper file (using pgsql driver) to MSSQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:8095" ` --sourcedatabase "D:\OpenData\TPCH\data\hyper\tpch_sf10.hyper" ` --sourceuser "tableau_internal_user" ` --sourcepassword "" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from ""ORDERS""" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for transferring data from and to SQL Server databases. ## MSSQL to MSSQL - Single-threaded Transfer[​](#mssql-to-mssql---single-threaded-transfer "Direct link to MSSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization for smaller datasets. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with Random Method[​](#mssql-to-mssql---parallel-transfer-with-random-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. * Windows Authentication * SQL Authentication ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with RangeId Method[​](#mssql-to-mssql---parallel-transfer-with-rangeid-method "Direct link to MSSQL to MSSQL - Parallel Transfer with RangeId Method") Transfer using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Using query with filter:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with Ntile Method[​](#mssql-to-mssql---parallel-transfer-with-ntile-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Ntile Method") Transfer using Ntile distribution for evenly distributed chunks. **Full table transfer:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Filtered transfer with date column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mssql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MSSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values of a column or partition function. **Using partition function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "DataDriven" ` --distributekeycolumn "YEAR(o_orderdate)" ` --degree 7 ` --loadmode Append ``` ## MSSQL to MSSQL - Using the Physical Method[​](#mssql-to-mssql---using-the-physical-method "Direct link to MSSQL to MSSQL - Using the Physical Method") Transfer using physical location (should only be used on readonly/snapshot databases). warning On SQL Server, the Physical method (Physloc) should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physical" ` --degree 10 ` --mapmethod "Name" ``` ## MSSQL to PostgreSQL[​](#mssql-to-postgresql "Direct link to MSSQL to PostgreSQL") Transfer data from SQL Server to PostgreSQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 10 ` --loadmode "Truncate" ``` ## MSSQL to MySQL[​](#mssql-to-mysql "Direct link to MSSQL to MySQL") Transfer data from SQL Server to MySQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` **With DataDriven method on partitioned table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer data from SQL Server to DuckDB. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## Using ODBC Connection[​](#using-odbc-connection "Direct link to Using ODBC Connection") Transfer using ODBC DSN for connection. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMsSQLTPCH" ` --sourcedatabase "tpch_test" ` --query "select top 1000 * from dbo.orders" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## Dynamic Degree[​](#dynamic-degree "Direct link to Dynamic Degree") Use negative degree values to automatically determine parallelism based on CPU cores. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## Load Modes[​](#load-modes "Direct link to Load Modes") FastTransfer supports different load modes for the target table: * `Truncate`: Truncates the target table before loading * `Append`: Appends data to existing table (default) Example with Append mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: Samples on this page * [FastTransfer\_​Settings.json](#fasttransfer_settingsjson-for-windows)Console + Files stored on Windows machine + MSSQL * [FastTransfer\_​Settings\_​Linux\_​Console\_​Files.json](#fasttransfer_settings_linux_console_filesjson)Linux with Console + Daily rolling Files * [FastTransfer\_​Settings\_​Map\_​for\_​Windows.json](#fasttransfer_settings_map_for_windowsjson)Console and dynamically named log file targets (Windows) * [FastTransfer\_​Settings\_​Map\_​for\_​Linux\_​and\_​Container.json](#fasttransfer_settings_map_for_linux_and_containerjson)Console and dynamically named log file targets (Linux/Container) * [FastTransfer\_​Settings\_​Log\_​to\_​PGSQL.json](#fasttransfer_settings_log_to_pgsqljson--console--postgresql-log-database)Console + PostgreSQL log database ## FastTransfer\_Settings.json for Windows[​](#fasttransfer_settingsjson-for-windows "Direct link to FastTransfer_Settings.json for Windows") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastTransferLogs": "Server=localhost;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs\\FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastTransferLogs", "sinkOptionsSection": { "TableName": "EventLogs", "SchemaName": "dbo", "DatabaseName": "FastTransferLogs", "AutoCreateSqlDatabase": true, "AutoCreateSqlTable": true, "BatchPostingLimit": 50, "BatchPeriod": "0.00:00:05", "UseSqlBulkCopy": false }, "restrictedToMinimumLevel": "Information", "columnOptionsSection": { "disableTriggers": true, "clusteredColumnstoreIndex": false, "removeStandardColumns": [ "Id", "MessageTemplate", "Properties", "Exception" ], "additionalColumns": [ { "ColumnName": "ErrorSummary", "PropertyName": "rootcauseMessage", "DataType": "nvarchar", "DataLength": 4000 }, { "ColumnName": "EventType", "PropertyName": "EventType", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "FullTargetName", "PropertyName": "fulltargetname", "DataType": "nvarchar", "DataLength": 400 }, { "ColumnName": "Status", "PropertyName": "finalStatus", "DataType": "int" }, { "ColumnName": "Rows", "PropertyName": "loadedRows", "DataType": "bigint" }, { "ColumnName": "Columns", "PropertyName": "loadedCols", "DataType": "int" }, { "ColumnName": "ElaspedMs", "PropertyName": "loadElapsedMs", "DataType": "bigint" }, { "ColumnName": "MachineName", "PropertyName": "MachineName", "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "Application", "PropertyName": "Application", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "ProcessId", "PropertyName": "ProcessId", "DataType": "int" }, { "ColumnName": "ThreadId", "PropertyName": "ThreadId", "DataType": "int" }, { "ColumnName": "RunId", "PropertyName": "runid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "TraceId", "PropertyName": "traceid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "SpanId", "PropertyName": "SpanId", "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "Release", "PropertyName": "release", "DataType": "varchar", "DataLength": 32 }, { "ColumnName": "EnvironmentUserName", "PropertyName": "EnvironmentUserName", "DataType": "varchar", "DataLength": 200 }, { "ColumnName": "InputParameters", "PropertyName": "InputParameters", "DataType": "varchar", "DataLength": 8000 } ], "level": { "columnName": "Severity", "storeAsEnum": false, "DataType": "varchar", "DataLength": 50 }, "timeStamp": { "columnName": "EventTimestamp", "nonClusteredIndex": true, "convertToUtc": false }, "logEvent": { "excludeAdditionalProperties": false, "excludeStandardColumns": true }, "message": { "columnName": "EventMsg", "DataType": "varchar", "DataLength": 8000 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Linux\_Console\_Files.json[​](#fasttransfer_settings_linux_console_filesjson "Direct link to FastTransfer_Settings_Linux_Console_Files.json") For Linux with Console + Daily rolling Files: ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs/FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Windows.json[​](#fasttransfer_settings_map_for_windowsjson "Direct link to FastTransfer_Settings_Map_for_Windows.json") For Console and dynamically named log file targets (Windows): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "C:\\temp\\Logs\\{logdate}\\{sourcedatabase}\\{sourcetable}\\FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fasttransfer_settings_map_for_linux_and_containerjson "Direct link to FastTransfer_Settings_Map_for_Linux_and_Container.json") For Console and dynamically named log file targets (Linux/Container): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fasttransfer_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastTransfer_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastTransferLogs": "Host=localhost;Port=15432;Database=fastlogs;Username=FastUser;Password=FastPassword" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.PostgreSQL.Alternative", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "PostgreSQL", "Args": { "connectionString": "PG_FastTransferLogs", "tableName": "event_logs", "schemaName": "public", "needAutoCreateTable": true, "needAutoCreateSchema": false, "restrictedToMinimumLevel": "Information", "useCopy": false, "loggerColumnOptions": { "event_timestamp": { "Name": "Timestamp", "Format": "", "WriteMethod": "Timestamp", "NpgsqlDbType": "TimestampTz", "Order": 1 }, "event_msg": { "Name": "RenderedMessage", "Format": "", "WriteMethod": "RenderedMessage", "NpgsqlDbType": "Text", "Order": 2 }, "Level": { "Name": "LevelAsText", "Order": 3 }, "LevelInt": { "Name": "Level", "Order": 4 } }, "loggerPropertyColumnOptions": { "error_summary": { "Name": "rootcauseMessage", "Format": "{0}", "WriteMethod": "ToString", "NpgsqlDbType": "Text", "Order": 5 }, "source_database": { "Name": "SourceDatabase", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 6 }, "source_schema": { "Name": "SourceSchema", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 7 }, "source_table": { "Name": "SourceTable", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 8 }, "output_directory": { "Name": "OutputDirectory", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 9 }, "full_target_name": { "Name": "fulltargetname", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 10 }, "application": { "Name": "Application", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 11 }, "status": { "Name": "finalStatus", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 12 }, "rows": { "Name": "loadedRows", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Numeric", "Order": 13 }, "columns": { "Name": "loadedCols", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 14 }, "elapsed_ms": { "Name": "loadElapsedMs", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Numeric", "Order": 15 }, "machine_name": { "Name": "MachineName", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 16 }, "process_id": { "Name": "ProcessId", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 17 }, "thread_id": { "Name": "ThreadId", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 18 }, "run_id": { "Name": "runid", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 19 }, "trace_id": { "Name": "traceid", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 20 }, "span_id": { "Name": "SpanId", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 21 }, "release": { "Name": "release", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 22 }, "environment_user_name": { "Name": "EnvironmentUserName", "Format": "", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 23 }, "input_parameters": { "Name": "InputParameters", "WriteMethod": "Raw", "NpgsqlDbType": "Json", "Order": 24 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` --- # Log Database FastTransfer supports logging to a **Microsoft SQL Server** or **PostgreSQL** database. To enable database logging, configure the log database connection string in a settings file: * The default settings file is `FastTransfer_Settings.json` * You can specify a custom settings file using the `--settingsfile` parameter warning **In case the database is not reachable, FastTransfer will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastTransfer_Settings.json` file to something else (like `FastTransfer_Settings.json.save`) and FastTransfer will use the console log only. Configuration examples Complete configuration examples for both MSSQL and PostgreSQL * [Console + Files + MSSQL](/1.0/documentation/logging/examples.md#fasttransfer_settingsjson-for-windows)`FastTransfer_Settings.json`, Windows * [Console + PostgreSQL log database](/1.0/documentation/logging/examples.md#fasttransfer_settings_log_to_pgsqljson--console--postgresql-log-database)`FastTransfer_Settings_Log_to_PGSQL.json` --- # Log Files Names Mapping using variables You can use variables to define the log file path and files names in the `FastTransfer_Settings.json` file. In the `WriteTo` array, you can use a `Map` like this: ``` { "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ] } ``` The available variables to customize the log path or log file name are: `{logdate}` Current date in yyyy-MM-dd format `{logtimestamp}` Timestamp of the log entry `{sourcedatabase}` Name of the source database `{sourceschema}` Name of the source schema `{sourcetable}` Name of the source table `{filename}` Name of the file being processed `{runid}` Run identifier provided in the command line `{traceid}` Unique identifier generated at runtime Complete configuration examples For both Windows and Linux * [FastTransfer\_​Settings\_​Map\_​for\_​Windows.json](/1.0/documentation/logging/examples.md#fasttransfer_settings_map_for_windowsjson)Windows * [FastTransfer\_​Settings\_​Map\_​for\_​Linux\_​and\_​Container.json](/1.0/documentation/logging/examples.md#fasttransfer_settings_map_for_linux_and_containerjson)Linux/Container --- # Log Levels FastTransfer uses Serilog for logging and supports multiple log levels to control the verbosity of output. You can set the loglevel using the `--loglevel` parameter followed by a value in the list of available log levels. ## Available Log Levels[​](#available-log-levels "Direct link to Available Log Levels") VERBOSE `Verbose`: most detailed tracing information. Use case: deep troubleshooting. DEBUG `Debug`: detailed diagnostic information. Use case: development and troubleshooting. INFOdefault `Information`: general informational messages. Use case: normal operation. WARNING `Warning`: potentially harmful situations. Use case: issues that don't prevent operation. ERROR `Error`: error events that allow continuation. Use case: operation failures. FATAL `Fatal`: severe errors causing termination. Use case: fatal application errors. note The `--loglevel` parameter accepts `verbose`, `debug`, `information`, `warning` and `error`. `Fatal` can only be set through the `MinimumLevel` property of the settings file. ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastTransfer_Settings.json` file by modifying the `MinimumLevel` property: ``` { "Serilog": { "MinimumLevel": "Debug", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "path": "Logs\\FastTransfer_.json", "rollingInterval": "Day" } } ] } } ``` --- # Logging Overview ## Parameter Logs targets using FastTransfer\_Settings.json[​](#parameter-logs-targets-using-fasttransfer_settingsjson "Direct link to Parameter Logs targets using FastTransfer_Settings.json") FastTransfer can log information in 3 modes: Log targets * [Console](/1.0/documentation/logging/logs-level.md)log levels and console output * [Database](/1.0/documentation/logging/log-database.md)MSSQL and PostgreSQL only * [File (or Map)](/1.0/documentation/logging/log-files-names-mapping-using-variables.md)log file paths and names built from variables Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastTransfer_Settings.json` file. By default, if no custom path is provided, FastTransfer looks for the settings file in: * the current directory (the working directory) * the same directory where the FastTransfer executable is located (the executable directory). If this file is not present, FastTransfer will use the console log only. You can specify a custom path to the settings file using the `--settingsfile` parameter. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --settingsfile "D:\logs\config\FastTransfer_Settings.json" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --query "select * from orders" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "None" \ --settingsfile "/etc/fasttransfer/FastTransfer_Settings.json" ``` See also * [Configuration Examples](/1.0/documentation/logging/examples.md)sample settings files --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` Expand-Archive -Path .\FastTransfer.zip -DestinationPath .\FastTransfer ``` You can verify the installation by checking the version: ``` .\FastTransfer.exe --version ``` To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` unzip FastTransfer.zip -d FastTransfer ``` On **Linux**, you need to give execution rights to the FastTransfer binary: ``` chmod +x FastTransfer ``` You can verify the installation by checking the version: ``` ./FastTransfer --version ``` FastTransfer is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)**. Pull the latest version: ``` docker pull arpeio/fasttransfer ``` Or pull a specific version: ``` docker pull arpeio/fasttransfer:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fasttransfer:latest --version ``` You are now ready to run FastTransfer Build your first command with the [Doc Wizard](/latest/wizard.md), or follow [Getting Started](/1.0/.md). License Information After the trial period you will need a valid license. By default, FastTransfer will try to find a `FastTransfer.lic` file in the same directory as the executable. You can also provide another path, a URL, or even the license content using the `--license` parameter. ## Embedded Drivers[​](#embedded-drivers "Direct link to Embedded Drivers") The following database drivers are embedded in FastTransfer: | Database | Embedded Drivers | | ------------- | ---------------- | | Clickhouse | Supported | | DuckDB | Supported | | MS SQL Server | Supported | | MySQL | Supported | | Netezza | Supported | | Oracle | Supported | | PostgreSQL | Supported | | SAP HANA | Supported | | Teradata | Supported | ### Other databases[​](#other-databases "Direct link to Other databases") ODBC or OLEDB drivers required If you need another database not in the list, you can use ODBC or OLEDB but you will need to install your ODBC or OLEDB drivers of your favorite database. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastTransfer can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. ## Setup in four steps[​](#setup-in-four-steps "Direct link to Setup in four steps") 1. 1Install the Docker provider`apache-airflow-providers-docker`, see [Prerequisites](#prerequisites) 2. 2Create the connectionsSource and target databases, see [Configure Airflow Connections](#configure-airflow-connections) 3. 3Add the DAGA `DockerOperator` task that runs the FastTransfer image, see [Complete DAG Example](#complete-dag-example) 4. 4Check the logsIn the Airflow UI, see [Logging](#logging) ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: `arpeio/fasttransfer:latest`. * [arpeio/fasttransfer on DockerHub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)the prebuilt image * [Docker integration](/1.0/integration/docker-integration.md)tags, volumes and logging settings of the image ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastTransfer with Airflow, you need to install the Docker provider package: ``` pip install apache-airflow-providers-docker ``` Or add it to your Airflow requirements: ``` apache-airflow-providers-docker ``` ## Configure Airflow Connections[​](#configure-airflow-connections "Direct link to Configure Airflow Connections") Airflow connections allow you to securely store and manage credentials for external systems. FastTransfer integration requires connections for your source and target databases. 1. Source database connection (MSSQL example) Airflow UI›Admin›Connections 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **ODBC** 4. Configure the connection with the settings below | Field | Value | | ------------------- | ------------------------------------------ | | **Connection Id** | `mssql_tpch10` (or your preferred name) | | **Connection Type** | `ODBC` (select this from the dropdown) | | **Host** | `192.168.65.254` (your database host) | | **Port** | `11433` (your database port) | | **Login** | Your database username (e.g., `FastLogin`) | | **Password** | Your database password | | **Extra** | `{"database":"tpch10"}` | 2. Target database connection (PostgreSQL example) Airflow UI›Admin›Connections 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Postgres** 4. Configure the connection with the settings below | Field | Value | | ------------------- | ------------------------------------------ | | **Connection Id** | `pg_target` (or your preferred name) | | **Connection Type** | `Postgres` (select this from the dropdown) | | **Host** | `192.168.65.254` (your database host) | | **Port** | `25433` (your database port) | | **Schema** | `postgres` *(this is the database name)* | | **Login** | `postgres` (your database username) | | **Password** | Your database password | Good to know * For ODBC connections, the database name should be specified in the Extra JSON field using `{"database":"your_database_name"}`. * For Postgres connections, the database name is specified in the **Schema** field. ## Integration with DockerOperator[​](#integration-with-dockeroperator "Direct link to Integration with DockerOperator") The [`DockerOperator`](https://airflow.apache.org/docs/apache-airflow-providers-docker/stable/operators.html) from the Docker provider allows you to execute FastTransfer commands in a Docker container directly from your Airflow DAGs. ### Complete DAG Example[​](#complete-dag-example "Direct link to Complete DAG Example") Create a DAG file (e.g., `fasttransfer_orders_mssql_to_pg.py`) in your Airflow DAGs folder: ``` from datetime import datetime from airflow import DAG from airflow.sdk.bases.hook import BaseHook from airflow.providers.docker.operators.docker import DockerOperator def _conn_parts(conn_id: str): """ Extract connection details from Airflow connection. Works with: - ODBC connections (for MSSQL): database in Extra JSON {"database":"name"} - Postgres connections: database in Schema field Returns: tuple: (host, port, user, password, database) """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # Database in Extra {"database": "..."} (for ODBC MSSQL) or in Schema (for Postgres) db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': database not found. Add it to Extra JSON " f'{{"database":"..."}} (for ODBC) or Schema field (for Postgres).' ) return host, port, user, pwd, db with DAG( dag_id="fasttransfer_orders_mssql_to_pg", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fasttransfer", "mssql", "postgres", "docker"], ) as dag: # Extract connection details mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _conn_parts("mssql_tpch10") pg_host, pg_port, pg_user, pg_pwd, pg_db = _conn_parts("pg_target") # FastTransfer Docker task transfer_task = DockerOperator( task_id="transfer_orders", image="arpeio/fasttransfer:latest", docker_url="tcp://host.docker.internal:2375", api_version="auto", auto_remove="success", mount_tmp_dir=False, # Avoids the remote-engine tmp mount warning do_xcom_push=False, command=[ "--sourceconnectiontype", "mssql", "--sourceserver", f"{mssql_host},{mssql_port}", "--sourcedatabase", mssql_db, "--sourceuser", mssql_user, "--sourcepassword", mssql_pwd, "--sourceschema", "dbo", "--sourcetable", "orders", "--targetconnectiontype", "pgcopy", "--targetserver", f"{pg_host}:{pg_port}", "--targetdatabase", pg_db, "--targetuser", pg_user, "--targetpassword", pg_pwd, "--targetschema", "public", "--targettable", "orders", "--loadmode", "Truncate", "--mapmethod", "Name", "--parallelmethod", "Ntile", "--degree", "12", "--distributekeycolumn", "o_orderkey", "--nobanner", ], network_mode="bridge", ) ``` ### Key Parameters[​](#key-parameters "Direct link to Key Parameters") `image` Specifies the FastTransfer Docker image `docker_url` Docker daemon endpoint `command` List of FastTransfer CLI arguments `auto_remove` Automatically remove the container after successful execution `mount_tmp_dir` Set to `False` to avoid warnings with remote Docker daemons ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes a utility function to streamline connection management: `_conn_parts(conn_id)` Extracts connection details from an Airflow connection. This function: * Retrieves host, port, username, and password from the connection * Extracts the database name from either the Extra JSON field (for ODBC connections) or the Schema field (for Postgres connections) * Returns all components needed to build the FastTransfer connection parameters * Validates that all required fields are present This approach ensures that credentials are managed centrally in Airflow and never hardcoded in DAG files. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Airflow and can be viewed in the Airflow UI: 1. Open the task logs Airflow UI›DAGs 1. Navigate to **DAGs** in the Airflow UI 2. Click on your DAG (e.g., `fasttransfer_orders_mssql_to_pg`) 3. Click on the task execution (green/red square in the Grid view) 4. Click the **Logs** tab ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") The logs provide detailed information about: * FastTransfer version and configuration * Source and target connection details (with masked passwords) * Data transfer progress * Performance metrics (rows/second, total time) * Exit status Full log of the example DAG run ``` [2026-03-02 15:51:45] INFO - Running docker container: arpeio/fasttransfer:latest [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.288 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8415ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.330 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000000 : 2999997 rows x 9 columns in 8458ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.349 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8476ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.442 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8569ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1702771 rows/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15324949 cells/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8809 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9135 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load [2026-03-02 15:51:54] INFO - Task instance in success state [2026-03-02 15:51:54] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 15:51:54] INFO - Task operator: ``` ## Related pages[​](#related-pages "Direct link to Related pages") Related pages * [Docker](/1.0/integration/docker-integration.md)the FastTransfer image, its volumes and logging settings * [Kestra](/1.0/integration/kestra-integration.md)run the same image from a Kestra flow * [Parallel parameters](/1.0/documentation/cli/parallel_parameters.md)`--parallelmethod`, `--degree` and `--distributekeycolumn` --- # Docker Minimal, production-ready container image to run FastTransfer, a high-performance data transfer utility designed for data integration and automation workflows. ## Image Overview[​](#image-overview "Direct link to Image Overview") | Item | Value | | -------------- | ------------------------------------------------------------------------------------------- | | **Base image** | `debian:trixie-slim` | | **Entrypoint** | `/usr/local/bin/FastTransfer` | | **Updates** | Published automatically via GitHub Actions for each new release and weekly security updates | * [arpeio/fasttransfer on DockerHub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)the prebuilt image * [FastTransfer-Image on GitHub](https://github.com/arpe-io/FastTransfer-Image)repository of the image ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") 1. Docker 24+ (or Podman) A container engine to pull and run the image. 2. Valid FastTransfer license Request a trial license. * [Trial license](https://arpe.io/get-trial?product=FastTransfer) 3. FastTransfer\_Settings.jsonOptional For custom logging configuration. ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") ### Available Tags[​](#available-tags "Direct link to Available Tags") * Version-specific tagsAligned with FastTransfer releases (e.g., `v0.15.0`) * `latest` tagAlways points to the most recent FastTransfer version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * New releasesImages are automatically built when new FastTransfer versions are released * Security updatesThe latest version of each minor branch is automatically rebuilt weekly (every Monday) with the latest base image and security patches ### Pull and Run[​](#pull-and-run "Direct link to Pull and Run") * Pull the image * Basic commands ``` # Latest version docker pull arpeio/fasttransfer:latest # Specific version docker pull arpeio/fasttransfer:v0.15.0 ``` ``` # Get command line help docker run --rm arpeio/fasttransfer:latest -? # Check version docker run --rm arpeio/fasttransfer:latest --version ``` ## License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.14.0, pass the license content directly via `--license "…"`: ``` export licenseContent=$(cat ./FastTransfer.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fasttransfer:latest \ --license "$licenseContent" \ [other parameters...] ``` Best Practice Prefer `--env-file`, Docker/Compose/Kubernetes secrets, or managed identities for cloud credentials. Avoid leaving the license content in shell history. ## Examples[​](#examples "Direct link to Examples") * SQL Server → SQL Server * CSV files → SQL Server Parallel database-to-database transfer: ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ arpeio/fasttransfer:latest \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "dest_db" \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "Ntile" \ --distributekeycolumn "id" \ --loadmode "Truncate" \ --degree 8 \ --license "$licenseContent" ``` Import CSV files to SQL Server in parallel: ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ -v /local/data:/data \ arpeio/fasttransfer:latest \ --sourceconnectiontype "duckdbstream" \ --sourceserver ":memory:" \ --query "SELECT * FROM read_csv('/data/lineitem*.CSV')" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "tpch_test" \ --targetschema "dbo" \ --targettable "lineitem" \ --parallelmethod "Random" \ --distributekeycolumn "l_orderkey" \ --mapmethod "Name" \ --loadmode "Truncate" \ --degree 16 \ --license "$licenseContent" ``` ## Configuration[​](#configuration "Direct link to Configuration") ### Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` `/config`Read-only / Read-many User-provided configuration files (e.g., Serilog settings). Shared across multiple containers; not modified. `/data`Read-many / Write-many Input/output data directory for file-based operations. Stores imported or exported data files. `/work`Read-many / Write-many Temporary working directory (container WORKDIR). Used internally for temporary processing. `/logs`Read-many / Write-many Log output directory (per-run or aggregated logs). Stores runtime and execution logs. ### Configuring FastTransfer Logging[​](#configuring-fasttransfer-logging "Direct link to Configuring FastTransfer Logging") Available from version 0.14.0 FastTransfer supports custom logging configuration through an external Serilog settings file in JSON format. #### Example: Logging to Console, Airflow, and Dynamic Log Files[​](#example-logging-to-console-airflow-and-dynamic-log-files "Direct link to Example: Logging to Console, Airflow, and Dynamic Log Files") * ConsoleLogs to the console for real-time visibility * AirflowRun summary to `/airflow/xcom/return.json`, compatible with Airflow's XCom mechanism * Per-run filesJSON logs under `/logs`, named from the date, source database, file name, timestamp and trace ID FastTransfer\_Settings.json ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context", "Serilog.Formatting.Compact" ], "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console", "applyThemeToRedirectedOutput": false } }, { "Name": "File", "Args": { "path": "/airflow/xcom/return.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" } }, { "Name": "Map", "Args": { "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/log-{filename}-{LogTimestamp}-{TraceId}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8" } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` note * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastTransfer automatically creates it. * The file `/airflow/xcom/return.json` is designed to provide run summaries compatible with Airflow's XCom mechanism. #### Available Tokens for Path or Filename Formatting[​](#available-tokens-for-path-or-filename-formatting "Direct link to Available Tokens for Path or Filename Formatting") `{logdate}` Current date in yyyy-MM-dd format `{logtimestamp}` Full timestamp of the log entry `{sourcedatabase}` Name of the source database `{sourceschema}` Name of the source schema `{sourcetable}` Name of the source table `{filename}` Name of the file being processed `{runid}` Run identifier provided in the command line `{traceid}` Unique trace identifier generated at runtime #### Mounting a Custom Settings File[​](#mounting-a-custom-settings-file "Direct link to Mounting a Custom Settings File") ``` # First, copy your config file to a volume location cp ~/FastTransfer_Settings.json /volumes/fasttransfer-config/ # Then run FastTransfer with mounted volumes docker run --rm \ -v fasttransfer-config:/config \ -v fasttransfer-logs:/logs \ arpeio/fasttransfer:latest \ --settingsfile "/config/FastTransfer_Settings.json" \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "pgcopy" \ --targetserver "host.docker.internal:5432" \ --targetuser "PgUser" \ --targetpassword "PgPass" \ --targetdatabase "pg_db" \ --targetschema "dbo" \ --targettable "orders" \ --degree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --license "$licenseContent" ``` ## Related pages[​](#related-pages "Direct link to Related pages") Related pages * [Apache Airflow](/1.0/integration/airflow-integration.md)run the image from a DAG with the DockerOperator * [Kestra](/1.0/integration/kestra-integration.md)run the image from a Kestra flow * [Logging overview](/1.0/documentation/logging/Overview.md)logging settings and sinks --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastTransfer data migration workflows. FastTransfer can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: `arpeio/fasttransfer:latest`. * [arpeio/fasttransfer on DockerHub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)the prebuilt image * [Docker integration](/1.0/integration/docker-integration.md)tags, volumes and logging settings of the image ## Integration Methods[​](#integration-methods "Direct link to Integration Methods") Kestra offers two primary methods to orchestrate FastTransfer execution: Docker Run pluginRecommended * Task type`io.kestra.plugin.docker.Run` * Arguments`commands`, one FastTransfer CLI argument per item * Best forA direct way to execute FastTransfer commands in a Docker container Shell commands with Docker task runner * Task type`io.kestra.plugin.scripts.shell.Commands` * ArgumentsA shell command line calling `/usr/local/bin/FastTransfer` * Best forMore flexibility for complex workflows - Method 1: Docker Run plugin - Method 2: Shell commands The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastTransfer commands in a Docker container. ``` id: fasttransfer_docker_kestra_v2 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - FastLogin - --sourcepassword - FastPassword - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - postgres - --targetpassword - postgres - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --parallelmethod - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` Alternatively, you can use the [`io.kestra.plugin.scripts.shell.Commands`](https://kestra.io/plugins/plugin-script-shell/io.kestra.plugin.scripts.shell.commands) plugin with a Docker task runner: ``` id: fasttransfer_docker_kestra namespace: arpe.io tasks: - id: shell type: io.kestra.plugin.scripts.shell.Commands containerImage: arpeio/fasttransfer:latest taskRunner: type: io.kestra.plugin.scripts.runner.docker.Docker host: "tcp://host.docker.internal:2375" commands: - >- /usr/local/bin/FastTransfer --sourceconnectiontype mssql --sourceserver "192.168.65.254,11433" --sourcedatabase "tpch10" --sourceuser "FastLogin" --sourcepassword "FastPassword" --sourceschema "dbo" --sourcetable "orders" --targetconnectiontype pgcopy --targetserver "192.168.65.254:25433" --targetdatabase "postgres" --targetuser "postgres" --targetpassword "postgres" --targetschema "public" --targettable "orders" --loadmode Truncate --mapmethod Name --parallelmethod Ntile --degree 12 --distributekeycolumn "o_orderkey" --nobanner ``` This method allows you to execute shell commands within the FastTransfer Docker container, providing more flexibility for complex workflows. ### Key Parameters[​](#key-parameters "Direct link to Key Parameters") `containerImage` Specifies the FastTransfer Docker image `commands` Array of FastTransfer CLI arguments ## Securing Sensitive Data with Kestra Secrets[​](#securing-sensitive-data-with-kestra-secrets "Direct link to Securing Sensitive Data with Kestra Secrets") To protect sensitive information like passwords and connection strings, Kestra provides a built-in [secrets management](https://kestra.io/docs/concepts/secret) feature. You can store credentials securely and reference them in your flows using the `{{ secret('SECRET_NAME') }}` syntax. ### Creating Secrets in Kestra[​](#creating-secrets-in-kestra "Direct link to Creating Secrets in Kestra") 1. Add the FastTransfer secrets Kestra UI›Tenant›Secrets 1. Navigate to the Kestra UI 2. Go to **Tenant** → **Secrets** 3. Add your secrets with appropriate keys: * `FASTTRANSFER_MSSQL_USER` * `FASTTRANSFER_MSSQL_PASSWORD` * `FASTTRANSFER_PG_USER` * `FASTTRANSFER_PG_PASSWORD` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fasttransfer_docker_kestra_v3 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - "{{ secret('FASTTRANSFER_MSSQL_USER') }}" - --sourcepassword - "{{ secret('FASTTRANSFER_MSSQL_PASSWORD') }}" - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - "{{ secret('FASTTRANSFER_PG_USER') }}" - --targetpassword - "{{ secret('FASTTRANSFER_PG_PASSWORD') }}" - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --parallelmethod - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` This approach ensures that sensitive credentials are never exposed in your flow definitions and can be managed centrally. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Kestra and can be viewed directly in the Kestra UI: 1. Open the execution logs Kestra UI›Executions 1. Navigate to the Kestra UI 2. Go to **Executions** 3. Select your flow execution 4. Click on the **Logs** tab ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") The logs provide detailed information about the transfer process: * Configuration parameters * Connection details * Data transfer progress * Performance metrics Full log of the example flow execution ``` 2026-03-02 15:51:45.3752026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False 2026-03-02 15:51:45.3792026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit 2026-03-02 15:51:45.6342026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) 2026-03-02 15:51:45.8702026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms 2026-03-02 15:51:45.8722026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8842026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8912026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9002026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9112026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:54.2332026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms 2026-03-02 15:51:54.2382026-03-02T15:51:54.238 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8365ms 2026-03-02 15:51:54.2412026-03-02T15:51:54.241 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8368ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000004 : 3000001 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1766084 rows/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15894756 cells/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8494 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9142 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load 2026-03-02 15:51:54.448Command succeed with exit code 0 2026-03-02 15:51:54.450Container deleted: ca0de79e3eb4ede961668cb5080e4c20f858960c118d10731b8e0ade3ad87685 2026-03-02 15:51:54.455Volume deleted: a6b822d7677064a91d2dd555c360dc61ec49e3954149eacd5c22549c2a300850 ``` ## Related pages[​](#related-pages "Direct link to Related pages") Related pages * [Docker](/1.0/integration/docker-integration.md)the FastTransfer image, its volumes and logging settings * [Apache Airflow](/1.0/integration/airflow-integration.md)run the same image from an Airflow DAG * [Parallel parameters](/1.0/documentation/cli/parallel_parameters.md)`--parallelmethod`, `--degree` and `--distributekeycolumn` --- # PostgreSQL The **pg\_fasttransfer** extension allows you to run the FastTransfer tool directly from an SQL function, enabling fast data transfer between databases directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") | Item | Value | | ------------------ | ---------------------------------------------------------------------- | | **Repository** | [arpe-io/pg\_fasttransfer](https://github.com/arpe-io/pg_fasttransfer) | | **License** | MIT | | **Latest version** | v0.16.0 | | **Platforms** | Linux (Debian/Ubuntu) and Windows | ![pg\_fasttransfer Demo](/assets/images/pg_fasttransfer-830298c99dd0228e80b5337126bb0c7c.gif) ## Features[​](#features "Direct link to Features") * Native PostgreSQL IntegrationExecute FastTransfer commands directly from SQL * Secure Password ManagementBuilt-in encryption for sensitive credentials * Detailed Result ReturnGet transfer statistics and performance metrics as SQL results * Cross-PlatformAvailable for both Linux and Windows environments * Flexible ConfigurationSupport for all FastTransfer parameters ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") 1. PostgreSQL 15, 16, 17, or 18 See [Compatibility](#compatibility) for the versions supported on each platform. ![](/img/logos/postgresql.svg) 2. Sudo/Administrator privileges Required to install the extension. 3. Valid FastTransfer license Request a trial license. * [Trial license](https://arpe.io/get-trial?product=FastTransfer) 4. FastTransfer binaries FastTransfer binaries installed on the system. Important The PostgreSQL server process usually runs under the `postgres` user account. You must ensure that this user has the appropriate permissions to execute the `FastTransfer` binary and read the license file. ## Compatibility[​](#compatibility "Direct link to Compatibility") | PostgreSQL Version | Windows | Linux (Debian/Ubuntu 22.04 LTS) | | ------------------ | ------------- | ------------------------------- | | PostgreSQL 18 | Supported | Supported | | PostgreSQL 17 | Supported | Supported | | PostgreSQL 16 | Supported | Supported | | PostgreSQL 15 | Not supported | Supported | Good to know Other distributions or PostgreSQL versions may work but have not been officially tested. ## Installation[​](#installation "Direct link to Installation") Download the appropriate release for your PostgreSQL version and operating system from the [pg\_fasttransfer releases page](https://github.com/arpe-io/pg_fasttransfer/releases). * Linux * Windows ### Automated installation (Linux)[​](#automated-installation-linux "Direct link to Automated installation (Linux)") The easiest way to install the extension on Linux is by using the `install-linux.sh` script included in the archive. 1. Extract the contents of the archive into a folder. This folder should contain `pg_fasttransfer.so`, `pg_fasttransfer.control`, `pg_fasttransfer--1.0.sql` and `install-linux.sh`. 2. Make the script executable: ``` chmod +x install-linux.sh ``` 3. Run the script with administrator privileges: ``` sudo ./install-linux.sh ``` The script will automatically detect your PostgreSQL installation and copy the files to the correct locations. Manual installation If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service: ``` sudo systemctl stop postgresql ``` 2. Locate your PostgreSQL installation directory, typically: `/usr/lib/postgresql/` 3. Copy the files into the appropriate directories: ``` sudo cp pg_fasttransfer.so /usr/lib/postgresql//lib/ sudo cp pg_fasttransfer.control pg_fasttransfer--1.0.sql /usr/share/postgresql//extension/ ``` 4. Restart your PostgreSQL service: ``` sudo systemctl start postgresql ``` ### Permissions setup (Linux)[​](#permissions-setup-linux "Direct link to Permissions setup (Linux)") Ensure the `postgres` user has proper permissions: ``` # Grant execute permission on the FastTransfer binary sudo chmod +x /path/to/FastTransfer sudo chown postgres:postgres /path/to/FastTransfer sudo chmod 750 /path/to/FastTransfer # Grant read permission on the license file sudo chown postgres:postgres /path/to/license.lic sudo chmod 640 /path/to/license.lic ``` ### Automated installation (Windows)[​](#automated-installation-windows "Direct link to Automated installation (Windows)") 1. Extract the contents of the ZIP file into a folder. This folder should contain `pg_fasttransfer.dll`, `pg_fasttransfer.control`, `pg_fasttransfer--1.0.sql` and `install-win.bat`. 2. Right-click on the `install-win.bat` file and select "Run as administrator" 3. The script will automatically detect your PostgreSQL installation and copy the files to the correct locations Manual installation If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service 2. Locate your PostgreSQL installation folder, typically: ``` C:\Program Files\PostgreSQL\ ``` 3. Copy the `pg_fasttransfer.dll` file into the `lib` folder 4. Copy the `pg_fasttransfer.control` and `pg_fasttransfer--1.0.sql` files into the `share\extension` folder 5. Restart your PostgreSQL service ### Permissions setup (Windows)[​](#permissions-setup-windows "Direct link to Permissions setup (Windows)") Make sure that the PostgreSQL service account (by default `NT AUTHORITY\NetworkService` or `postgres`) has: * Execute permission on the `FastTransfer.exe` binary * Read permission on the `.lic` file ## SQL Setup[​](#sql-setup "Direct link to SQL Setup") After the files are in place, you need to set up the extension in your database. ### Drop existing extension (if any)[​](#drop-existing-extension-if-any "Direct link to Drop existing extension (if any)") ``` DROP EXTENSION IF EXISTS pg_fasttransfer CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fasttransfer CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fasttransfer\_encrypt[​](#pg_fasttransfer_encrypt "Direct link to pg_fasttransfer_encrypt") This function encrypts a given text string using `pgp_sym_encrypt` and encodes the result in base64. It is useful for storing sensitive information, such as passwords, in a secure manner within your SQL scripts. The `xp_RunFastTransfer_secure` function will automatically decrypt any values passed to its `--sourcepassword` and `--targetpassword` arguments. **Syntax:** ``` pg_fasttransfer_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fasttransfer_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastTransfer\_secure[​](#xp_runfasttransfer_secure "Direct link to xp_RunFastTransfer_secure") This is the main function to execute the FastTransfer tool. It takes various parameters to configure the data transfer operation. Password arguments (`sourcepassword`, `targetpassword`) will be automatically decrypted. Syntax: all parameters and the returned table ``` xp_RunFastTransfer_secure( sourceconnectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, sourcedsn text DEFAULT NULL, sourceprovider text DEFAULT NULL, sourceserver text DEFAULT NULL, sourceuser text DEFAULT NULL, sourcepassword text DEFAULT NULL, sourcetrusted boolean DEFAULT FALSE, sourcedatabase text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, query text DEFAULT NULL, fileinput text DEFAULT NULL, targetconnectiontype text DEFAULT NULL, targetconnectstring text DEFAULT NULL, targetserver text DEFAULT NULL, targetuser text DEFAULT NULL, targetpassword text DEFAULT NULL, targettrusted boolean DEFAULT FALSE, targetdatabase text DEFAULT NULL, targetschema text DEFAULT NULL, targettable text DEFAULT NULL, degree integer DEFAULT NULL, method text DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, loadmode text DEFAULT NULL, batchsize integer DEFAULT NULL, useworktables boolean DEFAULT FALSE, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, mapmethod text DEFAULT NULL, license text DEFAULT NULL, loglevel text DEFAULT NULL, nobanner boolean DEFAULT NULL, fasttransfer_path text DEFAULT NULL, debug boolean DEFAULT FALSE ) RETURNS TABLE ( exit_code integer, output text, error_message text, total_rows bigint, total_columns integer, transfer_time_ms bigint, total_time_ms bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") * Linux: PostgreSQL → SQL Server * Windows: SQL Server → PostgreSQL Transfer data from PostgreSQL to SQL Server using the extension: ``` SELECT * FROM xp_RunFastTransfer_secure( targetconnectiontype := 'msbulk', sourceconnectiontype := 'pgsql', sourceserver := 'localhost:5432', sourceuser := 'postgres', sourcepassword := pg_fasttransfer_encrypt('MyActualPassword'), sourcedatabase := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', targetserver := 'localhost,1433', targetuser := 'migadmin', targetpassword := pg_fasttransfer_encrypt('AnotherSecurePassword'), targetdatabase := 'target_db', targetschema := 'tpch_1', targettable := 'orders', loadmode := 'Truncate', license := '/tmp/FastTransfer_linux-x64_v0.15.0/FastTransfer.lic', loglevel := 'information', nobanner := false, fasttransfer_path := '/tmp/FastTransfer_linux-x64_v0.15.0', debug := true ); ``` Transfer data from SQL Server to PostgreSQL: ``` SELECT * FROM xp_RunFastTransfer_secure( sourceconnectiontype := 'mssql', sourceserver := 'localhost', sourcepassword := pg_fasttransfer_encrypt('MyWindowsPassword'), sourceuser := 'FastLogin', sourcedatabase := 'tpch10', sourceschema := 'dbo', sourcetable := 'orders', targetconnectiontype := 'pgcopy', targetserver := 'localhost:15433', targetuser := 'postgres', targetpassword := pg_fasttransfer_encrypt('MyPostgresPassword'), targetdatabase := 'postgres', targetschema := 'public', targettable := 'orders', method := 'Ntile', degree := 12, distributekeycolumn := 'o_orderkey', loadmode := 'Truncate', batchsize := 1048576, mapmethod := 'Position', loglevel := 'information', nobanner := true, fasttransfer_path := 'D:\sources\FastTransfer', debug := true ); ``` ## Function Return Structure[​](#function-return-structure "Direct link to Function Return Structure") The function returns a table with the following columns: `exit_code`integer The exit code of the FastTransfer process. `output`text The full log output from FastTransfer (if debug is TRUE). `error_message`text Only the lines containing ERROR from the output. `total_rows`bigint The total number of rows transferred. `total_columns`integer The total number of columns transferred. `transfer_time_ms`bigint Transfer time in milliseconds. `total_time_ms`bigint Total execution time in milliseconds. ## Debug Parameter[​](#debug-parameter "Direct link to Debug Parameter") The `debug` parameter is a boolean flag that controls whether the full FastTransfer output is returned in the `output` column: debug := true * outputContains the entire log from FastTransfer * error\_messageAny error lines debug := falseDefault * outputAn empty string * error\_messageStill contains any error lines ## Resources[​](#resources "Direct link to Resources") Resources * [pg\_​fasttransfer GitHub Repository](https://github.com/arpe-io/pg_fasttransfer) * [pg\_​fasttransfer releases](https://github.com/arpe-io/pg_fasttransfer/releases)download the extension * [FastTransfer Documentation](https://fasttransfer.arpe.io/) * [Get a Trial License](https://arpe.io/get-trial?product=FastTransfer) * [Report Issues](https://github.com/arpe-io/pg_fasttransfer/issues) --- # SQL Server The **FastWrappers-TSQL** project wraps FastTransfer (and FastBCP) in a CLR Assembly, allowing you to call them directly from T-SQL using extended stored procedures. This enables seamless data transfer operations without leaving your SQL Server environment. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") | Item | Value | | ------------------ | ------------------------------------------------------------------------- | | **Repository** | [aetperf/FastWrappers-TSQL](https://github.com/aetperf/FastWrappers-TSQL) | | **Latest version** | v0.7.0 | | **Platforms** | Windows and Linux | | **Compatibility** | SQL Server 2016+ | info This wrapper includes both **FastTransfer** (for database-to-database transfers and file imports) and **FastBCP** (for database-to-file exports). This documentation focuses on the FastTransfer functionality. ## Features[​](#features "Direct link to Features") * Native SQL Server IntegrationExecute FastTransfer commands directly from T-SQL * Secure Password ManagementBuilt-in AES-256 encryption for sensitive credentials * CLR Assembly IntegrationRuns as extended stored procedures * Detailed Result ReturnGet transfer statistics and performance metrics as SQL results * Flexible ConfigurationSupport for all FastTransfer parameters and connection types * Role-Based SecurityPredefined database roles for access control ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") 1. SQL Server 2016 or later With CLR integration enabled. ![](/img/logos/sqlserver.svg) 2. FastTransfer binaries Valid FastTransfer binaries. 3. Valid FastTransfer license Request a trial license. * [Trial license](https://arpe.io/get-trial?product=FastTransfer) 4. Administrator privileges For the initial setup. Important The SQL Server service account must have read/execute permissions on the FastTransfer directory and binaries. ## Installation[​](#installation "Direct link to Installation") Download the latest release from the [Releases page](https://github.com/aetperf/FastWrappers-TSQL/releases). Choose the installation method based on your SQL Server version: ### Recommended Installation Methods[​](#recommended-installation-methods "Direct link to Recommended Installation Methods") FastWrappers-TSQL.bakSQL Server 2019+ * FormatSQL Server Backup file * InstallRestore using SSMS * After installRequires manual CLR activation and trusted assembly configuration after restore * Download[FastWrappers-TSQL.bak](https://github.com/aetperf/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.bak) FastWrappers-TSQL.sqlSQL Server 2016+ * FormatPure SQL Script * InstallExecute using sqlcmd or SSMS * After installNothing: complete installation in a single script * Download[FastWrappers-TSQL.sql](https://github.com/aetpefl/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.sql) ### Post-Installation Configuration[​](#post-installation-configuration "Direct link to Post-Installation Configuration") info This section only applies to the **.bak** installation method. The **.sql** script includes all necessary configuration steps automatically. After restoring the database, you **must** configure CLR integration. Two options are available: * Trusted Assembly (Recommended) * TRUSTWORTHY ON (Dev/Test) This approach is **more secure** as it keeps TRUSTWORTHY OFF and doesn't require changing the database owner: ``` -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Extract the assembly hash and add it to trusted assemblies DECLARE @hash VARBINARY(64); SELECT @hash = HASHBYTES('SHA2_512', content) FROM sys.assembly_files WHERE assembly_id = ( SELECT assembly_id FROM sys.assemblies WHERE name = 'FastWrappers_TSQL' ); EXEC sys.sp_add_trusted_assembly @hash = @hash, @description = N'FastWrappers_TSQL Assembly v0.7.0'; GO ``` **Advantages:** * TRUSTWORTHY remains OFF (more secure) * No need to change database owner * Only this specific assembly is trusted tip The assembly hash changes with each version. When upgrading, remove the old hash first: ``` EXEC sys.sp_drop_trusted_assembly @hash = ; ``` This approach is simpler but **less secure**. Use only for development/testing environments: ``` -- Enable TRUSTWORTHY for signed UNSAFE assemblies ALTER DATABASE [FastWrappers-TSQL] SET TRUSTWORTHY ON; GO -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Set database owner to 'sa' (required for signed UNSAFE assemblies) EXEC sp_changedbowner 'sa'; GO ``` Critical The `sp_changedbowner 'sa'` command is **required**. Without it, you will encounter error 0x80FC80F1 when executing stored procedures. ## Security Roles[​](#security-roles "Direct link to Security Roles") ### FastTransfer\_Executor[​](#fasttransfer_executor "Direct link to FastTransfer_Executor") The FastWrappers-TSQL database includes a predefined database role that grants `EXECUTE` permission on the **xp\_RunFastTransfer\_secure** stored procedure. ``` -- Add a user to the role ALTER ROLE [FastTransfer_Executor] ADD MEMBER [YourUserName]; GO ``` tip Users also need access to the **dbo.EncryptString** function to generate encrypted passwords: ``` GRANT EXECUTE ON dbo.EncryptString TO [YourUserName]; GO ``` ## Available Functions[​](#available-functions "Direct link to Available Functions") ### dbo.EncryptString - Password Encryption[​](#dboencryptstring---password-encryption "Direct link to dbo.EncryptString - Password Encryption") Encrypts passwords using AES-256 encryption for secure storage and transmission. ``` SELECT dbo.EncryptString('YourPassword') ``` **Returns:** Base64-encoded encrypted string **Example:** ``` SELECT dbo.EncryptString('MySecretPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== ``` ### dbo.xp\_RunFastTransfer\_secure - Data Transfer[​](#dboxp_runfasttransfer_secure---data-transfer "Direct link to dbo.xp_RunFastTransfer_secure - Data Transfer") Wraps the FastTransfer CLI to transfer data between databases with streaming and parallel processing. **Example:** ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'D:\FastTransfer\', @sourceConnectionType = 'mssql', @sourceServer = 'localhost,11433', @sourceUser = 'FastLogin', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = 'tpch10', @sourceSchema = 'dbo', @sourceTable = 'orders', @targetConnectionType = 'pgcopy', @targetServer = 'localhost:25433', @targetUser = 'postgres', @targetPasswordSecure = 'RAAFe/XJ7O0P1I5T0rJhjQ==', @targetDatabase = 'postgres', @targetSchema = 'public', @targetTable = 'orders', @loadmode = 'Truncate', @method = 'Ntile', @distributeKeyColumn = 'o_orderkey', @degree = 12, @mapmethod = 'Name', @debug = 1, @noBanner = 0, @useWorkTables = 0, @loglevel = 'debug' ``` ## Output and Logging[​](#output-and-logging "Direct link to Output and Logging") ### Transfer Metrics[​](#transfer-metrics "Direct link to Transfer Metrics") The **xp\_RunFastTransfer\_secure** stored procedure returns a structured result set: `targetdatabase`nvarchar(128) Target database name `targetSchema`nvarchar(128) Target schema name `targetTable`nvarchar(128) Target table name `TotalRows`bigint Number of rows transferred `TotalColumns`int Number of columns transferred `TotalCells`bigint Total cells transferred (rows × columns) `TotalTimeMs`bigint Total execution time in milliseconds `Status`int Exit code (0 = success, non-zero = error) `StdErr`nvarchar(max) Error message if Status ≠ 0 **Example output:** ``` targetdatabase targetSchema targetTable TotalRows TotalColumns TotalCells TotalTimeMs Status postgres public orders 15000000 9 135000000 27502 0 ``` ### Debug Mode[​](#debug-mode "Direct link to Debug Mode") Set `@debug = 1` to output additional information: * Complete command line being executed (passwords masked) * Full console output from FastTransfer * Real-time progress updates * Performance metrics ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest', -- ... other parameters ... @debug = 1 -- Enable verbose logging ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") * SQL Server → SQL Server * Oracle → SQL Server * PostgreSQL → SQL Server Transfer a table between two SQL Server instances using parallel processing (12 threads): ``` -- First, encrypt your password SELECT dbo.EncryptString('YourPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== -- Then execute the transfer EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = N'mssql', @sourceServer = N'localhost', @sourceUser = N'FastUser', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = N'tpch_test', @sourceSchema = N'dbo', @sourceTable = N'orders', @targetConnectionType = N'msbulk', @targetServer = N'localhost\SS2025', @targetUser = N'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = N'tpch_test', @targetSchema = N'dbo', @targetTable = N'orders_copy', @loadMode = N'Truncate', @batchSize = 130000, @method = N'RangeId', @distributeKeyColumn = N'o_orderkey', @degree = 12, @mapmethod = 'Name', @runId = N'SQL_to_SQL_Parallel_Transfer'; ``` Transfer data from Oracle to SQL Server with parallel RangeId method (12 threads): ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'oraodp', @sourceServer = 'oracle-server:1521/ORCL', @sourceUser = 'oracle_user', @sourcePasswordSecure = '', @sourceSchema = 'SALES', @sourceTable = 'ORDERS', @targetConnectionType = 'msbulk', @targetServer = 'localhost\SS2025', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'tpch_test', @targetSchema = 'dbo', @targetTable = 'orders_from_oracle', @loadMode = 'Truncate', @batchSize = 130000, @method = 'RangeId', @distributeKeyColumn = 'order_id', @degree = 12, @mapmethod = 'Name', @runId = 'Oracle_to_SQL_Transfer'; ``` Use PostgreSQL's native Ctid method for optimal performance (8 threads): ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'pgcopy', @sourceServer = 'postgres-server:5432', @sourceUser = 'postgres', @sourcePasswordSecure = '', @sourceDatabase = 'sales_db', @sourceSchema = 'public', @sourceTable = 'customers', @targetConnectionType = 'msbulk', @targetServer = 'localhost', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'crm', @targetSchema = 'dbo', @targetTable = 'customers', @loadMode = 'Append', @batchSize = 100000, @method = 'Ctid', @degree = 8, @mapmethod = 'Name', @runId = 'PG_to_SQL_Ctid'; ``` ## Resources[​](#resources "Direct link to Resources") Resources * [FastTransfer Documentation](/1.0/.md) * [GitHub Repository](https://github.com/aetperf/FastWrappers-TSQL) * [FastWrappers-TSQL issues](https://github.com/aetperf/FastWrappers-TSQL/issues)report an issue with the wrapper * [Contact ARPE Support](https://arpe.io/contact)questions about FastTransfer --- # Release Notes 0.16 ## New Parameters[​](#new-parameters "Direct link to New Parameters") * Added the `--version` to display the version ## Other[​](#other "Direct link to Other") * Improve logging * Bump dependencies # Fixes * Sap HANA fix drivers inclusion for Linux See [Advanced Parameters](/1.0/documentation/cli/advanced_parameters.md) for complete details. ### Notes[​](#notes "Direct link to Notes") * v0.16.2 is the final release supporting .NET 7. ⚠️ Future versions will drop .NET 7 support, which may reduce operating system compatibility. --- # Release Notes 0.17 ## .NET Runtime Updates[​](#net-runtime-updates "Direct link to .NET Runtime Updates") * **Removed .NET 7 support** - FastTransfer no longer supports .NET 7 runtime * **Upgraded to .NET 10.0** - Migrated from .NET 8.0 to .NET 10.0 for improved performance and security ## New Features[​](#new-features "Direct link to New Features") ### Environment Variables[​](#environment-variables "Direct link to Environment Variables") FastTransfer 0.17 introduces support for environment variables to configure runtime behavior: #### FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES[​](#fasttransfer_loadsteptimeout_minutes "Direct link to FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES") Controls the bulk load timeout for `msbulk` and `orabulk` target connection types. * **Default**: 60 minutes * **Usage**: Set this variable to override the default timeout (in minutes) * **Example**: ``` # Windows set FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Linux export FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 ``` #### FASTTRANSFER\_SORTEDINPUT[​](#fasttransfer_sortedinput "Direct link to FASTTRANSFER_SORTEDINPUT") Forces the sorted hint for `msbulk` target connections, which can improve performance when data is already sorted by the clustered index. * **Values**: `true` or `false` * **Default**: `false` * **Usage**: Set to `true` to force sorted input mode, or `false` to disable it * **Example**: ``` # Windows set FASTTRANSFER_SORTEDINPUT=true # Linux export FASTTRANSFER_SORTEDINPUT=true ``` See [Environment Variables](/1.0/documentation/environment-variables/overview.md) for complete details. ## Other Improvements[​](#other-improvements "Direct link to Other Improvements") --- # Release Notes 0.18 ## 0.18.1 - Security Update[​](#0181---security-update "Direct link to 0.18.1 - Security Update") FastTransfer 0.18.1 is a maintenance release. It fixes two .NET vulnerabilities in a bundled dependency and includes a consistency fix for the `Ctid` method. **Upgrading is recommended for all 0.18.0 users.** ### Security Fixes[​](#security-fixes "Direct link to Security Fixes") FastTransfer 0.18.0 and earlier bundle `System.Security.Cryptography.Pkcs` 9.0.13, a transitive dependency of the SQL Server and Oracle drivers. This version is affected by two vulnerabilities disclosed by Microsoft on **October 13, 2026**: | CVE | Severity | Issue | Platforms | | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------------------- | | [CVE-2026-84008](https://www.cve.org/CVERecord?id=CVE-2026-84008) ([GHSA-846f-f764-76mx](https://github.com/advisories/GHSA-846f-f764-76mx)) | High (CVSS 7.5) | Denial of service: `SignedCms.CheckSignature` can repeatedly reparse attacker-controlled X.509 data, causing CPU exhaustion | Windows, Linux, macOS | | [CVE-2026-70162](https://www.cve.org/CVERecord?id=CVE-2026-70162) ([GHSA-2fmv-rv2c-59x7](https://github.com/advisories/GHSA-2fmv-rv2c-59x7)) | Moderate (CVSS 5.9) | Denial of service: `EnvelopedCms.Decode` can perform quadratic work on attacker-supplied CMS / PKCS#7 data, causing CPU exhaustion | Windows | FastTransfer 0.18.1 ships the patched version, `System.Security.Cryptography.Pkcs` **10.0.13**. **Who is affected?** All FastTransfer versions up to and including 0.18.0 contain the vulnerable library. The actual exposure is low: * Both vulnerabilities only affect **availability** (high CPU usage). They cannot leak or modify your data. * FastTransfer itself does not call the vulnerable APIs, and neither do the bundled drivers in a standard transfer (SQL Server, PostgreSQL, Oracle, MySQL, etc.). The license check does not use this library. * The only related code path is SQL Server **Always Encrypted with secure enclaves (VBS/HGS attestation)**. In that case, the SQL Server driver decodes signed data returned by the attestation service. It does not call the vulnerable `CheckSignature` method. Vulnerability scanners (Dependabot, NuGet audit, binary scanners) flag the vulnerable version whatever the code path, so upgrading is still required for compliance. **How to fix it?** Replace the FastTransfer binary with version 0.18.1. FastTransfer is a self-contained executable that embeds its own .NET runtime and libraries: updating the .NET runtime installed on the server does **not** fix it. ### Dependency Updates[​](#dependency-updates "Direct link to Dependency Updates") | Package | 0.18.0 | 0.18.1 | | ---------------------------------------------------------------------- | --------- | --------- | | System.Security.Cryptography.Pkcs | 9.0.13 | 10.0.13 | | Microsoft.Data.SqlClient | 7.0.1 | 7.1.1 | | Oracle.ManagedDataAccess.Core | 23.26.200 | 23.26.301 | | Npgsql | 10.0.2 | 10.0.3 | | MySqlConnector | 2.5.0 | 2.6.2 | | DuckDB.NET.Data.Full | 1.5.2 | 1.5.6.1 | | Teradata.Client.Provider | 20.0.9 | 20.0.10 | | Microsoft.Extensions.Configuration / Logging, System.Data.Odbc / OleDb | 10.0.8 | 10.0.13 | | Serilog | 4.3.1 | 4.4.0 | The .NET runtime embedded in the binary is 10.0.13, which includes the October 2026 .NET security fixes. ### Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **`Ctid` method, `pgcopy` source and `pgcopy` target**: every chunk now reads from the same snapshot (`REPEATABLE READ` with an exported snapshot). Before, these chunks each used their own `READ COMMITTED` snapshot, so a `Ctid` transfer of a table being written to could be inconsistent across chunks. Queries containing the word `COPY` (for example a table named `COPYTABLE`) are no longer truncated. *** *The sections below describe the changes introduced in 0.18.0.* ## New Parallel Methods[​](#new-parallel-methods "Direct link to New Parallel Methods") ### DBPartition[​](#dbpartition "Direct link to DBPartition") `DBPartition` uses the native partitions of the source table: each partition is transferred in its own stream, biggest partitions first. No distribute key column is needed. * **Sources**: SQL Server (`mssql`, `msoledbsql`), PostgreSQL (`pgsql`, `pgcopy`), Oracle (`oraodp`), MySQL (`mysql`), Teradata (`teradata`, row partitioning only) * **Requires**: `--sourceschema` and `--sourcetable` (`--query` is not allowed) * **Fallback**: if the table is not partitioned, FastTransfer logs a warning and transfers it with `None` ``` ./FastTransfer \ --sourceconnectiontype "mssql" --sourceserver "localhost" --sourcedatabase "tpch" --sourcetrusted \ --sourceschema "dbo" --sourcetable "lineitem_part" \ --targetconnectiontype "pgcopy" --targetserver "localhost:5432" --targetdatabase "tpch" \ --targetuser "postgres" --targetpassword "mypassword" \ --targetschema "public" --targettable "lineitem" \ --parallelmethod "DBPartition" --degree 8 --loadmode "Truncate" ``` See [Parallel Parameters - DBPartition](/1.0/documentation/cli/parallel_parameters.md#dbpartition). ### Timepartition[​](#timepartition "Direct link to Timepartition") `Timepartition` splits the data on the time parts of a date column: one stream per year, month, day or ISO week, biggest first. `--distributekeycolumn` is a tuple: | Tuple | One stream per | | ------------------------------ | -------------- | | `(date_column,year)` | Year | | `(date_column,year,month)` | Month | | `(date_column,year,month,day)` | Day | | `(date_column,year,week)` | ISO week | * Works with a source table or a `--query` * Rows with a NULL date are transferred in a dedicated stream ``` ./FastTransfer \ --sourceconnectiontype "mssql" --sourceserver "localhost" --sourcedatabase "tpch" --sourcetrusted \ --query "SELECT * FROM dbo.lineitem WHERE l_shipmode = 'AIR'" \ --targetconnectiontype "pgcopy" --targetserver "localhost:5432" --targetdatabase "tpch" \ --targetuser "postgres" --targetpassword "mypassword" \ --targetschema "public" --targettable "lineitem_air" \ --parallelmethod "Timepartition" --distributekeycolumn "(l_shipdate,year,month)" --degree 8 ``` See [Parallel Parameters - Timepartition](/1.0/documentation/cli/parallel_parameters.md#timepartition). ### New Environment Variable: FASTTRANSFER\_DATEFORMAT[​](#new-environment-variable-fasttransfer_dateformat "Direct link to New Environment Variable: FASTTRANSFER_DATEFORMAT") Sets the format of the date bounds sent by the `Timepartition` method: `yyyy-MM-dd` (default) or `yyyyMMdd`. ``` # Windows (PowerShell) $env:FASTTRANSFER_DATEFORMAT = "yyyyMMdd" # Linux export FASTTRANSFER_DATEFORMAT=yyyyMMdd ``` See [FASTTRANSFER\_DATEFORMAT](/1.0/documentation/environment-variables/dateformat.md). ## Bug Fixes[​](#bug-fixes-1 "Direct link to Bug Fixes") * **`msbulk` target, partitioned table with a rowstore clustered index**: `DataDriven` (and the new `DBPartition` / `Timepartition` methods) no longer fail with *"Cannot bulk load. The bulk data stream was incorrectly specified as sorted"*. The sorted hint is now only sent to heap and columnstore targets, or when [FASTTRANSFER\_SORTEDINPUT](/1.0/documentation/environment-variables/sortedinput.md) is `true`. See [SQL Server target and sorted hint](/1.0/documentation/cli/parallel_parameters.md#sql-server-target-and-sorted-hint). * **`pgcopy` target, NULL values**: NULL values coming from a non-PostgreSQL source are now loaded as NULL. Before, NULL dates (and other non-text types) failed the load with *"invalid input syntax"*, and NULL text values were loaded as empty strings. ## Wizard[​](#wizard "Direct link to Wizard") The [Command Wizard](/1.0/wizard.md) now offers the `DBPartition` and `Timepartition` methods. --- # Release Notes 1.0 FastTransfer 1.0 is the first major release. It brings a new data path, **ADBC with the Arpe.io drivers bundled in the binary**, which moves data as Arrow columns from end to end. This release also adds **Db2** as a source and a target, and makes the parallel methods simpler to choose. 6 Arpe.io ADBC drivers Bundled, nothing to install 2x Faster cross-database Oracle → PostgreSQL, 6M rows 14x Faster into Oracle Oracle → Oracle, 6M rows 3.7x Faster SQL Server split Physical method, clustered table ## Highlights[​](#highlights "Direct link to Highlights") * **ADBC connections:** six new connection types for SQL Server, PostgreSQL, Oracle, Db2, Teradata and Netezza, as source and target. * **Up to 2x faster** than the native connection types on cross-database transfers, and much more on Oracle targets. * **Db2 for LUW** is now supported, as a source and as a target. * **`Physical`, one parallel method for all physical splits:** FastTransfer picks Ctid, Rowid, Physloc or data slices for you. * **Faster SQL Server physical split:** up to 3.7x faster on clustered tables. ## ADBC Connections[​](#adbc-connections "Direct link to ADBC Connections") The `adbc_*` connection types use the Arpe.io ADBC drivers, shipped inside FastTransfer: there is nothing else to install or configure. | Connection Type | Database | | --------------- | ----------------- | | `adbc_mssql` | SQL Server | | `adbc_pgsql` | PostgreSQL | | `adbc_oracle` | Oracle | | `adbc_db2` | Db2 for LUW (new) | | `adbc_teradata` | Teradata | | `adbc_netezza` | Netezza | The rows are read and written as Arrow columnar data, with no conversion between the two drivers. The command line does not change: the same server, database, user, password and trusted authentication parameters, and all the parallel methods. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_oracle" ` --sourceserver "oraserver:1521/ORCLPDB1" ` --sourceuser "TPCH" ` --sourcepassword "mypassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "adbc_oracle" \ --sourceserver "oraserver:1521/ORCLPDB1" \ --sourceuser "TPCH" \ --sourcepassword "mypassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --targetconnectiontype "adbc_mssql" \ --targetserver "localhost" \ --targettrusted \ --targetdatabase "tpch" \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "Physical" \ --degree 8 \ --loadmode "Truncate" ``` ### Performance[​](#performance "Direct link to Performance") LINEITEM table (TPC-H SF1, 6 million rows), `RangeId` method, degree 4, median time in seconds: | Source → Target | DB Editor Driver | Arpe.io ADBC Drivers | Gain | | -------------------------- | ---------------- | -------------------- | ---- | | SQL Server → PostgreSQL | 6.7 | 3.7 | 1.8x | | PostgreSQL → SQL Server | 5.1 | 3.3 | 1.5x | | Oracle → SQL Server | 6.8 | 3.6 | 1.9x | | Oracle → PostgreSQL | 6.8 | 3.2 | 2.1x | | SQL Server → SQL Server | 5.9 | 4.4 | 1.3x | | Oracle → Oracle (degree 1) | 47.7 | 3.4 | 14x | ADBC needs both ends on ADBC, and runs on Windows x64 and Linux x64. The drivers need an ADBC driver block in your license file: contact [Arpe.io](https://www.arpe.io) to add it. See [ADBC Connections](/1.0/documentation/cli/adbc_connections.md) and the [ADBC examples](/1.0/documentation/examples/adbc.md). ## Simpler Parallel Methods[​](#simpler-parallel-methods "Direct link to Simpler Parallel Methods") ### Physical[​](#physical "Direct link to Physical") `--parallelmethod Physical` replaces the four engine-specific physical methods. FastTransfer chooses the technique from the source type: | Source | Technique | | ---------- | ----------- | | PostgreSQL | Ctid | | Oracle | Rowid | | SQL Server | Physloc | | Netezza | Data slices | No key column to choose: give the source schema and table, and a degree. See [Parallel Parameters - Physical](/1.0/documentation/cli/parallel_parameters.md#physical). ### Faster Physloc on SQL Server[​](#faster-physloc-on-sql-server "Direct link to Faster Physloc on SQL Server") The physical split on SQL Server now spreads the rows evenly over all the streams, on rowstore and on clustered columnstore tables. On a clustered rowstore table with 8 streams, the transfer went from about 17.7 s to 4.7 s. ### More sources for DBPartition and Random[​](#more-sources-for-dbpartition-and-random "Direct link to More sources for DBPartition and Random") * `DBPartition` reads the data partitions of a Db2 table (`adbc_db2`), and works with the ADBC types of SQL Server, PostgreSQL, Oracle and Teradata. * `Random` uses the right modulo syntax on Db2 and Teradata. ## Reliability and Security[​](#reliability-and-security "Direct link to Reliability and Security") * **`--useworktables`:** the work tables are merged into the target again, and a failed merge now fails the run. * **`Ntile` and `DataDriven` on date keys:** no rows lost between streams, and rows with a NULL key are transferred. `Ntile` works on Oracle sources. * **Passwords in `uri=` connection strings** are hidden in all the logs. * **Signed build provenance (SLSA)** comes with each release download, so you can check that a binary was built from the FastTransfer sources. ## Upgrading from 0.18[​](#upgrading-from-018 "Direct link to Upgrading from 0.18") Deprecated parallel methods `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` still work in 1.0, with a warning. They will be removed in 2.0: use `Physical`. * `Physloc` (and `Physical` on SQL Server) needs `--sourceschema` and `--sourcetable`. A `--query` can still be added to filter the table. * `NZDataSlice` (and `Physical` on Netezza) no longer needs `--sourceschema` and `--sourcetable`. * Oracle sources: a `PARTITION (...)` clause in the `FROM` of `--query` is now refused. Use the `DBPartition` method instead. ## Known Limitations[​](#known-limitations "Direct link to Known Limitations") * ADBC is not available on Linux ARM64. * With ADBC, time zone offsets from SQL Server and Oracle arrive as the same instant in UTC. * Db2 and Teradata as ADBC targets: a few data types are not supported yet (Db2 `DECFLOAT`, Teradata `PERIOD`). ## Wizard[​](#wizard "Direct link to Wizard") The [Command Wizard](/1.0/wizard.md) offers the ADBC connection types and the `Physical` method. --- # Sitemap ## [Installation](/1.0/installation.md)[​](#installation "Direct link to installation") ## [Wizard GUI](/1.0/wizard.md)[​](#wizard-gui "Direct link to wizard-gui") ## Documentation[​](#documentation "Direct link to Documentation") * [Getting Started](/1.0/.md) * CLI * [Authentication](/1.0/documentation/cli/authentication.md) * [Source Connection Parameters](/1.0/documentation/cli/source_connection_parameters.md) * [Target Connection Parameters](/1.0/documentation/cli/target_connection_parameters.md) * [ADBC Connections](/1.0/documentation/cli/adbc_connections.md) * [Transfer Parameters](/1.0/documentation/cli/transfer_parameters.md) * [Parallel Parameters](/1.0/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/1.0/documentation/cli/advanced_parameters.md) * [License](/1.0/documentation/cli/license.md) * Environment Variables * [Overview](/1.0/documentation/environment-variables/overview.md) * [FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES](/1.0/documentation/environment-variables/loadsteptimeout.md) * [FASTTRANSFER\_SORTEDINPUT](/1.0/documentation/environment-variables/sortedinput.md) * [FASTTRANSFER\_DATEFORMAT](/1.0/documentation/environment-variables/dateformat.md) * Logging * [Overview](/1.0/documentation/logging/Overview.md) * [Logs Level](/1.0/documentation/logging/logs-level.md) * [Log Database](/1.0/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/1.0/documentation/logging/log-files-names-mapping-using-variables.md) * [Examples](/1.0/documentation/logging/examples.md) * Examples * [SQL Server Examples](/1.0/documentation/examples/sql-server.md) * [PostgreSQL Examples](/1.0/documentation/examples/postgresql.md) * [MySQL Examples](/1.0/documentation/examples/mysql.md) * [Oracle Examples](/1.0/documentation/examples/oracle.md) * [Other Databases](/1.0/documentation/examples/other-databases.md) * [ADBC Examples](/1.0/documentation/examples/adbc.md) * [CSV Import](/1.0/documentation/examples/csv-import.md) * [JSON Import](/1.0/documentation/examples/json-import.md) * [Parquet Import](/1.0/documentation/examples/parquet-import.md) * [Advanced Scenarios](/1.0/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/1.0/documentation/compatibility/sources_platforms.md) * [Operating Systems](/1.0/documentation/compatibility/operating_systems.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/1.0/integration/docker-integration.md) * [Kestra](/1.0/integration/kestra-integration.md) * [PostgreSQL](/1.0/integration/postgresql-integration.md) * [SQL Server](/1.0/integration/sqlserver-integration.md) * [Airflow](/1.0/integration/airflow-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 1.0](/1.0/release-notes/release-notes-1.0.md) * [Release Notes 0.18](/1.0/release-notes/release-notes-0.18.md) * [Release Notes 0.17](/1.0/release-notes/release-notes-0.17.md) * [Release Notes 0.16](/1.0/release-notes/release-notes-0.16.md) ## AI Integrations[​](#ai-integrations "Direct link to AI Integrations") * [FastTransfer Agent Skill](/1.0/ai/agent-skills.md) * [FastTransfer MCP Server](/1.0/ai/mcp-server.md) --- # FastTransfer Command Wizard Transfer (DB to DB) Import Files (Files to DB) Tip: press `→` in an empty field to use its example value.Expand All\[ ] ### Operating SystemWindows Windows ![Linux](/img/tux.svg)Linux ### Source Connection Parameterspgsql Connection Type ? : Native ![](/img/logos/clickhouse.svg)clickhouse ![](/img/logos/duckdb.svg)duckdb ![](/img/logos/duckdb.svg)duckdbstream ![](/img/logos/sap.svg)hana ![](/img/logos/sqlserver.svg)msoledbsql ![](/img/logos/sqlserver.svg)mssql ![](/img/logos/mysql.svg)mysql ![](/img/logos/netezza.svg)nzcopy ![](/img/logos/netezza.svg)nzoledb ![](/img/logos/netezza.svg)nzsql odbc oledb ![](/img/logos/oracle.svg)oraodp ![](/img/logos/postgresql.svg)pgcopy ![](/img/logos/postgresql.svg)pgsql ![](/img/logos/teradata.svg)teradata Arpe.io ADBC ![](/img/logos/db2.svg)adbc\_db2 ![](/img/logos/sqlserver.svg)adbc\_mssql ![](/img/logos/netezza.svg)adbc\_netezza ![](/img/logos/oracle.svg)adbc\_oracle ![](/img/logos/postgresql.svg)adbc\_pgsql ![](/img/logos/teradata.svg)adbc\_teradata | Server ? : | localhost | | ------------------ | ---------------------------------- | | Connect String ? : | Server=localhost;Database=mydb;... | | DSN ? : | | | Provider ? : | | | Database ? : | mydatabase | | Trusted ? : | \[ ] | | User ? : | username | | Password ? : | •••••••• | ### Target Connection Parametersmsbulk ### Transfer Parameters ### Parallel ParametersNone ### Advanced Parameters ### License ### Generated Command multi-line\[x] sharecopy ``` .\FastTransfer.exe ` --sourceconnectiontype pgsql ` --targetconnectiontype msbulk ` --loadmode Truncate ` --mapmethod Name ` --license "C:\MyFreeTrialLicense.lic" ``` --- # Getting Started with FastTransfer FastTransfer is a **high-performance data ingestion and transfer engine** that enables fast, parallel data movement between database systems, from files to database systems, or straight from backup files to database systems. New in 1.1 SQL Server and Oracle RMAN **backups as a source**, read without restoring them, and `--loadmode Create` to let FastTransfer create the target table. See the [1.1 release notes](/latest/release-notes/release-notes-1.1.md). ## Your first transfer in three steps[​](#your-first-transfer-in-three-steps "Direct link to Your first transfer in three steps") 1. 1InstallDownload and unzip FastTransfer, or pull the Docker image: see [Installation](/latest/installation.md) 2. 2Build your commandPick your source, target and options in the interactive [Doc Wizard](/latest/wizard.md) 3. 3RunPaste the generated `./FastTransfer` command in your terminal ## The CLI at a glance[​](#the-cli-at-a-glance "Direct link to The CLI at a glance") A FastTransfer command is built in three stages. Each box opens the matching page of the CLI reference. ## Watch the demo[​](#watch-the-demo "Direct link to Watch the demo") [FastTransfer Mini-Demo](https://www.youtube.com/embed/CL3031FWwqo) ## Explore the documentation[​](#explore-the-documentation "Direct link to Explore the documentation") Examples by source Ready-to-run commands for each source database * [![](/img/logos/sqlserver.svg)SQL Server](/latest/documentation/examples/sql-server.md) * [![](/img/logos/postgresql.svg)PostgreSQL](/latest/documentation/examples/postgresql.md) * [![](/img/logos/mysql.svg)MySQL](/latest/documentation/examples/mysql.md) * [![](/img/logos/oracle.svg)Oracle](/latest/documentation/examples/oracle.md) * [Other databases](/latest/documentation/examples/other-databases.md) * [ADBC](/latest/documentation/examples/adbc.md) File imports Load files into a database with DuckDB * [CSV Import](/latest/documentation/examples/csv-import.md)`read_csv` * [Parquet Import](/latest/documentation/examples/parquet-import.md)`read_parquet` * [JSON Import](/latest/documentation/examples/json-import.md)`read_json` Reference Parameters, settings and behaviour * [CLI parameters](/latest/documentation/cli/source_connection_parameters.md)connections, transfer options and parallelism * [Environment variables](/latest/documentation/environment-variables/overview.md)fine-tune runtime behavior * [Logging](/latest/documentation/logging/Overview.md)log levels, log database and log file names * [Compatibility](/latest/documentation/compatibility/sources_platforms.md)database sources and platforms --- # FastTransfer Agent Skill arpe.io publishes official agent skills in the [arpe-io/arpeio-skills](https://github.com/arpe-io/arpeio-skills) GitHub repository. The [`fasttransfer`](https://github.com/arpe-io/arpeio-skills/tree/main/plugins/fasttransfer/skills/fasttransfer) skill teaches your AI agent how to build, explain and troubleshoot FastTransfer commands: which parameters exist, which source and target combinations work, which parallel method to choose, and which mistakes to avoid. The same repository also has skills for FastBCP, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. Skill or MCP server? The skill is a set of instructions: it teaches the agent how FastTransfer works, and the agent writes the command. The [arpe.io MCP server](/latest/ai/mcp-server.md) gives the agent tools that build, validate and, if you allow it, run FastTransfer commands. The two work well together, so install both if your agent supports them. ## Claude Code[​](#claude-code "Direct link to Claude Code") Install the skill as a plugin from the arpe.io marketplace: ``` /plugin install fasttransfer --marketplace arpe-io/arpeio-skills ``` Or in two steps: ``` /plugin marketplace add arpe-io/arpeio-skills /plugin install fasttransfer@arpe-io ``` Then just ask, for example: *"Copy the PostgreSQL table public.orders to SQL Server with FastTransfer"*. To get the latest version of the skill later: ``` /plugin marketplace update arpe-io /plugin update fasttransfer@arpe-io ``` ## Other agents (Codex, Cursor, GitHub Copilot, Gemini CLI…)[​](#other-agents-codex-cursor-github-copilot-gemini-cli "Direct link to Other agents (Codex, Cursor, GitHub Copilot, Gemini CLI…)") Copy the skill folder into the directory your agent reads skills from: ``` git clone https://github.com/arpe-io/arpeio-skills.git cp -r arpeio-skills/plugins/fasttransfer/skills/fasttransfer / ``` For agents without skill support, paste the content of [`SKILL.md`](https://github.com/arpe-io/arpeio-skills/blob/main/plugins/fasttransfer/skills/fasttransfer/SKILL.md) as custom instructions. The files in its `references/` folder can be attached or pasted when needed. ## Product version[​](#product-version "Direct link to Product version") The skill states the FastTransfer version its facts were checked against. Before building a command, it asks the agent to check the installed version (`FastTransfer --version`) and to confirm against this documentation when the installed product is newer. ## Reporting issues[​](#reporting-issues "Direct link to Reporting issues") If the agent gets something wrong, open an issue at [github.com/arpe-io/arpeio-skills/issues](https://github.com/arpe-io/arpeio-skills/issues) with the FastTransfer version, the prompt you gave, and the command the agent produced (with passwords and licence text removed). --- # FastTransfer MCP Server The [arpe.io MCP server](https://github.com/arpe-io/arpeio-mcp) (`arpeio-mcp`) gives AI assistants a set of tools for the arpe.io products: FastBCP, FastTransfer, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. [MCP](https://modelcontextprotocol.io) (Model Context Protocol) is the open standard that Claude, ChatGPT, Cursor, VS Code and most other assistants use to call external tools. For FastTransfer, the assistant can ask the server to validate a set of parameters and render the exact FastTransfer command, look up what FastTransfer supports, read the release notes and search this documentation. If FastTransfer is installed on your machine, it can also run the command. The server runs in one of two modes: * **Command builder**, the default. The tools build, validate and explain commands; no FastTransfer binary is needed. The hosted server works this way, so it never connects to your databases. * **Execution**. When you install the server on your own machine and point it at your FastTransfer binary, the assistant can also run the command it built, once you confirm it. MCP server or agent skill? The MCP server gives the assistant tools to call. The [agent skill](/latest/ai/agent-skills.md) is a set of instructions that teaches it how the product works. The two work well together, so install both if your assistant supports them. ## Connect your assistant[​](#connect-your-assistant "Direct link to Connect your assistant") arpe.io hosts the server, so there is nothing to install. Add this URL to your assistant: ``` https://arpe-io-arpeio-mcp.hf.space/sse ``` * Claude Code * Claude Desktop * ChatGPT * Cursor * VS Code (Copilot) * Gemini CLI * Windsurf * Le Chat (Mistral) ``` claude mcp add --transport sse arpeio https://arpe-io-arpeio-mcp.hf.space/sse ``` Add the server to your Claude Desktop configuration file: * **Linux**: `~/.config/Claude/claude_desktop_config.json` * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` ``` { "mcpServers": { "arpeio": { "command": "npx", "args": [ "mcp-remote", "https://arpe-io-arpeio-mcp.hf.space/sse" ] } } } ``` Custom connectors need a paid plan (Plus, Pro, Team or Enterprise). 1. Open ChatGPT in your browser, go to **Settings** > **Apps and connectors**. 2. Open **Advanced settings** and enable **Developer mode**. 3. Go to **Connectors** > **Browse connectors** > **Add a new connector**. 4. Set the URL to `https://arpe-io-arpeio-mcp.hf.space/sse` and save. Open Cursor Settings, search for "MCP" and add a server with this configuration: ``` { "mcpServers": { "arpeio": { "url": "https://arpe-io-arpeio-mcp.hf.space/sse" } } } ``` Run **MCP: Open User Configuration** from the Command Palette and add: ``` { "servers": { "arpeio": { "url": "https://arpe-io-arpeio-mcp.hf.space/sse", "type": "sse" } } } ``` Add the server to `~/.gemini/settings.json`: ``` { "mcpServers": { "arpeio": { "uri": "https://arpe-io-arpeio-mcp.hf.space/sse" } } } ``` Add the server to `~/.codeium/windsurf/mcp_config.json` (Windows: `%USERPROFILE%\.codeium\windsurf\mcp_config.json`): ``` { "mcpServers": { "arpeio": { "command": "npx", "args": [ "-y", "mcp-remote", "https://arpe-io-arpeio-mcp.hf.space/sse" ] } } } ``` Available on all plans, including the free one. 1. Go to **Intelligence** > **Connectors**. 2. Click **Add connector** > **Custom MCP Connector**. 3. Set the name to `Arpe.io` and the URL to `https://arpe-io-arpeio-mcp.hf.space/sse`. 4. Leave authentication disabled and click **Create**. Instructions for HuggingChat and Kiro are in the [server README](https://github.com/arpe-io/arpeio-mcp#connect-your-ai-assistant). ## Run FastTransfer from the assistant[​](#run-fasttransfer-from-the-assistant "Direct link to Run FastTransfer from the assistant") To let the assistant run FastTransfer, install the server on the machine where FastTransfer is installed (Python 3.10 or later): ``` pip install arpeio-mcp ``` Then register the `arpeio-mcp` command instead of the hosted URL, with the path to your binary. In Claude Code: ``` claude mcp add --transport stdio --env FASTTRANSFER_PATH=/path/to/FastTransfer arpeio -- arpeio-mcp ``` In Claude Desktop, and in other clients that use the `mcpServers` format: ``` { "mcpServers": { "arpeio": { "command": "arpeio-mcp", "env": { "FASTTRANSFER_PATH": "/path/to/FastTransfer" } } } } ``` | Variable | Description | | ---------------------- | ----------------------------------------------------------------------------- | | `FASTTRANSFER_PATH` | Path to the FastTransfer binary. Without it, the server only builds commands. | | `FASTTRANSFER_TIMEOUT` | Execution timeout, in seconds. Optional. | | `FASTTRANSFER_LOG_DIR` | Directory for the execution logs. Optional. | | `LOG_LEVEL` | Server log level: `DEBUG`, `INFO` (default), `WARNING` or `ERROR`. | ## Tools[​](#tools "Direct link to Tools") | Tool | What it does | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `fasttransfer_info` | Reference information, picked with `action`: supported source/target combinations, parallel methods, workflow tips, version detection. | | `fasttransfer_preview_transfer` | Validates the parameters and renders the FastTransfer command. When no parallel method is given, it suggests one. | | `fasttransfer_execute_transfer` | Runs the previewed command. Needs a local FastTransfer binary and `confirmation: true`. | Tools shared by all arpe.io products: | Tool | What it does | | -------------------- | ------------------------------------------------------------------------------------------------------- | | `arpe_quick_start` | Picks the right arpe.io product for a use case described in plain English and returns a workflow guide. | | `arpe_get_status` | Shows which arpe.io binaries the server can run, and which are in command-builder mode only. | | `arpe_release_notes` | Returns release notes for a product, or for one version. | | `search_docs` | Full-text search over the arpe.io documentation sites, this one included, and the arpe.io blog. | ## How a request flows[​](#how-a-request-flows "Direct link to How a request flows") 1. You describe what you want, for example: *"Copy the public.orders table from PostgreSQL to SQL Server, in parallel on the order\_id column"*. 2. The assistant calls `fasttransfer_preview_transfer`. The tool checks the parameters and returns the FastTransfer command, an explanation, and warnings when an option does not exist in the FastTransfer version you run. 3. You review the command. Passwords are masked in the displayed version. 4. If execution is enabled, the assistant calls `fasttransfer_execute_transfer`. The tool refuses to run unless the call carries `confirmation: true`, and it returns the exit code, the output and a diagnosis of known errors. Most clients also ask for your approval before each tool call. ## Prompts and resources[​](#prompts-and-resources "Direct link to Prompts and resources") Clients that support MCP prompts (Claude Desktop, Cursor and others) list conversation starters: `transfer-data` for FastTransfer, and `troubleshoot` to explain a failed run from its error message. The server also exposes the FastTransfer capability matrix as the MCP resource `arpeio://capabilities/fasttransfer-combinations`. ## Reporting issues[​](#reporting-issues "Direct link to Reporting issues") If a tool returns a wrong command or wrong information, open an issue at [github.com/arpe-io/arpeio-mcp/issues](https://github.com/arpe-io/arpeio-mcp/issues) with the prompt you gave and the tool output (with passwords and licence text removed). --- # ADBC Connections FastTransfer 1.0 ships with the **Arpe.io ADBC drivers**. With an `adbc_*` connection type, the rows travel from the source to the target as Arrow columnar data, without any conversion to .NET objects in between. Nothing else to install: the drivers are bundled in the FastTransfer binary. ## Connection Types[​](#connection-types "Direct link to Connection Types") The same types are used for the source (`--sourceconnectiontype`) and the target (`--targetconnectiontype`). ![](/img/logos/sqlserver.svg)SQL Server * `adbc_mssql`ADBCSQL Server, default port 1433 ![](/img/logos/postgresql.svg)PostgreSQL * `adbc_pgsql`ADBCPostgreSQL, default port 5432 ![](/img/logos/oracle.svg)Oracle * `adbc_oracle`ADBCOracle, default port 1521 ![](/img/logos/db2.svg)IBM Db2 * `adbc_db2`ADBCDb2 for LUW, default port 50000 ![](/img/logos/teradata.svg)Teradata * `adbc_teradata`ADBCTeradata, default port 1025 ![](/img/logos/netezza.svg)IBM Netezza * `adbc_netezza`ADBCNetezza, default port 5480 ### Rules[​](#rules "Direct link to Rules") * ADBC on both endsAn `adbc_*` source goes with an `adbc_*` target. Mixing an `adbc_*` type with a native type is refused. * PlatformsWindows x64 and Linux x64. Not available on Linux ARM64. * LicenseThe drivers need an ADBC driver block in the license file. See [License](#license). ## Connecting[​](#connecting "Direct link to Connecting") ### With the usual parameters[​](#with-the-usual-parameters "Direct link to With the usual parameters") `--sourceserver`, `--sourcedatabase`, `--sourceuser`, `--sourcepassword` and `--sourcetrusted` (and their target equivalents) work as with the native types. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_oracle" ` --sourceserver "oraserver:1521/ORCLPDB1" ` --sourceuser "TPCH" ` --sourcepassword "mypassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "adbc_oracle" \ --sourceserver "oraserver:1521/ORCLPDB1" \ --sourceuser "TPCH" \ --sourcepassword "mypassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --targetconnectiontype "adbc_mssql" \ --targetserver "localhost" \ --targettrusted \ --targetdatabase "tpch" \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "Physical" \ --degree 8 \ --loadmode "Truncate" ``` `--sourceserver`/`--targetserver` `host`, `host:port` or `host,port`. SQL Server named instance: `host\INSTANCE`. Oracle: `host:port/service` or a TNS alias. `--sourcetrusted`/`--targettrusted` Windows (SSPI) or Kerberos for SQL Server and PostgreSQL; Kerberos for Oracle, Db2 and Teradata. Not available for Netezza. ### With a connection string[​](#with-a-connection-string "Direct link to With a connection string") `--sourceconnectstring` and `--targetconnectstring` take a `uri=` in the driver's format: * SQL Server * PostgreSQL * Oracle * Db2 * Teradata * Netezza ``` uri=sqlserver://user:password@host:1433/?database=tpch ``` ``` uri=postgresql://user:password@host:5432/tpch ``` ``` uri=oracle://user:password@host:1521/orclpdb1 ``` ``` uri=db2://user:password@host:50000/TPCH ``` ``` uri=teradata://user:password@host/SALES ``` ``` uri=netezza://user:password@host:5480/system ``` tip * Special characters in a password must be percent-encoded: `@` → `%40`, `:` → `%3A`, `/` → `%2F`. * SQL Server or PostgreSQL .NET keywords (`Data Source=`, `Trusted_Connection=Yes`, ...) are not understood here: use the usual parameters or a `uri=`. ## Target Table[​](#target-table "Direct link to Target Table") As with the native targets, the target table **must exist**: FastTransfer does not create it. The schema and table names are used **exactly as typed**, case included. Use the name as the database stores it: usually `ORDERS` on Oracle, Db2 and Teradata, `orders` on PostgreSQL. If the table is not found, FastTransfer stops before truncating or loading anything. ## Parallel Methods[​](#parallel-methods "Direct link to Parallel Methods") All the parallel methods work with ADBC sources: `Physical` `adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza` `DBPartition` `adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_teradata`, `adbc_db2` `RangeId`,`Ntile`,`Random`,`DataDriven`,`Timepartition` All ADBC sources See [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md). ## License[​](#license "Direct link to License") The ADBC drivers need an **ADBC driver block** in addition to the FastTransfer block. Both blocks can be in the same license file: FastTransfer passes the ADBC block to the drivers, and nothing else is needed. Without an ADBC driver block, an `adbc_*` transfer stops with exit code 99. Contact [Arpe.io](https://www.arpe.io) to add it to your license. ## Differences with the Native Types[​](#differences-with-the-native-types "Direct link to Differences with the Native Types") `--useworktables`Not available The parallel streams load the target table directly. `--batchsize`Ignored A warning is logged: the drivers size their own batches. `Time zones` SQL Server `datetimeoffset` and Oracle `TIMESTAMP WITH TIME ZONE` values arrive as the same instant in UTC. `Driver messages` Written to the FastTransfer log, with the connection type as label. Related * [Source Connection Parameters](/latest/documentation/cli/source_connection_parameters.md)all the source connection types * [Target Connection Parameters](/latest/documentation/cli/target_connection_parameters.md)all the target connection types * [License](/latest/documentation/cli/license.md)the license file and its blocks --- # Advanced Parameters This section covers advanced configuration options for FastTransfer, including tracing, logging, and display settings. * Run IDA custom identifier to trace the transfer in the logs * Settings FileLogging and other options from a custom file * Log LevelOverride the log level of the settings file * No BannerA cleaner console output for scripts ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter allows you to specify a custom identifier for tracing the transfer process. This is useful for correlating logs and tracking operations across systems. **Example:** ``` ./FastTransfer \ ... --runid "transfer-2024-01-15-001" \ ... ``` `--runid`default `a random GUID` `--runid "RunSpanID"` Tracing Use a meaningful Run ID to make it easier to search logs and trace specific transfer operations, especially in production environments or when running multiple transfers. ## Settings File[​](#settings-file "Direct link to Settings File") Specify a custom settings file for logging and other configuration options. This allows you to use different configuration profiles for different environments or scenarios. **Example:** ``` ./FastTransfer \ ... --settingsfile "config/production-settings.json" \ ... ``` `--settingsfile` `--settingsfile "file_path"`. Default: `FastTransfer_Settings.json` in the same folder as the executable. Configuration File The settings file contains logging configuration, connection settings, and other advanced options. You can maintain separate configuration files for development, staging, and production environments. ## Log Level[​](#log-level "Direct link to Log Level") Override the log level defined in the settings file. This is useful for temporary debugging or troubleshooting without modifying the settings file. **Example:** ``` ./FastTransfer \ ... --loglevel debug \ ... ``` `--loglevel`default `information` `--loglevel "level"` **Allowed Values:** `verbose` Most detailed tracing information `debug` Detailed debugging information `information`Default General informational messages `warning` Warning messages for potentially harmful situations `error` Error messages for failures Debugging Use `--loglevel debug` when troubleshooting issues to get the most detailed logging output. Remember to switch back to `information` or `warning` for production use to avoid excessive log volume. ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastTransfer banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastTransfer \ ... --nobanner \ ... ``` `--nobanner` Switch, no value. Clean Output Using `--nobanner` is recommended when running FastTransfer from scripts or CI/CD pipelines where you want to minimize console output or parse the results programmatically. ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using advanced parameters: | | This example | | ----------------- | ------------------------------------ | | **Tracing** | A custom Run ID | | **Configuration** | Loaded from a custom settings file | | **Logging** | Log level set to information | | **Output** | Banner disabled for a cleaner output | * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "sales" ` --query "select * from sales where order_date >= '2024-01-01'" ` --runid "daily-sales-sync-2024-01-15" ` --settingsfile "config/production-settings.json" ` --loglevel information ` --nobanner ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "sales" \ --query "select * from sales where order_date >= '2024-01-01'" \ --runid "daily-sales-sync-2024-01-15" \ --settingsfile "config/production-settings.json" \ --loglevel information \ --nobanner ``` Related * [Logging overview](/latest/documentation/logging/Overview.md)the settings file and its sinks * [Log Levels](/latest/documentation/logging/logs-level.md)what each level writes --- # Authentication FastTransfer supports two types of authentication methods depending on your database platform. Authentication can be configured separately for source and target databases. Trusted Connection * CredentialsThe current Windows user, or the operating system authentication if allowed by the RDBMS * Source`--sourcetrusted` * Target`--targettrusted` SQL Login * CredentialsExplicit username and password * Source`--sourceuser` and `--sourcepassword` * Target`--targetuser` and `--targetpassword` ## Source Authentication[​](#source-authentication "Direct link to Source Authentication") * Trusted Connection * SQL Login ### Trusted Connection (Source)[​](#trusted-connection-source "Direct link to Trusted Connection (Source)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --sourcetrusted ` ... ``` `--sourcetrusted` Switch, no value. Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### SQL Login with Username and Password (Source)[​](#sql-login-with-username-and-password-source "Direct link to SQL Login with Username and Password (Source)") Standard database authentication with explicit credentials for the source database. ``` ./FastTransfer ` ... --sourceuser "myuser" ` --sourcepassword "mypassword" ` ... ``` `--sourceuser`or`-u` Username: `--sourceuser "username"` (short form: `-u "username"`) `--sourcepassword`or`-x` Password: `--sourcepassword "password"` (short form: `-x "password"`) ## Target Authentication[​](#target-authentication "Direct link to Target Authentication") * Trusted Connection * SQL Login ### Trusted Connection (Target)[​](#trusted-connection-target "Direct link to Trusted Connection (Target)") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\\FastTransfer.exe ` ... --targettrusted ` ... ``` `--targettrusted` Switch, no value. ### SQL Login with Username and Password (Target)[​](#sql-login-with-username-and-password-target "Direct link to SQL Login with Username and Password (Target)") Standard database authentication with explicit credentials for the target database. ``` ./FastTransfer ` ... --targetuser "myuser" ` --targetpassword "mypassword" ` ... ``` `--targetuser`or`-U` Username: `--targetuser "username"` (short form: `-U "username"`) `--targetpassword`or`-X` Password: `--targetpassword "password"` (short form: `-X "password"`) ## Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use connection string parameters where you pass the user and password directly in the connection string: * [Source Connection Parameters](/latest/documentation/cli/source_connection_parameters.md#source-connection-string)`--sourceconnectstring` for the source database connection * [Target Connection Parameters](/latest/documentation/cli/target_connection_parameters.md#target-connection-string)`--targetconnectstring` for the target database connection Password Security in Logs All passwords passed either through the `--sourcepassword`, `--targetpassword` parameters or within the `--sourceconnectstring`, `--targetconnectstring` parameters are automatically hidden in all logs (Console, Files, and Database). This ensures your credentials remain secure in logging outputs. Tips For Login/Password you can also use the environment variables like FastTransfer\_SOURCEUSER and FastTransfer\_SOURCEPASSWORD for example or store the password in an encrypted file. Up to you to decrypt the file and its content before using it in a shell variable that will be used with FastTransfer. --- # Backup Sources FastTransfer reads tables **directly from backup files**: no restore, no running SQL Server or Oracle instance, no load on production. The backup you already take every night becomes a data source. ![](/img/logos/sqlserver.svg)SQL Server backups * `backup_mssql`ADBCfull and differential backups (`.bak`), compressed, striped, encrypted or TDE ones included ![](/img/logos/oracle.svg)Oracle RMAN backups * `backup_rman`ADBCRMAN backup sets, full, level 0 and incremental level 1 to 4 The drivers are bundled in FastTransfer: there is nothing else to install. They return Arrow columnar data, like the ADBC sources, so **the target must be an `adbc_*` connection type**. Another target is refused before anything runs. Platforms Backup sources run on **Windows x64** and **Linux x64**. ## Parameters[​](#parameters "Direct link to Parameters") A backup source uses the usual source parameters, with these meanings: | Parameter | Meaning for a backup source | | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | `--sourceserver` | Directory of the backup files | | `--sourcedatabase` | File names or patterns in that directory, separated by `;` | | `--sourceschema`, `--sourcetable` | Table to read | | `--query` | `SELECT * FROM [schema.]table` or `SELECT col, col... FROM [schema.]table`. `backup_mssql` also takes `TOP n`. No other SQL: no `WHERE`, no join | | `--sourceuser`, `--sourcepassword` | `backup_mssql`, encrypted backup: the private key file of the certificate (`.pvk`, `.pfx`, PEM...) and its password | | `--sourceconnectstring` | Driver options, given directly. An option given there wins over the environment variables | **Which files to give:** * `backup_mssql`: the full backup and its differentials, and every stripe. Example: `--sourcedatabase "mydb_full.bak;mydb_diff_*.bak"`. * `backup_rman`: `*` and `?` in a name, `**` for any number of directories, and a directory stands for its files. Example: `--sourcedatabase "l0;l1/**"`. An entry that matches no file stops the run, naming it. ## SQL Server Backup to PostgreSQL[​](#sql-server-backup-to-postgresql "Direct link to SQL Server Backup to PostgreSQL") * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "backup_mssql" ` --sourceserver "D:\MSSQLBACKUP" ` --sourcedatabase "tpch_full.bak;tpch_diff_*.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetconnectiontype "adbc_pgsql" ` --targetserver "localhost:5432" ` --targetdatabase "tpch" ` --targetuser "postgres" ` --targetpassword "mypassword" ` --targetschema "public" ` --targettable "orders" ` --method "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "backup_mssql" \ --sourceserver "/backup/mssql" \ --sourcedatabase "tpch_full.bak;tpch_diff_*.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "adbc_pgsql" \ --targetserver "localhost:5432" \ --targetdatabase "tpch" \ --targetuser "postgres" \ --targetpassword "mypassword" \ --targetschema "public" \ --targettable "orders" \ --method "Physical" \ --degree 8 \ --loadmode "Truncate" ``` ## Oracle RMAN Backup to SQL Server[​](#oracle-rman-backup-to-sql-server "Direct link to Oracle RMAN Backup to SQL Server") * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "backup_rman" ` --sourceserver "D:\RMAN" ` --sourcedatabase "l0;l1/**" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "orders" ` --method "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "backup_rman" \ --sourceserver "/backup/rman" \ --sourcedatabase "l0;l1/**" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --targetconnectiontype "adbc_mssql" \ --targetserver "sqlserver" \ --targetuser "loader" \ --targetpassword "mypassword" \ --targetdatabase "tpch" \ --targetschema "dbo" \ --targettable "orders" \ --method "Physical" \ --degree 8 \ --loadmode "Truncate" ``` ## Parallel Read[​](#parallel-read "Direct link to Parallel Read") A backup has no SQL engine, so the parallel methods that send a query do not apply. Two values are accepted: | `--method` | What it does | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `None` | One stream | | `Physical` | Each of the `--degree` streams reads one slice of the table: pages of a rowstore, rowgroups of a columnstore, ranges of Oracle blocks | ## Which Version of the Data Is Read[​](#which-version-of-the-data-is-read "Direct link to Which Version of the Data Is Read") FastTransfer reads the **latest version the files hold**: full backup plus differential, or level 0 plus incrementals. A backup that could be the newest and cannot be used stops the run, naming it, and FastTransfer logs what can be done. The backup is opened and the table looked up **before any pre-load step**: a refused backup, or a table the backup does not hold, stops the run with the target untouched, `--loadmode Truncate` included. | Environment variable | Effect | | ---------------------------------------------- | --------------------------------------------------------------------------------------- | | `FASTTRANSFER_BACKUP_RESTORE_MODE=best_effort` | Read the newest usable version instead of stopping | | `FASTTRANSFER_BACKUP_RESTORE_POINT=full` | Read the last full (or level 0) backup and ignore the differential and incremental ones | | `FASTTRANSFER_INDEX_DIR` | Directory of the backup indexes | ## The Backup Index[​](#the-backup-index "Direct link to The Backup Index") On the first read, the driver builds an index of each backup and saves it. This takes minutes on a large compressed backup; the next reads reuse the index and start at once. The index is saved under `%LOCALAPPDATA%` on Windows, `$XDG_CACHE_HOME` or `~/.cache` on Linux. Set `FASTTRANSFER_INDEX_DIR` to choose another directory. FastTransfer warns when the directory cannot be written. `backup_mssql`: each compressed backup file is read by 2 threads when the backup is indexed, and the files of a striped backup are read at the same time. The driver option `adbc.arpemsbackup.index_threads_per_backup_file` (1 to 16), given in `--sourceconnectstring`, changes that number. ## Limits[​](#limits "Direct link to Limits") * The target must be an `adbc_*` connection type. * Only `None` and `Physical` parallel methods. * A query cannot filter or join: it selects columns of one table. * Not available on Linux ARM64. --- # Creating the Target Table With `--loadmode Create`, FastTransfer creates the target table from the source, then loads it. The source can be a table, a query or files (CSV, Parquet, JSON). * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "orahost:1521/ORCLPDB1" ` --sourceuser "SALES" ` --sourcepassword "mypassword" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "dwh" ` --targetschema "stg" ` --targettable "ORDERS" ` --loadmode "Create" ` --inferdatatype "best" ``` ``` ./FastTransfer \ --sourceconnectiontype "oraodp" \ --sourceserver "orahost:1521/ORCLPDB1" \ --sourceuser "SALES" \ --sourcepassword "mypassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --targetconnectiontype "msbulk" \ --targetserver "sqlserver" \ --targetuser "loader" \ --targetpassword "mypassword" \ --targetdatabase "dwh" \ --targetschema "stg" \ --targettable "ORDERS" \ --loadmode "Create" \ --inferdatatype "best" ``` ## What Create Does[​](#what-create-does "Direct link to What Create Does") | Target table | What happens | | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | Does not exist | `CREATE TABLE` from the source, then load | | Exists, with the name exactly as typed | Truncated, then loaded. Its structure is kept: nothing is inferred, nothing is altered | | Exists only in another case (`--targettable Orders`, stored `orders`) | Error, nothing is created | The created table has the column names and the column order of the source. Every column is nullable, and the table has no key, index or constraint. The target schema must exist. `--loadmode Replace` is an alias of `Create`. Good to know If the load fails after the table was created, the table stays, empty or partly loaded. The next run finds it, truncates it and loads it. ## Choosing the Column Types[​](#choosing-the-column-types "Direct link to Choosing the Column Types") `--inferdatatype` tells FastTransfer how to derive the column types of the table it creates. It is used with `--loadmode Create` only: with another load mode it is ignored, with a warning. `--inferdatatype`default `fast` `--inferdatatype "mode"` **Allowed Values:** `fast`Default Types from the source metadata. No row is read. `allvarchar` Every column as text, converted on the source. `best` The source data is profiled to find the strictest type that holds every value. Same database engine on both sides From Oracle to Oracle, SQL Server to SQL Server and so on, the source types are copied unchanged, whatever `--inferdatatype` says (`allvarchar` excepted). ### fast[​](#fast "Direct link to fast") `fast` reads the declared types of the source: from the catalog for a table, from the engine for a query. No row is read, so the table is created at once. Oracle declares little about its numbers and dates, so `fast` plays safe: | Oracle source | Created as | | -------------------------- | -------------------------------------------------------------------------- | | `NUMBER` with no precision | A float (`FLOAT(53)`, `DOUBLE PRECISION`...) | | `NUMBER(p,0)` | `SMALLINT`, `INT` or `BIGINT` by precision, `DECIMAL(p,0)` above 18 digits | | `NUMBER(p,s)` | `DECIMAL(p,s)` | | `DATE` | `DATETIME2(0)` / `TIMESTAMP(0)`: an Oracle `DATE` holds a time | A text column with no declared length (`CLOB`, `text`, `varchar(max)`, a Parquet string) gets 256 characters. See [the environment variables](#environment-variables) to change it. ### allvarchar[​](#allvarchar "Direct link to allvarchar") `allvarchar` creates text columns only: Unicode text for the text columns, plain text for the others. The values are converted on the source, in one format whatever the machine and its regional settings: * `.` as the decimal point, no thousands separator * ISO 8601 dates and timestamps * `true` / `false` * Upper case hexadecimal for binary values A binary column with no declared length (`BLOB`, `varbinary(max)`) stays binary. ### best[​](#best "Direct link to best") `best` scans the source once and picks the strictest type that holds every value. It applies to **Oracle sources** and to **files read through DuckDB** (CSV, Parquet, JSON). For the other sources, whose metadata is already precise, it gives the same types as `fast`. | Source column | What best looks at | Created as | | ------------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------ | | Oracle `NUMBER` with no precision, `FLOAT` | Real range and number of decimals | `SMALLINT`, `INT`, `BIGINT` or `DECIMAL(p,s)`; a float above 18 decimals | | Oracle `DATE` | Is there a time part on any row? | `DATE` when no row has one | | Oracle `CLOB`, a file `VARCHAR` | Length of the longest value | A bounded text column of that length | | File integers, `DECIMAL`, `DOUBLE` | Real range and number of decimals | The smallest integer or decimal type | | File `TIMESTAMP` | Time part and fractional digits used | `DATE`, or a timestamp with the digits really used | **The types are guarded.** Every narrowed column is read through a check: a row that does not fit the inferred type, written after the scan or missed by a sample, fails the load instead of being rounded or truncated. The table created by that run is then dropped, so the next run infers the types again. Later loads The types fit the data read at creation time. A later `--loadmode Append` with larger values fails on the target. ## Types With No Equivalent[​](#types-with-no-equivalent "Direct link to Types With No Equivalent") * **XML, JSON and arrays** are created with the unbounded text type of the target (`NVARCHAR(MAX)`, `TEXT`, `CLOB`...). * A column whose type has no equivalent on the target (range, network address, interval, enum...) is created as text, with a warning, and converted to text on the source. ## Environment Variables[​](#environment-variables "Direct link to Environment Variables") | Variable | Effect | Default | | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | `FASTTRANSFER_INFER_DEFAULT_STRING_MAXSIZE` | Length of a text column with no declared length, in `fast` and `allvarchar`: from 1 to the largest bounded text length of the target, or `max` for the unbounded type | `256` | | `FASTTRANSFER_INFER_STRING_MARGIN` | Margin added to a length measured by `best`: a number of characters (`50`) or a factor from `2x` to `10x` | `0` | | `FASTTRANSFER_INFER_SAMPLE_PERCENT` | `best` reads a sample instead of every row: a block sample of an Oracle table (a query is read in full), `USING SAMPLE` on files | `100` | An invalid value stops the run, naming the variable. ## Limits[​](#limits "Direct link to Limits") * A value longer than its column fails the load: it is never truncated. With `fast`, raise `FASTTRANSFER_INFER_DEFAULT_STRING_MAXSIZE` when a text column with no declared length holds more than 256 characters. * **SQL Server target:** NaN and infinity are refused in `REAL` and `FLOAT` columns. * **MySQL target:** the text columns of a row hold at most 65,535 bytes. A table above that limit is not created: create it yourself, with `TEXT` columns where needed, and load it with `--loadmode Truncate`. The server must be in strict mode. * **MySQL source:** a `TIME` is a duration. A value outside 00:00:00 to 23:59:59 fails on a target `TIME` column. * `allvarchar` needs a source whose engine is known: it is not available with a generic `odbc` or `oledb` source. * With a `--query` and the `Physical` method, the query must be a single `SELECT` that lists its columns, or `SELECT *` on one table. Tested engines `--loadmode Create` is tested on SQL Server, PostgreSQL, Oracle, MySQL, Db2, Teradata (as a source) and DuckDB files. ClickHouse, Netezza, SAP HANA, Teradata as a target and the backup sources are not tested yet. --- # License Configure how FastTransfer retrieves and uses its license file. ## License Parameter[​](#license-parameter "Direct link to License Parameter") Use the `--license` parameter to specify the location or content of your FastTransfer license. `--license`Long form only `--license ""`: a file path, an HTTP(S) URL or the license content itself. By default, FastTransfer will try to use the license file named `FastTransfer.lic` in the same directory as the FastTransfer executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastTransfer supports multiple ways to provide a license: * 1\. File path * 2\. HTTP(S) endpoint * 3\. License content (inline) Specify a custom license file path: Windows ``` .\FastTransfer.exe ` ... --license "C:\licenses\FastTransfer.lic" ` ... ``` Linux ``` ./FastTransfer \ ... --license "/path/to/licenses/FastTransfer.lic" \ ... ``` Retrieve the license from a remote URL where you put the license content and distribute it using HTTPS: Windows ``` .\FastTransfer.exe ` ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" ` ... ``` Linux ``` ./FastTransfer \ ... --license "https://licenseserve.yourdomain.lan/FastTransfer.lic" \ ... ``` Provide the license content directly. Using a variable or environment variable is recommended. Useful for Docker or Lambda deployment: Windows ``` # Using environment variable $env:FastTransfer_LICENSE = "LICENSE_CONTENT_HERE" .\FastTransfer.exe ` ... --license $env:FastTransfer_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastTransfer.lic" -Raw .\FastTransfer.exe ` ... --license $license ` ... ``` Linux ``` # Using environment variable export FastTransfer_LICENSE="LICENSE_CONTENT_HERE" ./FastTransfer \ ... --license "$FastTransfer_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastTransfer.lic) ./FastTransfer \ ... --license "$license" \ ... ``` ## ADBC Driver License[​](#adbc-driver-license "Direct link to ADBC Driver License") The [ADBC connection types](/latest/documentation/cli/adbc_connections.md) (`adbc_*`) need an **ADBC driver block** in addition to the FastTransfer block. Keep both blocks in the same file and pass it with `--license`: FastTransfer hands the ADBC block to the drivers. | Exit code | When | | --------- | ------------------------------------------------- | | **99** | An `adbc_*` transfer without an ADBC driver block | ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using a license from a remote server with a database transfer: | | This example | | ----------- | -------------------------------------------------------------------------------- | | **License** | Retrieved from a remote UNC path | | **Source** | A PostgreSQL database, orders from 2024 onwards | | **Target** | A SQL Server database, loaded with bulk insert | | **Method** | `DataDriven` parallel method with 4 threads, one chunk per month of `order_date` | * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost" ` --sourcedatabase "production" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "warehouse" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" ` --parallelmethod DataDriven ` --distributekeycolumn "EXTRACT(MONTH FROM order_date)" ` --degree 4 ` --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` ``` ./FastTransfer \ --sourceconnectiontype "pgsql" \ --sourceserver "localhost" \ --sourcedatabase "production" \ --sourceuser "FastUser" \ --sourcepassword "FastPassword" \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "warehouse" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "SELECT * FROM orders WHERE order_date >= '2024-01-01'" \ --parallelmethod DataDriven \ --distributekeycolumn "EXTRACT(MONTH FROM order_date)" \ --degree 4 \ --license "//SharedUnc/licenses/FastTransfer/FastTransfer.lic" ``` Related * [ADBC Connections](/latest/documentation/cli/adbc_connections.md)the `adbc_*` connection types and their license block * [Installation](/latest/installation.md)where FastTransfer looks for `FastTransfer.lic` --- # Parallel Parameters FastTransfer can parallelize data export to significantly improve performance. This section covers the parameters that control parallel execution. ## Parallel Method[​](#parallel-method "Direct link to Parallel Method") Use the `--parallelmethod` parameter to specify how data will be split across parallel threads. * Windows * Linux ``` .\FastTransfer.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastTransfer \ ... --parallelmethod Ntile \ ... ``` `--parallelmethod`default `None` `--parallelmethod ` ### Available Methods[​](#available-methods "Direct link to Available Methods") [`Physical`](#physical)SQL Server, PostgreSQL, Oracle, Netezza Physical location of the rows, chosen by FastTransfer for the source engine. Key columnNot needed [`DBPartition`](#dbpartition)SQL Server, PostgreSQL, Oracle, MySQL, Teradata, Db2 One stream per native partition of the source table. Key columnNot needed `None`Any source No split, one stream. Key columnNot needed `RangeId`Any source Numeric ranges of the key. Key column--distributekeycolumn `Ntile`Any source Even slices of the key (number, date or string). Key column--distributekeycolumn `Random`Any source Modulo of the key. Key column--distributekeycolumn [`DataDriven`](#data-driven-query)Any source One stream per distinct value of the key (or of `--datadrivenquery`). Key column--distributekeycolumn, optionally --datadrivenquery [`Timepartition`](#timepartition)Any source One stream per year, month, day or week of a date column. Key columnA date tuple in --distributekeycolumn Which method to choose? * **A large table on SQL Server, PostgreSQL, Oracle or Netezza:** start with `Physical`. No key column to choose. * **A partitioned table:** `DBPartition`. * **An integer key without big gaps (identity, sequence):** `RangeId`. * **Any other key, or a `--query` source:** `Ntile`, or `Timepartition` on a date column. Each method in detail **Physical** - Uses the physical location of the rows. FastTransfer picks the right technique for the source: `Ctid` on PostgreSQL, `Rowid` on Oracle, `Physloc` on SQL Server (rowstore and clustered columnstore tables), data slices on Netezza. Requires `--sourceschema` and `--sourcetable` (not on Netezza). A `--query` can be added to filter the table. See [Physical](#physical) below. **DBPartition** - Uses the native partitions of the source table: one transfer per partition, biggest partitions first. Requires `--sourceschema` and `--sourcetable`; `--query` is not allowed. See [DBPartition](#dbpartition) below. **RangeId** - Splits a numeric key into ranges. Best with an identity column or a sequence without big gaps. **Ntile** - Splits the key into slices of the same number of rows. The key can be a number, a date or a string. Rows with a NULL key are transferred in a stream of their own. **Random** - Uses a modulo on the key. **DataDriven** - One transfer per distinct value of the key, or per value returned by `--datadrivenquery`. The NULL value is one of them. **Timepartition** - Splits the data on the time parts of a date column: one transfer per year, month, day or ISO week. `--distributekeycolumn` uses a tuple such as `"(order_date,year,month)"`. See [Timepartition](#timepartition) below. tip You can use an expression instead of a column name in the distribute key column.
Example: `YEAR(o_orderdate)` Deprecated methods `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` are replaced by `Physical`. They still work in 1.0, with a warning, and will be removed in 2.0. When to Use Parallelism If you want to use a parallel export/import use other than None. Try to use Parallelism only if you have a large amount of data to transfer (more than 1M cells). ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastTransfer will use SQL queries that run in parallel against the source. Each query will have a WHERE clause that retrieves a part of the total data. Information This parameter is mandatory when using methods that require a distributed column: Random, DataDriven, RangeId, Ntile or Timepartition. FastTransfer stops with an error if it is missing. Timepartition With the `Timepartition` method, `--distributekeycolumn` is a tuple made of a date column and time parts: `"(order_date,year)"`, `"(order_date,year,month)"`, `"(order_date,year,month,day)"` or `"(order_date,year,week)"`. See [Timepartition](#timepartition). * Windows * Linux ``` # Using a column name .\FastTransfer.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastTransfer.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastTransfer \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastTransfer \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` `--distributekeycolumn` `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `--degree` parameter to control how many parallel threads will be used for the export. `--degree`default `-4` `--degree ` ### DOP Values[​](#dop-values "Direct link to DOP Values") `n > 0`e.g. 4 Uses exactly that number of parallel threads. If greater than twice the number of CPU cores/threads, it will be downscaled to the number of available cores. `0` Automatically aligns with the number of cores (or threads if Hyper-Threading is enabled) on the machine. `n < 0`e.g. -2 Computed as `number of cores / abs(dop)`. For example, if you have 16 cores and set DOP to -2, the actual DOP will be 8. * Windows * Linux ``` # Use 8 parallel threads .\FastTransfer.exe ` ... --degree 8 ` ... # Auto-detect based on CPU cores .\FastTransfer.exe ` ... --degree 0 ` ... # Use half of available cores .\FastTransfer.exe ` ... --degree -2 ` ... ``` ``` # Use 8 parallel threads ./FastTransfer \ ... --degree 8 \ ... # Auto-detect based on CPU cores ./FastTransfer \ ... --degree 0 \ ... # Use half of available cores ./FastTransfer \ ... --degree -2 \ ... ``` ## Data Driven Query[​](#data-driven-query "Direct link to Data Driven Query") Use the `--datadrivenquery` parameter when using the DataDriven method to provide a query that returns the list of values that will be used to split the data. This allows you to filter the values that will be exported and used to split the data. `--datadrivenquery` `--datadrivenquery ""` * Windows * Linux ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` .\FastTransfer.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` ``` ./FastTransfer \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` ## Physical[​](#physical "Direct link to Physical") The `Physical` method splits the source table on the physical location of its rows. It needs no key column, and each stream reads its own part of the table. `ctid (page ranges)`![](/img/logos/postgresql.svg)PostgreSQL Technique used on PostgreSQL. Source typespgsql, pgcopy, adbc\_pgsql `ROWID ranges`![](/img/logos/oracle.svg)Oracle Technique used on Oracle. Source typesoraodp, adbc\_oracle `%%physloc%%`![](/img/logos/sqlserver.svg)SQL Server Technique used on SQL Server (rowstore and clustered columnstore). Source typesmssql, msoledbsql, adbc\_mssql `Data slices`![](/img/logos/netezza.svg)Netezza Technique used on Netezza. Source typesnzsql, nzoledb, adbc\_netezza Other sources are refused: use another method. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "postgres" ` --sourcepassword "mypassword" ` --sourcedatabase "tpch" ` --sourceschema "public" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --parallelmethod "Physical" ` --degree 8 ` --targettable "lineitem" ` --loadmode "Truncate" ``` ``` ./FastTransfer --sourceconnectiontype "pgsql" --sourceserver "localhost:5432" --sourceuser "postgres" --sourcepassword "mypassword" --sourcedatabase "tpch" --sourceschema "public" --sourcetable "lineitem" --targetconnectiontype "msbulk" --targetserver "localhost" --targettrusted --targetdatabase "tpch" --targetschema "dbo" --parallelmethod "Physical" --degree 8 --targettable "lineitem" --loadmode "Truncate" ``` Filtering the table On PostgreSQL, Oracle and SQL Server, add a `--query` to filter the table, for example `--query "SELECT * FROM public.lineitem WHERE l_shipdate >= '2025-01-01'"`. `--sourceschema` and `--sourcetable` are still required. ## DBPartition[​](#dbpartition "Direct link to DBPartition") The `DBPartition` method reads the partitions of the source table from the database catalog and transfers each partition in its own stream. The biggest partitions are transferred first, so the parallel threads stay busy until the end. How each partition is read depends on the source: `SQL Server`![](/img/logos/sqlserver.svg)mssql, msoledbsql, adbc\_mssql Partitions of the partition scheme. Read withWHERE $PARTITION.\(\) = n `PostgreSQL`![](/img/logos/postgresql.svg)pgsql, pgcopy, adbc\_pgsql Leaf partitions (sub-partitions included). Read withThe leaf table is read directly `Oracle`![](/img/logos/oracle.svg)oraodp, adbc\_oracle Partitions and sub-partitions. Read withPARTITION (...) / SUBPARTITION (...) clause `MySQL`![](/img/logos/mysql.svg)mysql Partitions and sub-partitions. Read withPARTITION (...) clause `Teradata`![](/img/logos/teradata.svg)teradata, adbc\_teradata Populated row partitions (PPI / MLPPI). Read withWHERE PARTITION = n `Db2 LUW`![](/img/logos/db2.svg)adbc\_db2 Data partitions (range partitioning). Read withA range predicate per partition * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --sourceschema "dbo" ` --sourcetable "lineitem_part" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "mypassword" ` --targetdatabase "tpch" ` --parallelmethod "DBPartition" ` --degree 8 ` --targetschema "public" ` --targettable "lineitem" ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --sourceschema "dbo" \ --sourcetable "lineitem_part" \ --targetconnectiontype "pgcopy" \ --targetserver "localhost:5432" \ --targetuser "postgres" \ --targetpassword "mypassword" \ --targetdatabase "tpch" \ --parallelmethod "DBPartition" \ --degree 8 \ --targetschema "public" \ --targettable "lineitem" \ --loadmode "Truncate" ``` This example transfers a SQL Server table partitioned by month on `l_shipdate`: each monthly partition is loaded into PostgreSQL by one of the 8 parallel threads. tip DBPartition works best when the source partitions have similar sizes. If the table is not partitioned, or the source type is not supported, FastTransfer logs a warning and falls back to `None` (a single stream): use another method, such as `Timepartition` or `Ntile`, instead. ## Timepartition[​](#timepartition "Direct link to Timepartition") The `Timepartition` method splits the data on the time parts of a date column. FastTransfer first runs a query that groups the source by these time parts and counts the rows of each group. Then it transfers each group in its own stream, biggest first. `--distributekeycolumn` is a tuple made of the date column and the time parts: `(date_column,year)` One stream per year `(date_column,year,month)` One stream per month `(date_column,year,month,day)` One stream per day `(date_column,year,week)` One stream per ISO week * The source can be a table (`--sourceschema` / `--sourcetable`) or a `--query`. With a query, the date column must be in the query output. * Rows with a NULL date are transferred in a dedicated stream. * The date bounds are sent to the source in the `yyyy-MM-dd` format. If your source needs `yyyyMMdd`, use the [FASTTRANSFER\_DATEFORMAT](/latest/documentation/environment-variables/dateformat.md) environment variable. - Windows - Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "mypassword" ` --targetdatabase "tpch" ` --query "SELECT * FROM dbo.lineitem WHERE l_shipmode = 'AIR'" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(l_shipdate,year,month)" ` --degree 8 ` --targetschema "public" ` --targettable "lineitem_air" ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "pgcopy" \ --targetserver "localhost:5432" \ --targetuser "postgres" \ --targetpassword "mypassword" \ --targetdatabase "tpch" \ --query "SELECT * FROM dbo.lineitem WHERE l_shipmode = 'AIR'" \ --parallelmethod "Timepartition" \ --distributekeycolumn "(l_shipdate,year,month)" \ --degree 8 \ --targetschema "public" \ --targettable "lineitem_air" \ --loadmode "Truncate" ``` This example transfers the `AIR` shipments month by month, with 8 parallel threads. Choosing the granularity Pick a granularity that gives several times more groups than the degree of parallelism, but not tens of thousands of small groups. For 7 years of data, `(col,year,month)` gives about 84 streams, which is a good fit for 8 to 16 threads. ## SQL Server target and sorted hint[​](#sql-server-target-and-sorted-hint "Direct link to SQL Server target and sorted hint") With a partitioned SQL Server target (`msbulk`), the `DataDriven`, `DBPartition` and `Timepartition` methods send a sorted hint on the target partition column to the bulk copy. This hint is not sent when the target table has a rowstore clustered index: SQL Server would check the order of the rows and reject the load. Set [FASTTRANSFER\_SORTEDINPUT](/latest/documentation/environment-variables/sortedinput.md) to `true` to force the hint when your source data is really sorted. ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: | | This example | | ------------------ | ---------------------------------------------------------------------------------------------- | | **Source** | A SQL Server database on localhost, a custom query on the orders table | | **Target** | A SQL Server database, loaded with BulkCopy | | **Authentication** | Trusted, for both source and target | | **Method** | `DataDriven`, on the month of the order date (`o_ordermonth` column) | | **Values** | Generated by a custom query, instead of a `SELECT DISTINCT o_ordermonth` from the source query | | **Threads** | 10 parallel threads (even though there are 12 months to export) | * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --query "select * from orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_ordermonth" ` --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" ` --degree 10 ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --query "select * from orders" \ --parallelmethod "DataDriven" \ --distributekeycolumn "o_ordermonth" \ --datadrivenquery "SELECT to_char(d, 'YYYYMM') AS month FROM generate_series(DATE '1998-01-01', DATE '1998-12-01',INTERVAL '1 month') AS d" \ --degree 10 ``` Related * [Transfer Parameters](/latest/documentation/cli/transfer_parameters.md)`--sourceschema`, `--sourcetable` and `--query` * [ADBC Connections](/latest/documentation/cli/adbc_connections.md)the parallel methods with `adbc_*` sources * [Environment variables](/latest/documentation/environment-variables/overview.md)`FASTTRANSFER_DATEFORMAT` and `FASTTRANSFER_SORTEDINPUT` --- # Source Connection Parameters FastTransfer requires connection information to access your source database where data will be extracted. This page covers all source connection-related parameters. ## Source Connection Type[​](#source-connection-type "Direct link to Source Connection Type") Specify the type of source database connection driver to use. This parameter determines how FastTransfer connects to your source database. ``` ./FastTransfer \ ... --sourceconnectiontype mssql \ ... ``` `--sourceconnectiontype` `--sourceconnectiontype "connection_type"` **Available Connection Types**, grouped by database. The types marked **ADBC** use the Arpe.io ADBC drivers (bundled; Windows x64 and Linux x64): see [ADBC Connections](/latest/documentation/cli/adbc_connections.md). The **backup** types (new in 1.1) read backup files without a database and load into ADBC targets: see [Backup Sources](/latest/documentation/cli/backup_sources.md). ![](/img/logos/sqlserver.svg)SQL Server * `mssql`SQL Server Native Client (.Net) * `msoledbsql`SQL Server OleDB * `adbc_mssql`ADBCwire-protocolSQL Server (ADBC) ![](/img/logos/postgresql.svg)PostgreSQL * `pgsql`PostgreSQL Native (.Net) * `pgcopy`PostgreSQL Copy * `adbc_pgsql`ADBCwire-protocolPostgreSQL (ADBC) ![](/img/logos/oracle.svg)Oracle * `oraodp`Oracle ODP.Net * `adbc_oracle`ADBCwire-protocolOracle (ADBC) ![](/img/logos/teradata.svg)Teradata * `teradata`Teradata (.Net) * `adbc_teradata`ADBCwire-protocolTeradata (ADBC) ![](/img/logos/netezza.svg)IBM Netezza * `nzsql`Netezza Native (.net driver) * `nzoledb`Netezza OleDB * `adbc_netezza`ADBCwire-protocolNetezza (ADBC) ![](/img/logos/db2.svg)IBM Db2 * `adbc_db2`ADBCwire-protocolDb2 for LUW (ADBC) ![](/img/logos/duckdb.svg)DuckDB * `duckdb`DuckDB * `duckdbstream`DuckDB using streaming (more memory efficient) ![](/img/logos/mysql.svg)MySQL * `mysql`MySQL ![](/img/logos/sap.svg)SAP HANA * `hana`SAP HANA (.net driver) ![](/img/logos/clickhouse.svg)ClickHouse * `clickhouse`ClickHouse ![](/img/logos/sqlserver.svg)Backup files * `backup_mssql`ADBCSQL Server backup files (`.bak`), read without SQL Server * `backup_rman`ADBCOracle RMAN backup sets, read without Oracle Generic drivers * `odbc`ODBC datasource (DSN must be configured) * `oledb`Generic OleDB datasource note An `adbc_*` source needs an `adbc_*` target. See [ADBC Connections](/latest/documentation/cli/adbc_connections.md). ## Source DSN (Data Source Name)[​](#source-dsn-data-source-name "Direct link to Source DSN (Data Source Name)") If you have chosen an ODBC connection type for the source, you must define the DSN with the `--sourcedsn` parameter, or alternatively define a connection string using `--sourceconnectstring`. ``` ./FastTransfer \ ... --sourceconnectiontype odbc \ --sourcedsn "MySourceODBCDataSource" \ ... ``` `--sourcedsn` `--sourcedsn "DSN_name"` ## Source Provider[​](#source-provider "Direct link to Source Provider") If you have chosen an OLEDB connection type for the source, you must define the OLEDB provider with the `--sourceprovider` parameter. * SQL Server (MSOLEDBSQL) * Netezza (NZOLEDB) ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider MSOLEDBSQL \ ... ``` ``` ./FastTransfer \ ... --sourceconnectiontype oledb \ --sourceprovider NZOLEDB \ ... ``` `--sourceprovider` `--sourceprovider "provider_name"` ## Source Server[​](#source-server "Direct link to Source Server") Except if you have defined a source connection string, you must define a source server (or could also be a TNS entry for Oracle). `--sourceserver` `--sourceserver "server"` ### Source Server Format Examples[​](#source-server-format-examples "Direct link to Source Server Format Examples") The source server parameter accepts different formats depending on your database: IP address or DNS name `mysourceserver.mydomain.com`Host IP address or DNS name with port number `mysourceserver.mydomain.com`Host: or ,`2433`Port IP address or DNS name with named instance `mysourceserver.mydomain.com`Host\\`myinstance`Named instance Oracle: Easy Connect string `mysourceserver.mydomain.com`Host:`1521`Port/`myinstance`Instance Oracle: TNS entry `MYTNS`TNS entry The same formats in a command **IP address or DNS name:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:2433" \ ... ``` or ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --sourceserver "mysourceserver.mydomain.com:1521/myinstance" \ ... ``` **For Oracle - TNS entry:** ``` ./FastTransfer \ ... --sourceserver "MYTNS" \ ... ``` ## Source Connection String[​](#source-connection-string "Direct link to Source Connection String") Tips You can use a connection string to define the connection to the source database. This connection string will override any other connection parameters and can be used if the other authentication modes are not enough for your case. You can use the connection string for any source connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastTransfer \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` `--sourceconnectstring` `--sourceconnectstring "connection_string"` Password Security in Logs All passwords within the `--sourceconnectstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Source Database[​](#source-database "Direct link to Source Database") Define the source database name. **Example:** ``` ./FastTransfer \ ... --sourcedatabase "AdventureWorks" \ ... ``` `--sourcedatabase` `--sourcedatabase "database_name"` Related * [Target Connection Parameters](/latest/documentation/cli/target_connection_parameters.md)where the data goes * [Authentication](/latest/documentation/cli/authentication.md)trusted connection or SQL login * [ADBC Connections](/latest/documentation/cli/adbc_connections.md)the `adbc_*` connection types --- # Target Connection Parameters FastTransfer requires connection information to access your target database where data will be transferred. This page covers all target connection-related parameters. ## Target Connection Type[​](#target-connection-type "Direct link to Target Connection Type") Specify the type of target database connection driver to use. This parameter determines how FastTransfer connects to your target database. ``` ./FastTransfer \ ... --targetconnectiontype msbulk \ ... ``` `--targetconnectiontype` `--targetconnectiontype "connection_type"` **Available Connection Types**, grouped by database. The types marked **ADBC** use the Arpe.io ADBC drivers (bundled; Windows x64 and Linux x64): see [ADBC Connections](/latest/documentation/cli/adbc_connections.md). ![](/img/logos/sqlserver.svg)SQL Server * `msbulk`SQL Server BulkCopy * `adbc_mssql`ADBCSQL Server (ADBC) ![](/img/logos/postgresql.svg)PostgreSQL * `pgcopy`PostgreSQL using COPY (binary format when the source connection type is also `pgcopy`, text format otherwise) * `pgsql`PostgreSQL Native (.Net) * `adbc_pgsql`ADBCPostgreSQL (ADBC) ![](/img/logos/oracle.svg)Oracle * `orabulk`Oracle BulkCopy * `oradirect`Oracle Direct * `adbc_oracle`ADBCOracle (ADBC) ![](/img/logos/teradata.svg)Teradata * `teradata`Teradata (.Net) * `adbc_teradata`ADBCTeradata (ADBC) ![](/img/logos/netezza.svg)IBM Netezza * `nzbulk`Netezza BulkCopy * `adbc_netezza`ADBCNetezza (ADBC) ![](/img/logos/db2.svg)IBM Db2 * `adbc_db2`ADBCDb2 for LUW (ADBC) ![](/img/logos/duckdb.svg)DuckDB * `duckdb`DuckDB ![](/img/logos/mysql.svg)MySQL * `mysqlbulk`MySQL BulkCopy ![](/img/logos/sap.svg)SAP HANA * `hanabulk`SAP HANA ![](/img/logos/clickhouse.svg)ClickHouse * `clickhousebulk`ClickHouse BulkCopy note An `adbc_*` target needs an `adbc_*` source. See [ADBC Connections](/latest/documentation/cli/adbc_connections.md). ## Target Server[​](#target-server "Direct link to Target Server") Except if you have defined a target connection string, you must define a target server (or could also be a TNS entry for Oracle). `--targetserver` `--targetserver "server"` ### Target Server Format Examples[​](#target-server-format-examples "Direct link to Target Server Format Examples") The target server parameter accepts different formats depending on your database: IP address or DNS name `mytargetserver.mydomain.com`Host IP address or DNS name with port number `mytargetserver.mydomain.com`Host: or ,`1433`Port IP address or DNS name with named instance (SQL Server) `mytargetserver.mydomain.com`Host\\`TARGETINSTANCE`Named instance Oracle: Easy Connect string `mytargetserver.mydomain.com`Host:`1521`Port/`TARGETPDB`Service DuckDB: local file path `/path/to/target.duckdb`Database file The same formats in a command **IP address or DNS name:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:3306" \ ... ``` or ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com,1433" \ ... ``` **IP address or DNS name with named instance (SQL Server):** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com\TARGETINSTANCE" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastTransfer \ ... --targetserver "mytargetserver.mydomain.com:1521/TARGETPDB" \ ... ``` **For DuckDB - Local file path:** ``` ./FastTransfer \ ... --targetconnectiontype duckdb \ --targetserver "/path/to/target.duckdb" \ ... ``` ## Target Connection String[​](#target-connection-string "Direct link to Target Connection String") Advanced Connection Options You can use a connection string to define the connection to the target database. This connection string will override any other target connection parameters and can be used if the standard authentication modes are not sufficient for your use case. You can use the target connection string for any connection type. The connection string must be enclosed in double quotes. * SQL Server * PostgreSQL ``` ./FastTransfer \ ... --targetconnectstring "Server=mytargetserver;Database=mytargetdb;User ID=TargetUser;Password=TargetPassword;Encrypt=True;TrustServerCertificate=True" ... ``` ``` ./FastTransfer \ ... --targetconnectstring "Host=mytargetserver;Database=mytargetdb;Username=TargetUser;Password=TargetPassword;SSL Mode=Require" ... ``` `--targetconnectstring` `--targetconnectstring "connection_string"` Password Security in Logs All passwords within the `--targetconnectstring` parameter are automatically hidden in all logs (Console, Files, and Database). ## Target Database[​](#target-database "Direct link to Target Database") Define the target database name. **Example:** ``` ./FastTransfer \ ... --targetdatabase "AdventureWorks" \ ... ``` `--targetdatabase` `--targetdatabase "database_name"` Matching Schema Requirements The target table must already exist with a compatible schema. FastTransfer does not automatically create target tables. Ensure column data types are compatible between source and target databases. Related * [Source Connection Parameters](/latest/documentation/cli/source_connection_parameters.md)where the data comes from * [Authentication](/latest/documentation/cli/authentication.md)trusted connection or SQL login * [Transfer Parameters](/latest/documentation/cli/transfer_parameters.md)target schema and table, load mode, column mapping --- # 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 ConfigurationWhat data to extract: a table, a query or a SQL file * Target ConfigurationWhere to load the data: target schema and table * Load BehaviorHow the data is loaded: load mode, batch size, work tables, column mapping ## Source Configuration[​](#source-configuration "Direct link to Source Configuration") These parameters define what data to extract from the source database. ### Source Schema[​](#source-schema "Direct link to Source Schema") Define the source schema name. This parameter is required by the `Physical` and `DBPartition` parallel methods. **Example:** ``` ./FastTransfer \ ... --sourceschema "public" \ ... ``` `--sourceschema` `--sourceschema "schema_name"` Required for Physical and DBPartition This parameter must be set if the `Physical` (except on Netezza) or `DBPartition` parallel method is used. ### Source Table[​](#source-table "Direct link to Source Table") Define the source table name. This parameter is required by the `Physical` and `DBPartition` parallel methods. **Example:** ``` ./FastTransfer \ ... --sourcetable "customers" \ ... ``` `--sourcetable` `--sourcetable "table_name"` Required for Physical and DBPartition This parameter must be set if the `Physical` (except on Netezza) or `DBPartition` parallel method is used. ### Query[​](#query "Direct link to Query") Plain text SQL query. Will be used instead of source table if provided. **Example:** ``` ./FastTransfer \ ... --query "SELECT * FROM customers WHERE country = 'USA'" \ ... ``` `--query` `--query "sql_query"` Tips When using a custom query, FastTransfer will execute this query on the source database instead of reading from a table directly. ### File Input[​](#file-input "Direct link to 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" \ ... ``` `--fileinput` `--fileinput "file_path"` File Requirement The specified file must exist and contain a valid SQL query. ## Target Configuration[​](#target-configuration "Direct link to Target Configuration") These parameters define where to load the data in the target database. * Target Schema * Target Table ### Target Schema[​](#target-schema "Direct link to Target Schema") Define the target schema name. **Example:** ``` ./FastTransfer \ ... --targetschema "dbo" \ ... ``` `--targetschema` `--targetschema "schema_name"` ### Target Table[​](#target-table "Direct link to Target Table") Define the target table name. **Example:** ``` ./FastTransfer \ ... --targettable "customers" \ ... ``` `--targettable` `--targettable "table_name"` ## Load Behavior[​](#load-behavior "Direct link to Load Behavior") These parameters control how data is loaded into the target table. ### Load Mode[​](#load-mode "Direct link to Load Mode") Load mode of the data into the target table. **Example:** ``` ./FastTransfer \ ... --loadmode Truncate \ ... ``` `--loadmode`default `Append` `--loadmode "mode"` **Allowed Values:** `Append`Default Append data to the target table. `Truncate` Truncate the target table before loading. `Create`New in 1.1 Create the target table from the source when it does not exist, then load it. When the table exists, truncate it and load it. `Replace` is an alias of `Create`. ### Infer Data Type[​](#infer-data-type "Direct link to Infer Data Type") With `--loadmode Create`, how the column types of the created table are derived. It is ignored, with a warning, with another load mode. ``` ./FastTransfer \ ... --loadmode Create \ --inferdatatype best \ ... ``` `--inferdatatype`default `fast` `--inferdatatype "mode"` **Allowed Values:** `fast`Default Types from the source metadata. No row is read. `allvarchar` Every column as text, converted on the source. `best` The source data is profiled to find the strictest type (Oracle sources, and CSV, Parquet and JSON files). See [Creating the Target Table](/latest/documentation/cli/create_target_table.md) for the type rules, the guards and the environment variables. ### Batch Size[​](#batch-size "Direct link to Batch Size") Batch Size for BulkCopy operations. **Example:** ``` ./FastTransfer \ ... --batchsize 500000 \ ... ``` `--batchsize`default `1048576` `--batchsize "size"` Performance Tuning 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. ADBC Ignored with the `adbc_*` connection types: the drivers size their own batches. ### Use Work Tables[​](#use-work-tables "Direct link to Use Work Tables") Switch that will activate the usage of intermediate work tables. Useful in some rare cases. **Example:** ``` ./FastTransfer \ ... --useworktables \ ... ``` `--useworktables` Switch, no value. When to Use This option is useful in rare scenarios where direct loading causes issues. Work tables act as an intermediate staging area. ADBC Not available with an `adbc_*` target. ### Map Method[​](#map-method "Direct link to Map Method") Mapping method for the columns between source and target. **Example:** ``` ./FastTransfer \ ... --mapmethod Name \ ... ``` `--mapmethod`default `Position` `--mapmethod "method"` **Allowed Values:** `Position`Default Map columns by their position in the source and target tables. `Name` Map columns by their name (case insensitive) and ignore missing columns. Column Mapping 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. Related * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md)split the transfer over several threads * [Target Connection Parameters](/latest/documentation/cli/target_connection_parameters.md)the target database * [ADBC Connections](/latest/documentation/cli/adbc_connections.md)batch size and work tables with `adbc_*` types --- # Operating Systems FastTransfer supports Windows, Linux, and macOS across different architectures. ## Supported Operating Systems[​](#supported-operating-systems "Direct link to Supported Operating Systems") * Windows * Linux | OS | Versions | Architectures | Supported | | ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------- | --------- | | Nano Server | 2025, 2022, 2019 | x64 | Supported | | Windows | 11 24H2 (IoT), 11 24H2 (E), 11 24H2, 11 23H2, 11 22H2 (E), 10 22H2, 10 21H2 (E), 10 21H2 (IoT), 10 1809 (E), 10 1607 (E) | x64 | Supported | | Windows Server | 2025, 23H2, 2022, 2019, 2016, 2012-R2, 2012 | x64 | Supported | | Windows Server Core | 2025, 2022, 2019, 2016, 2012-R2, 2012 | x64 | Supported | | OS | Versions | Architectures | Supported | | ------------------------ | -------------------------- | ------------- | --------- | | Alpine | 3.21, 3.20, 3.19, 3.18 | Arm64, x64 | Supported | | Azure Linux | 3.0 | Arm64, x64 | Supported | | CentOS Stream | 10, 9 | Arm64, x64 | Supported | | Debian | 12 | Arm64, x64 | Supported | | Fedora | 41, 40 | Arm64, x64 | Supported | | openSUSE Leap | 15.6 | Arm64, x64 | Supported | | Red Hat Enterprise Linux | 10, 9, 8 | Arm64, x64 | Supported | | SUSE Enterprise Linux | 15.6 | Arm64, x64 | Supported | | Ubuntu | 24.10, 24.04, 22.04, 20.04 | Arm64, x64 | Supported | --- # Database Sources & Platforms FastTransfer supports a wide range of database systems across different platforms. The ADBC connection types (new in 1.0) are described in [ADBC Connections](/latest/documentation/cli/adbc_connections.md), and the backup sources (new in 1.1) in [Backup Sources](/latest/documentation/cli/backup_sources.md). ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") | Source | Windows AMD64 | Linux AMD64 | Linux ARM64 | | ------------------------------------------------------------------------------------------------- | ------------- | ------------- | ------------- | | **ADBC** (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_db2`, `adbc_teradata`, `adbc_netezza`) | Supported | Supported | Not supported | | **Backup files** (`backup_mssql`, `backup_rman`), to an ADBC target | Supported | Supported | Not supported | | **ClickHouse** | Supported | Supported | Supported | | **DuckDB** | Supported | Supported | Supported | | **MySQL** | Supported | Supported | Supported | | **Netezza** | Supported | Supported | Supported | | **ODBC** | Supported | Supported | Supported | | **OLEDB** | Supported | Not supported | Not supported | | **Oracle** | Supported | Supported | Supported | | **PostgreSQL** | Supported | Supported | Supported | | **SQL Server** | Supported | Supported | Supported | | **SAP Hana** | Supported | Supported | Not supported | | **Teradata** | Supported | Supported | Not supported | ## Supported Targets[​](#supported-targets "Direct link to Supported Targets") | Target | Windows AMD64 | Linux AMD64 | Linux ARM64 | | ------------------------------------------------------------------------------------------------- | ------------- | ------------- | ------------- | | **ADBC** (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_db2`, `adbc_teradata`, `adbc_netezza`) | Supported | Supported | Not supported | | **ClickHouse** | Supported | Supported | Supported | | **DuckDB** | Supported | Supported | Supported | | **MySQL** | Supported | Supported | Supported | | **Netezza** | Supported | Supported | Supported | | **ODBC** | Not supported | Not supported | Not supported | | **OLEDB** | Not supported | Not supported | Not supported | | **Oracle** | Supported | Supported | Supported | | **PostgreSQL** | Supported | Supported | Supported | | **SQL Server** | Supported | Supported | Supported | | **SAP Hana** | Supported | Supported | Not supported | | **Teradata** | Supported | Supported | Not supported | Good to know The ADBC connection types (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_db2`, `adbc_teradata`, `adbc_netezza`) are not supported on **Linux ARM64**, as source or as target. --- # FASTTRANSFER\_DATEFORMAT Sets the format of the date bounds that the [Timepartition](/latest/documentation/cli/parallel_parameters.md#timepartition) parallel method sends to the source database. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | ------------------- | ------------------------ | | **Parallel Method** | `Timepartition` | | **Default Value** | `yyyy-MM-dd` | | **Valid Values** | `yyyy-MM-dd`, `yyyyMMdd` | | **Since Version** | 0.18 | ## Description[​](#description "Direct link to Description") With the `Timepartition` method, each parallel stream reads a range of dates, for example: ``` WHERE (l_shipdate >= '1996-07-01' AND l_shipdate < '1996-08-01') ``` The dates are written as text literals and converted by the source database. Most databases read `yyyy-MM-dd`. If your source needs the compact format, set `FASTTRANSFER_DATEFORMAT=yyyyMMdd`: ``` WHERE (l_shipdate >= '19960701' AND l_shipdate < '19960801') ``` For Oracle sources (`oraodp`), FastTransfer wraps the bounds in `TO_DATE('...', 'YYYY-MM-DD')` (or `'YYYYMMDD'`), so no implicit conversion is needed. warning Only the two values above are accepted. With the `Timepartition` method, any other value stops FastTransfer with an error before the transfer starts. ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Use the compact date format $env:FASTTRANSFER_DATEFORMAT = "yyyyMMdd" # Run FastTransfer .\FastTransfer.exe --parallelmethod Timepartition --distributekeycolumn "(order_date,year,month)" ... ``` **Temporary (current session):** ``` # Use the compact date format export FASTTRANSFER_DATEFORMAT=yyyyMMdd # Run FastTransfer ./FastTransfer --parallelmethod Timepartition --distributekeycolumn "(order_date,year,month)" ... ``` --- # FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES Controls the timeout for bulk load operations when using `msbulk` or `orabulk` target connection types. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | -------------------- | --------------------------------- | | **Connection Types** | `msbulk`, `orabulk` | | **Default Value** | 60 minutes | | **Valid Values** | Any positive integer (in minutes) | | **Since Version** | 0.17 | ## Description[​](#description "Direct link to Description") Sets the maximum time (in minutes) that FastTransfer will wait for a bulk load operation to complete. This is particularly useful for large data transfers that may exceed the default 60-minute timeout. When transferring large volumes of data, the bulk load operation can take longer than the default timeout. This variable allows you to extend the timeout to accommodate your specific data transfer requirements. ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Set timeout to 120 minutes set FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` **Temporary (current session):** ``` # Set timeout to 120 minutes export FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` --- # Environment Variables Overview FastTransfer 0.17+ supports environment variables to control runtime behavior for specific connection types. ## Available Environment Variables[​](#available-environment-variables "Direct link to Available Environment Variables") | Variable Name | Target Types | Default | Description | | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | -------------- | ---------------------------------------------------------------------------------------- | | [FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES](/latest/documentation/environment-variables/loadsteptimeout.md) | `msbulk`, `orabulk` | 60 | Controls the timeout for bulk load operations | | [FASTTRANSFER\_SORTEDINPUT](/latest/documentation/environment-variables/sortedinput.md) | `msbulk` | `false` | Forces the sorted input hint for SQL Server bulk copy operations | | [FASTTRANSFER\_DATEFORMAT](/latest/documentation/environment-variables/dateformat.md) | Any source (`Timepartition` method) | `yyyy-MM-dd` | Format of the date bounds sent to the source by the `Timepartition` method | | `FASTTRANSFER_ADBC_SSLMODE` | `adbc_pgsql`, `adbc_netezza` (source and target) | Driver default | TLS mode of the connection: `disable`, `prefer`, `require`, `verify-ca` or `verify-full` | ## Creating the Target Table (1.1)[​](#creating-the-target-table-11 "Direct link to Creating the Target Table (1.1)") Used with `--loadmode Create`. See [Creating the Target Table](/latest/documentation/cli/create_target_table.md#environment-variables). | Variable Name | Default | Description | | ------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------ | | `FASTTRANSFER_INFER_DEFAULT_STRING_MAXSIZE` | `256` | Length of a text column with no declared length, or `max` for the unbounded type | | `FASTTRANSFER_INFER_STRING_MARGIN` | `0` | Margin added to a length measured by `--inferdatatype best`: a number of characters or a factor from `2x` to `10x` | | `FASTTRANSFER_INFER_SAMPLE_PERCENT` | `100` | Percentage of the source read by `--inferdatatype best` | ## Backup Sources (1.1)[​](#backup-sources-11 "Direct link to Backup Sources (1.1)") Used with `backup_mssql` and `backup_rman`. See [Backup Sources](/latest/documentation/cli/backup_sources.md). | Variable Name | Default | Description | | ----------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------- | | `FASTTRANSFER_BACKUP_RESTORE_MODE` | Strict | `best_effort` reads the newest usable version instead of stopping on a backup that cannot be used | | `FASTTRANSFER_BACKUP_RESTORE_POINT` | Latest | `full` reads the last full (or level 0) backup and ignores the differential and incremental ones | | `FASTTRANSFER_INDEX_DIR` | User cache directory | Directory of the backup indexes | --- # FASTTRANSFER\_SORTEDINPUT Forces the sorted input hint for SQL Server bulk copy operations when using the `msbulk` target connection type. ## Overview[​](#overview "Direct link to Overview") | Property | Value | | -------------------- | --------------- | | **Connection Types** | `msbulk` | | **Default Value** | `false` | | **Valid Values** | `true`, `false` | | **Since Version** | 0.17 | ## Description[​](#description "Direct link to Description") When set to `true`, FastTransfer instructs SQL Server's bulk copy API to treat incoming data as sorted according to the clustered index. This can significantly improve performance when: * The source data is already sorted by the target table's clustered index columns * The target table has a clustered index * You want to minimize page splits and fragmentation Partitioned targets The hint is applied on the partition column of a partitioned target table. ## With DataDriven, DBPartition and Timepartition[​](#with-datadriven-dbpartition-and-timepartition "Direct link to With DataDriven, DBPartition and Timepartition") With a partitioned SQL Server target, the `DataDriven`, `DBPartition` and `Timepartition` parallel methods send the sorted hint automatically, without this variable. Each parallel stream holds a slice of the data, but the rows are not sorted inside a stream. So, since 0.18, the hint is **not** sent when the target table has a rowstore clustered index. SQL Server would check the order and stop the load with this error: ``` Cannot bulk load. The bulk data stream was incorrectly specified as sorted or the data violates a uniqueness constraint imposed by the target table. ``` Heap and clustered columnstore targets still get the hint. If your source data is really sorted on the target partition column, for example with an `ORDER BY` in the `--query`, set `FASTTRANSFER_SORTEDINPUT=true` to force the hint. ## Usage[​](#usage "Direct link to Usage") * Windows * Linux **Temporary (current session):** ``` # Enable sorted input hint set FASTTRANSFER_SORTEDINPUT=true # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` **Temporary (current session):** ``` # Enable sorted input hint export FASTTRANSFER_SORTEDINPUT=true # Run FastTransfer ./FastTransfer --targetconnectiontype msbulk ... ``` --- # ADBC Examples with the `adbc_*` connection types, new in FastTransfer 1.0. Both ends use ADBC, and the target table must exist. See [ADBC Connections](/latest/documentation/cli/adbc_connections.md) for the rules. ## PostgreSQL to SQL Server[​](#postgresql-to-sql-server "Direct link to PostgreSQL to SQL Server") Parallel transfer with the `Physical` method (ctid on PostgreSQL), integrated authentication on the target. ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_pgsql" ` --sourceserver "pgserver:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ## Oracle to PostgreSQL[​](#oracle-to-postgresql "Direct link to Oracle to PostgreSQL") Parallel transfer with the `RangeId` method on the order key. The Oracle table name is in upper case, as stored. ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_oracle" ` --sourceserver "oraserver:1521/ORCLPDB1" ` --sourceuser "TPCH" ` --sourcepassword "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --targetconnectiontype "adbc_pgsql" ` --targetserver "pgserver:5432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "RangeId" ` --distributekeycolumn "O_ORDERKEY" ` --degree 8 ` --loadmode "Truncate" ``` ## Db2 to SQL Server[​](#db2-to-sql-server "Direct link to Db2 to SQL Server") Db2 for LUW is available as an ADBC source and target. Here a range-partitioned Db2 table is transferred with `DBPartition`: one stream per data partition. ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_db2" ` --sourceserver "db2server:50000" ` --sourcedatabase "TPCH" ` --sourceuser "db2inst1" ` --sourcepassword "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "LINEITEM_PART" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DBPartition" ` --degree 8 ` --loadmode "Truncate" ``` ## Teradata to SQL Server[​](#teradata-to-sql-server "Direct link to Teradata to SQL Server") Parallel transfer with the `Random` method. ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_teradata" ` --sourceserver "tdserver" ` --sourcedatabase "TPCH" ` --sourceuser "dbc" ` --sourcepassword "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "O_ORDERKEY" ` --degree 4 ` --loadmode "Truncate" ``` ## SQL Server to Oracle with connection strings[​](#sql-server-to-oracle-with-connection-strings "Direct link to SQL Server to Oracle with connection strings") The connection strings use the drivers' `uri=` format. Special characters in a password must be percent-encoded (`@` → `%40`). ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_mssql" ` --sourceconnectstring "uri=sqlserver://FastUser:FastPassword@sqlserver:1433/?database=tpch" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetconnectiontype "adbc_oracle" ` --targetconnectstring "uri=oracle://TPCH:FastPassword@oraserver:1521/ORCLPDB1" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ## Linux[​](#linux "Direct link to Linux") The same commands work on Linux x64, with `./FastTransfer` and `\` as the line continuation: ``` ./FastTransfer \ --sourceconnectiontype "adbc_pgsql" \ --sourceserver "pgserver:5432" \ --sourcedatabase "tpch" \ --sourceuser "FastUser" \ --sourcepassword "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --targetconnectiontype "adbc_pgsql" \ --targetserver "pgtarget:5432" \ --targetdatabase "tpch" \ --targetuser "FastUser" \ --targetpassword "FastPassword" \ --targetschema "public" \ --targettable "orders" \ --parallelmethod "Physical" \ --degree 8 \ --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Advanced Scenarios Advanced use cases including DuckDB integration, ClickHouse, SAP HANA, Teradata, and other complex transfer scenarios. ## DuckDB Integration[​](#duckdb-integration "Direct link to DuckDB Integration") DuckDB provides powerful data transformation capabilities with FastTransfer. ### DuckDB Memory - Parquet with Nested Fields to MSSQL[​](#duckdb-memory---parquet-with-nested-fields-to-mssql "Direct link to DuckDB Memory - Parquet with Nested Fields to MSSQL") Process complex nested JSON/Parquet files with DuckDB's in-memory engine: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdb" ` --sourceserver ":memory:" ` --query "select * EXCLUDE(Risques, Interlocuteurs),unnest(interlocuteurs,recursive := true ) from (select day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) from read_parquet('D:\CLIENTS\ENEDIS\BI4ALL\CHANTIER\**\*.parquet', hive_partitioning=true)) t_row_unest" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "ENDSBI4ALL" ` --targetschema "bi4all" ` --targettable "DuckChantiers_hpart" ` --parallelmethod "DataDriven" ` --distributekeycolumn "day" ` --loadmode "Truncate" ` --degree 8 ``` DuckDB Memory Mode Use `:memory:` as the server to process data without persisting a DuckDB database file. Perfect for ETL transformations. ### DuckDB Stream - Multiple CSV Files with DataDriven[​](#duckdb-stream---multiple-csv-files-with-datadriven "Direct link to DuckDB Stream - Multiple CSV Files with DataDriven") Process multiple CSV files in parallel using filename as distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - Single Large CSV with Random Method[​](#duckdb-stream---single-large-csv-with-random-method "Direct link to DuckDB Stream - Single Large CSV with Random Method") Process a single large CSV file with parallel Random distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributekeycolumn "l_orderkey" ` --loadmode "Truncate" ` --degree 16 ``` ### DuckDB Stream - CSV with Column Slicing[​](#duckdb-stream---csv-with-column-slicing "Direct link to DuckDB Stream - CSV with Column Slicing") Use calculated column slices for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --loadmode "Truncate" ` --degree 13 ``` ### DuckDB Stream - CSV with Custom Format[​](#duckdb-stream---csv-with-custom-format "Direct link to DuckDB Stream - CSV with Custom Format") Specify CSV format parameters when auto-detection isn't sufficient: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --loadmode "Truncate" ` --degree 12 ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributekeycolumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## ClickHouse Integration[​](#clickhouse-integration "Direct link to ClickHouse Integration") ### PostgreSQL to ClickHouse - Single-threaded[​](#postgresql-to-clickhouse---single-threaded "Direct link to PostgreSQL to ClickHouse - Single-threaded") Transfer data to ClickHouse without parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ### PostgreSQL to ClickHouse - Parallel with Physical[​](#postgresql-to-clickhouse---parallel-with-physical "Direct link to PostgreSQL to ClickHouse - Parallel with Physical") High-performance transfer using the Physical method (ctid on PostgreSQL): ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL - Multiple Methods[​](#clickhouse-to-postgresql---multiple-methods "Direct link to ClickHouse to PostgreSQL - Multiple Methods") Transfer from ClickHouse to PostgreSQL using various distribution methods: * Single-threaded * RangeId Method * DataDriven Method ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## SAP HANA Integration[​](#sap-hana-integration "Direct link to SAP HANA Integration") ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data to SAP HANA using the HANA bulk loader: **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Physical:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer from SAP HANA to PostgreSQL: ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## Teradata Integration[​](#teradata-integration "Direct link to Teradata Integration") ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data to Teradata with the parallel Physical method: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## Netezza Integration[​](#netezza-integration "Direct link to Netezza Integration") Transfer from Netezza to MSSQL using DATASLICEID for optimal parallelism: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "DATASLICEID" ` --degree 6 ``` Netezza DATASLICEID Use DATASLICEID as the distribution column to leverage Netezza's internal data distribution for optimal parallel extraction. ## Advanced SQL Server Techniques[​](#advanced-sql-server-techniques "Direct link to Advanced SQL Server Techniques") ### Using Partition Functions[​](#using-partition-functions "Direct link to Using Partition Functions") Leverage SQL Server partition functions for efficient parallel transfers: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` Partition Function Syntax Use `` `$PARTITION.FunctionName(ColumnName) `` to reference a partition function. The backtick (`` ` ``) escapes the dollar sign in PowerShell. ### Using the Physical Method on SQL Server[​](#using-the-physical-method-on-sql-server "Direct link to Using the Physical Method on SQL Server") Use physical location for parallel distribution (readonly tables only): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physical" ` --degree 10 ` --mapmethod "Name" ``` Physical Method on SQL Server On SQL Server, the Physical method (Physloc) should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Dynamic Degree with Negative Values[​](#dynamic-degree-with-negative-values "Direct link to Dynamic Degree with Negative Values") Use negative degree values to automatically calculate parallelism based on CPU cores: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree -4 ` --loadmode "Truncate" ``` Dynamic Degree A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value. With 16 cores, `-4` results in 4 parallel threads. ### Batch Size Optimization[​](#batch-size-optimization "Direct link to Batch Size Optimization") Adjust batch size based on connection type for optimal performance: * **MSSQL (msbulk)**: 10,000 - 100,000 rows * **PostgreSQL (pgcopy)**: 10,000 - 50,000 rows * **Oracle (orabulk)**: 100,000 - 500,000 rows * **Oracle (oradirect)**: 1,000 - 10,000 rows * **ClickHouse**: 10,000 - 1,000,000 rows * **SAP HANA**: 5,000 - 10,000 rows ### Debug Logging[​](#debug-logging "Direct link to Debug Logging") Enable detailed logging for troubleshooting: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` Debug Mode Use `--loglevel "debug"` to see detailed execution steps, connection information, and query generation details for troubleshooting. ## Using Input Files[​](#using-input-files "Direct link to Using Input Files") Process SQL queries from external files: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --fileinput "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Physical" ` --degree 6 ` --loadmode "Truncate" ``` ## Column Mapping[​](#column-mapping "Direct link to Column Mapping") ### Map by Name[​](#map-by-name "Direct link to Map by Name") Map source columns to target columns by name with `--mapmethod "Name"` (the default is `Position`): ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physical" ` --degree 10 ` --mapmethod "Name" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # CSV Import FastTransfer leverages a powerful `read_csv` function and syntax to efficiently import CSV files into any supported database. This provides advanced features like automatic schema detection, parallel processing, and support for complex CSV formats. FastTransfer offers several advantages for CSV processing: * **Automatic schema detection** - No need to manually define column types * **High performance** - Optimized CSV parser with parallel reading * **Flexible formatting** - Handle various delimiters, quotes, and escape characters * **Multi-file support** - Process multiple CSV files with glob patterns * **In-memory processing** - No need for a persistent database file ## Basic CSV Import[​](#basic-csv-import "Direct link to Basic CSV Import") ### Single Small CSV File[​](#single-small-csv-file "Direct link to Single Small CSV File") Import a single CSV file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Using :memory: The `:memory:` server parameter tells FastTransfer to operate in-memory without creating a database file. This is perfect for one-time CSV imports. This does not mean that FastTransfer will load all the file in memory. The data are streamed and memory usage stay low. ### Medium CSV File - Single Thread[​](#medium-csv-file---single-thread "Direct link to Medium CSV File - Single Thread") Import a medium-sized CSV file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel CSV Import[​](#parallel-csv-import "Direct link to Parallel CSV Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(id/10000)::int` divides the ID column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large CSV[​](#random-method-on-large-csv "Direct link to Random Method on Large CSV") Process a large CSV file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Random" ` --distributekeycolumn "l_orderkey" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\temp\lineitem*.CSV') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(l_orderkey/5000000)::int" ` --datadrivenquery "select distinct (l_orderkey/5000000)::int l_orderkey_group from read_csv('D:\temp\lineitem*.CSV') rcsv" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 13 ``` ## Multiple CSV Files[​](#multiple-csv-files "Direct link to Multiple CSV Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple CSV files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_csv()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Advanced CSV Formats[​](#advanced-csv-formats "Direct link to Advanced CSV Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") When automatic detection doesn't work, specify the CSV format explicitly: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv', auto_detect=false, delim=',', quote='""', escape='""', new_line='\n', skip=0, comment='', header=true, columns={'id': 'BIGINT', 'url': 'VARCHAR', 'title': 'VARCHAR', 'text': 'VARCHAR', 'title_vector': 'VARCHAR', 'content_vector': 'VARCHAR', 'vector_id': 'BIGINT'}) rcsv" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "articles" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` **Format Parameters:** * `auto_detect=false` - Disable automatic schema detection * `delim=','` - Field delimiter (comma) * `quote='"'` - Quote character for fields containing delimiters * `escape='"'` - Escape character for quotes within quoted fields * `new_line='\n'` - Line terminator * `skip=0` - Number of lines to skip at the start * `comment=''` - Character indicating comment lines to ignore * `header=true` - First line contains column names * `columns={...}` - Explicit column names and types ### CSV with Vector Data to SQL Server[​](#csv-with-vector-data-to-sql-server "Direct link to CSV with Vector Data to SQL Server") Import CSV containing vector embeddings as VARCHAR: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id,url,title,text,title_vector::varchar tv,content_vector::varchar cv,vector_id from read_csv('D:\OpenData\wikidata\vector_database_wikipedia_articles_embedded.csv') limit 100" ` --targetconnectiontype "msbulk" ` --targetserver "localhost\SS2025" ` --targettrusted ` --targetdatabase "wikipedia" ` --targetschema "dbo" ` --targettable "wikipedia_articles_embeddings_as_vector" ` --mapmethod "Name" ` --loadmode "Append" ``` ## Common CSV Scenarios[​](#common-csv-scenarios "Direct link to Common CSV Scenarios") ### Tab-Delimited Files[​](#tab-delimited-files "Direct link to Tab-Delimited Files") For tab-separated values (TSV): ``` --query "SELECT * FROM read_csv('file.tsv', delim='\t')" ``` ### CSV with Different Encodings[​](#csv-with-different-encodings "Direct link to CSV with Different Encodings") ``` --query "SELECT * FROM read_csv('file.csv', encoding='UTF-8')" ``` ### CSV with Custom Quote Character[​](#csv-with-custom-quote-character "Direct link to CSV with Custom Quote Character") ``` --query "SELECT * FROM read_csv('file.csv', quote='''', escape='''')" ``` ### CSV Without Headers[​](#csv-without-headers "Direct link to CSV Without Headers") ``` --query "SELECT * FROM read_csv('file.csv', header=false, columns={'col1': 'VARCHAR', 'col2': 'INTEGER'})" ``` ### Skip Header Lines[​](#skip-header-lines "Direct link to Skip Header Lines") ``` --query "SELECT * FROM read_csv('file.csv', skip=3)" ``` --- # JSON Import FastTransfer leverages a powerful `read_json` function to efficiently import JSON files into any supported database. It provides advanced features like automatic schema detection, nested structure handling, and support for both JSON objects and JSON Lines (JSONL/NDJSON) formats. FastTransfer offers several advantages for JSON processing: * **Automatic schema detection** - Automatically infers column types from JSON structure * **High performance** - Optimized JSON parser with parallel reading * **Nested structure support** - Handle complex nested objects and arrays * **Multiple formats** - Support for JSON, JSON Lines (JSONL), and NDJSON * **Array flattening** - Use `unnest()` to flatten nested arrays * **In-memory processing** - No need for a persistent database file ## Basic JSON Import[​](#basic-json-import "Direct link to Basic JSON Import") ### Single JSON File[​](#single-json-file "Direct link to Single JSON File") Import a single JSON file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\users.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "AppDB" ` --targetschema "dbo" ` --targettable "users" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` JSON Formats FastTransfer automatically detects the JSON format: * **JSON Array**: `[{...}, {...}]` - Array of objects * **JSON Lines (JSONL)**: One JSON object per line * **NDJSON**: Newline-delimited JSON objects ### JSON Lines File - Single Thread[​](#json-lines-file---single-thread "Direct link to JSON Lines File - Single Thread") Import a JSON Lines file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\events.jsonl', format='newline_delimited')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "analytics" ` --targetschema "public" ` --targettable "events" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel JSON Import[​](#parallel-json-import "Direct link to Parallel JSON Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\orders.jsonl')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(order_id/10000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(order_id/10000)::int` divides the order\_id column by 10,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large JSON File[​](#random-method-on-large-json-file "Direct link to Random Method on Large JSON File") Process a large JSON Lines file with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\transactions.jsonl')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "Random" ` --distributekeycolumn "transaction_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\logs.jsonl') rjson" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(event_timestamp::date)" ` --datadrivenquery "select distinct event_timestamp::date from read_json('D:\DATA\logs.jsonl') rjson" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple JSON Files[​](#multiple-json-files "Direct link to Multiple JSON Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple JSON files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_json('D:\DATA\daily\*.jsonl', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_metrics" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.jsonl')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_json()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Nested JSON Structures[​](#nested-json-structures "Direct link to Nested JSON Structures") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested JSON structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, user.name as user_name, user.email as user_email, order_date, total_amount FROM read_json('D:\DATA\orders.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within JSON objects: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(items, recursive := true) FROM read_json('D:\DATA\orders_with_items.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structure[​](#complex-nested-structure "Direct link to Complex Nested Structure") Handle deeply nested JSON with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, address.street as street, address.city as city, address.country as country, contacts[1] as primary_contact FROM read_json('D:\DATA\customers.json')" ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "crm" ` --targetuser "crmuser" ` --targetpassword "YourPassword" ` --targetschema "crm" ` --targettable "customers" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Advanced JSON Formats[​](#advanced-json-formats "Direct link to Advanced JSON Formats") ### Explicit Format Specification[​](#explicit-format-specification "Direct link to Explicit Format Specification") Specify JSON format explicitly when needed: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_json('D:\DATA\data.json', format='array', maximum_depth=10)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "raw_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` **Format Parameters:** * `format='array'` - JSON array of objects * `format='newline_delimited'` - JSON Lines (JSONL/NDJSON) * `format='auto'` - Automatic detection (default) * `maximum_depth` - Maximum nesting depth to parse * `records='true'` - Parse records format * `columns={...}` - Explicit column names and types ### Compressed JSON Files[​](#compressed-json-files "Direct link to Compressed JSON Files") Import gzip-compressed JSON files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_json('D:\DATA\logs.jsonl.gz', compression='gzip')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "compressed_logs" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Compression Support DuckDB automatically detects compression from file extensions: * `.gz` - Gzip compression * `.json.gz` or `.jsonl.gz` - Compressed JSON files ## JSON Type Conversions[​](#json-type-conversions "Direct link to JSON Type Conversions") ### Converting JSON Fields[​](#converting-json-fields "Direct link to Converting JSON Fields") Transform JSON data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, CAST(amount AS DECIMAL(10,2)) as amount, status FROM read_json('D:\DATA\payments.json')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "payments" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### JSON String to Array[​](#json-string-to-array "Direct link to JSON String to Array") Convert JSON string fields to arrays: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, name, json_extract(tags, '$') as tags_array FROM read_json('D:\DATA\products.json')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "catalog" ` --targetschema "public" ` --targettable "products" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # MySQL Examples Examples for transferring data from and to MySQL databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") MySQL transfers support: * **mysql**: Standard MySQL protocol for reading * **mysqlbulk**: MySQL bulk loader for high-performance target loading ## MySQL to MSSQL - Single-threaded Transfer[​](#mysql-to-mssql---single-threaded-transfer "Direct link to MySQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with Random Method[​](#mysql-to-mssql---parallel-transfer-with-random-method "Direct link to MySQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mysql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MySQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values. **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 10 ` --loadmode Truncate ``` **Using partitioned table with year column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from tpch.orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --loadmode Truncate ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## MSSQL to MySQL - Single-threaded Transfer[​](#mssql-to-mysql---single-threaded-transfer "Direct link to MSSQL to MySQL - Single-threaded Transfer") Transfer data from SQL Server to MySQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Parallel Transfer with Random Method[​](#mssql-to-mysql---parallel-transfer-with-random-method "Direct link to MSSQL to MySQL - Parallel Transfer with Random Method") Transfer with Random distribution. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Using Partition Function[​](#mssql-to-mysql---using-partition-function "Direct link to MSSQL to MySQL - Using Partition Function") Transfer with DataDriven method using SQL Server partition function. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to MySQL - Adding Computed Column[​](#mssql-to-mysql---adding-computed-column "Direct link to MSSQL to MySQL - Adding Computed Column") Transfer with additional computed column and DataDriven method. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select *,null as o_orderdate_year from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders_part" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## Using ODBC Connection to MySQL[​](#using-odbc-connection-to-mysql "Direct link to Using ODBC Connection to MySQL") Transfer using ODBC DSN for MySQL connection. ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMySQLTPCH" ` --sourcedatabase "tpch" ` --query "select * from tpch.orders_part LIMIT 10" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_part" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for transferring data from and to Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle transfers support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended for source) * **orabulk**: Oracle Bulk Loader for high-performance target loading * **oradirect**: Oracle Direct Path for target loading * **odbc**: Using ODBC DSN ## Oracle to MSSQL - Single-threaded Transfer[​](#oracle-to-mssql---single-threaded-transfer "Direct link to Oracle to MSSQL - Single-threaded Transfer") Simple transfer without parallelization. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "localhost:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ``` ## Oracle to MSSQL - Parallel Transfer with the Physical Method[​](#oracle-to-mssql---parallel-transfer-with-the-physical-method "Direct link to Oracle to MSSQL - Parallel Transfer with the Physical Method") Oracle-specific parallel transfer using physical row identifier (ROWID). Oracle-Specific On Oracle, the Physical method uses the physical row identifier (ROWID) for parallel data distribution. This is very efficient for full table transfers. ``` .\FastTransfer.exe ` --sourceconnectiontype "oraodp" ` --sourceserver "LOCALHOST:1521/ORCLPDB" ` --sourcedatabase "ORCLPDB" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS_FLAT" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --loadmode "Truncate" ` --degree 12 ``` ## PostgreSQL to Oracle - Using orabulk (Bulk Loader)[​](#postgresql-to-oracle---using-orabulk-bulk-loader "Direct link to PostgreSQL to Oracle - Using orabulk (Bulk Loader)") Transfer data from PostgreSQL to Oracle using Oracle bulk loader. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` ## PostgreSQL to Oracle - Using oradirect (Direct Path)[​](#postgresql-to-oracle---using-oradirect-direct-path "Direct link to PostgreSQL to Oracle - Using oradirect (Direct Path)") Transfer data from PostgreSQL to Oracle using Oracle direct path loading. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 1000 ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## MySQL to Oracle - Using oradirect[​](#mysql-to-oracle---using-oradirect "Direct link to MySQL to Oracle - Using oradirect") Transfer data from MySQL to Oracle using direct path loading. ``` .\FastTransfer.exe ` --sourceconnectiontype "mysql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "FREEPDB1" ` --query "select * from tpch.orders_part" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS_PART" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate_year" ` --degree 10 ` --batchsize 10000 ` --loadmode Truncate ``` ## Using ODBC Connection to Oracle[​](#using-odbc-connection-to-oracle "Direct link to Using ODBC Connection to Oracle") Transfer using ODBC DSN for Oracle connection. **To MSSQL - single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNORA23CFREEPDB1" ` --sourcedatabase "FREEPDB1" ` --query "select * from TPCH_IN.ORDERS FETCH NEXT 10 ROWS ONLY" ` --sourceuser "TPCH_IN" ` --sourcepassword "TPCH_IN" ` --sourceschema "TPCH_IN" ` --sourcetable "ORDERS" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for transferring data from and to ClickHouse, SAP HANA, Netezza, Teradata, and DuckDB databases. ## ClickHouse[​](#clickhouse "Direct link to ClickHouse") Transfer data from and to ClickHouse database. ### PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse using the bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with Physical:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ### ClickHouse to PostgreSQL[​](#clickhouse-to-postgresql "Direct link to ClickHouse to PostgreSQL") Transfer data from ClickHouse to PostgreSQL with various parallelization methods. **Single-threaded:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --query "select * from default.orders limit 100000" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **Parallel with RangeId:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "RangeId" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Ntile:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Ntile" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with Random:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "O_ORDERKEY" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Parallel with DataDriven:** ``` .\FastTransfer.exe ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders_empty" ` --sourceconnectiontype "clickhouse" ` --sourceserver "localhost:8123" ` --sourcedatabase "default" ` --sourceuser "default" ` --sourcepassword "YourPassword" ` --sourceschema "default" ` --sourcetable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year(o_orderdate)" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 100000 ``` ClickHouse Connection Types * **clickhouse**: Standard connection for reading * **clickhousebulk**: High-performance bulk loader for writing ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Transfer data from and to SAP HANA database. ### PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA using the HANA bulk loader. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **Parallel with Physical:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Batch Size For SAP HANA, use batch sizes between 5,000 and 10,000 rows for optimal performance. ### SAP HANA to PostgreSQL[​](#sap-hana-to-postgresql "Direct link to SAP HANA to PostgreSQL") Transfer data from SAP HANA to PostgreSQL. ``` .\FastTransfer.exe ` --targetconnectiontype "pgsql" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --sourceconnectiontype "hana" ` --sourceserver "hxehost:39015" ` --sourcedatabase "" ` --sourceuser "SYSTEM" ` --sourcepassword "YourPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 5000 ``` SAP HANA Connection Types * **hana**: Standard connection for reading from SAP HANA * **hanabulk**: Bulk loader for writing to SAP HANA ## Netezza[​](#netezza "Direct link to Netezza") Transfer data from Netezza using the DATASLICEID for optimal parallelism. ### Netezza to MSSQL[​](#netezza-to-mssql "Direct link to Netezza to MSSQL") Transfer from Netezza to SQL Server using DataDriven method on DATASLICEID: ``` .\FastTransfer.exe ` --sourceconnectiontype "nzsql" ` --sourceserver "NZSOURCESYS" ` --sourcedatabase "TPCH" ` --sourceuser "TPCH" ` --sourcepassword "TPCH" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "DATASLICEID" ` --degree 6 ` --loadmode Truncate ``` Netezza DATASLICEID The DATASLICEID column in Netezza represents the internal data distribution. Using it as the distribution key provides optimal parallel extraction by leveraging Netezza's data placement. ## Teradata[​](#teradata "Direct link to Teradata") Transfer data from and to Teradata database. ### PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata: ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ### Teradata to MSSQL[​](#teradata-to-mssql "Direct link to Teradata to MSSQL") Transfer data from Teradata to SQL Server: ``` .\FastTransfer.exe ` --sourceconnectiontype "teradata" ` --sourceserver "192.168.239.129:1025" ` --sourcedatabase "TPCH" ` --sourceuser "UTPCH" ` --sourcepassword "UTPCH" ` --sourceschema "TPCH" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "dbo" ` --targettable "orders_15M_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode "Truncate" ``` ## DuckDB[​](#duckdb "Direct link to DuckDB") Transfer data from and to DuckDB database files or in-memory. ### MSSQL to DuckDB File[​](#mssql-to-duckdb-file "Direct link to MSSQL to DuckDB File") Transfer from SQL Server to a DuckDB database file: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ### DuckDB File to PostgreSQL[​](#duckdb-file-to-postgresql "Direct link to DuckDB File to PostgreSQL") Transfer from a DuckDB database file to PostgreSQL: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver "D:\OpenData\wikidata\dbpedia_14.duckdb" ` --sourceschema "main" ` --sourcetable "dbpedia_14" ` --query "SELECT label, title, content, split, content_word_count, chunk, content_n_chunks, chunk_index, chunk_word_count, chunk_embedding::text FROM dbpedia_14" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:35432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "wikipedia" ` --targetschema "public" ` --targettable "dbpedia_14" ` --parallelmethod "Ntile" ` --distributekeycolumn "chunk_index" ` --degree 14 ` --loadmode "Truncate" ``` ### DuckDB Stream - CSV Files[​](#duckdb-stream---csv-files "Direct link to DuckDB Stream - CSV Files") Process CSV files using DuckDB's in-memory engine and load into SQL Server: **Single CSV file:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_csv('D:\DATA\arborescence.csv') rcsv" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "Edilians" ` --targetschema "dbo" ` --targettable "arborescence" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Multiple CSV files with parallel processing:** ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_csv('D:\temp\FastBCP_lineitem_Extract\lineitem*.CSV', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\temp\FastBCP_lineitem_Extract\*.CSV')" ` --loadmode "Truncate" ` --degree 16 ``` DuckDB Connection Types * **duckdb**: Direct connection to DuckDB file * **duckdbstream**: Streaming connection for in-memory processing or file-based operations * Use `:memory:` as server for in-memory processing tip Build your command with the [Wizard](/latest/wizard.md) --- # Parquet Import FastTransfer leverages a powerful `read_parquet` function to efficiently import Parquet files into any supported database. Parquet is a columnar storage format optimized for analytics, and it provides excellent performance and feature support for reading Parquet files. FastTransfer offers several advantages for Parquet processing: * **Columnar access** - Read only the columns you need for optimal performance * **Predicate pushdown** - Filter data at the file level before loading * **Automatic schema detection** - Column types preserved from Parquet metadata * **High performance** - Optimized Parquet reader with parallel processing * **Compression support** - Handles all Parquet compression codecs (Snappy, Gzip, LZ4, Zstd) * **Nested structure support** - Handle complex nested objects, arrays, and maps * **Multi-file support** - Process multiple Parquet files with glob patterns * **Partition support** - Hive-style partitioning for efficient data access ## Basic Parquet Import[​](#basic-parquet-import "Direct link to Basic Parquet Import") ### Single Parquet File[​](#single-parquet-file "Direct link to Single Parquet File") Import a single Parquet file using streaming in-memory mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\sales.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "SalesDB" ` --targetschema "dbo" ` --targettable "sales" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Column Selection For optimal performance, select only the columns you need: ``` --query "SELECT customer_id, order_date, total_amount FROM read_parquet('file.parquet')" ``` This reduces I/O and memory usage significantly. ### Multiple Parquet Files - Single Thread[​](#multiple-parquet-files---single-thread "Direct link to Multiple Parquet Files - Single Thread") Import multiple Parquet files using glob pattern: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\orders\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "warehouse" ` --targetschema "public" ` --targettable "orders" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ## Parallel Parquet Import[​](#parallel-parquet-import "Direct link to Parallel Parquet Import") ### DataDriven Method with Calculated Column[​](#datadriven-method-with-calculated-column "Direct link to DataDriven Method with Calculated Column") Use a calculated distribution key for parallel processing: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * from read_parquet('D:\DATA\transactions\*.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "finance" ` --targetschema "public" ` --targettable "transactions" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(transaction_id/100000)::int" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` Distribution Key Calculation The expression `(transaction_id/100000)::int` divides the ID by 100,000 and casts to integer, creating balanced data chunks for parallel processing. ### Random Method on Large Parquet Files[​](#random-method-on-large-parquet-files "Direct link to Random Method on Large Parquet Files") Process large Parquet files with Random parallelization: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "events" ` --parallelmethod "Random" ` --distributekeycolumn "event_id" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` ### DataDriven Method with Custom Query[​](#datadriven-method-with-custom-query "Direct link to DataDriven Method with Custom Query") Use a custom DataDriven query to calculate optimal distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\logs\*.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "logging" ` --targetschema "dbo" ` --targettable "application_logs" ` --parallelmethod "DataDriven" ` --distributekeycolumn "CAST(event_date AS VARCHAR)" ` --datadrivenquery "select distinct CAST(event_date AS VARCHAR) from read_parquet('D:\DATA\logs\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 10 ``` ## Multiple Parquet Files[​](#multiple-parquet-files "Direct link to Multiple Parquet Files") ### Parallel Processing by Filename[​](#parallel-processing-by-filename "Direct link to Parallel Processing by Filename") Process multiple Parquet files in parallel using the filename as the distribution key: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * exclude filename FROM read_parquet('D:\DATA\daily\*.parquet', filename=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "reports" ` --targetschema "dbo" ` --targettable "daily_reports" ` --parallelmethod "DataDriven" ` --distributekeycolumn "filename" ` --datadrivenquery "select file from glob('D:\DATA\daily\*.parquet')" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 16 ``` Filename as Distribution Key * Use `filename=true` in `read_parquet()` to add a filename column * Use `exclude filename` to remove it from the final output * The `glob()` function returns the list of files for parallel processing * Each thread processes one or more complete files ## Hive-Style Partitioning[​](#hive-style-partitioning "Direct link to Hive-Style Partitioning") ### Reading Partitioned Data[​](#reading-partitioned-data "Direct link to Reading Partitioned Data") Read Parquet files with Hive-style partitioning: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\partitioned\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "warehouse" ` --targetschema "dbo" ` --targettable "partitioned_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Hive Partitioning For data organized like `year=2024/month=01/data.parquet`, DuckDB automatically extracts partition columns: * Partition columns become regular columns in the result * Use `hive_partitioning=true` to enable this feature * Excellent for partition pruning and efficient queries ### Parallel Processing on Partitioned Data[​](#parallel-processing-on-partitioned-data "Direct link to Parallel Processing on Partitioned Data") Use partition columns for parallel distribution: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "sales_data" ` --parallelmethod "DataDriven" ` --distributekeycolumn "year || '-' || month" ` --datadrivenquery "select distinct year || '-' || month as partition_key from read_parquet('D:\DATA\sales\year=*/month=*\*.parquet', hive_partitioning=true)" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 12 ``` ## Nested Structures in Parquet[​](#nested-structures-in-parquet "Direct link to Nested Structures in Parquet") ### Accessing Nested Fields[​](#accessing-nested-fields "Direct link to Accessing Nested Fields") Extract specific fields from nested Parquet structures: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, customer.name as customer_name, customer.email as customer_email, order_date, total FROM read_parquet('D:\DATA\orders.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "sales" ` --targetschema "dbo" ` --targettable "orders_flat" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Flattening Nested Arrays with UNNEST[​](#flattening-nested-arrays-with-unnest "Direct link to Flattening Nested Arrays with UNNEST") Flatten arrays within Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT order_id, order_date, unnest(line_items, recursive := true) FROM read_parquet('D:\DATA\orders_nested.parquet')" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "order_items" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` ### Complex Nested Structures[​](#complex-nested-structures "Direct link to Complex Nested Structures") Handle complex nested Parquet data with multiple levels: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT day, unnest(contexte_chantier, recursive := true), unnest(detail_chantier, recursive := true) FROM read_parquet('D:\DATA\chantier\**\*.parquet', hive_partitioning=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "construction" ` --targetschema "dbo" ` --targettable "site_details" ` --parallelmethod "DataDriven" ` --distributekeycolumn "day" ` --mapmethod "Name" ` --loadmode "Truncate" ` --degree 8 ``` ## Advanced Filtering[​](#advanced-filtering "Direct link to Advanced Filtering") ### Predicate Pushdown[​](#predicate-pushdown "Direct link to Predicate Pushdown") Apply filters to reduce data read from Parquet files: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet('D:\DATA\events\*.parquet') WHERE event_date >= '2024-01-01' AND event_type = 'purchase'" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "analytics" ` --targetschema "dbo" ` --targettable "purchases" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Append" ``` Predicate Pushdown Benefits DuckDB pushes filters down to the Parquet reader, which: * Skips entire row groups that don't match the filter * Reduces memory usage * Significantly improves performance for selective queries * Works best with filters on partition columns or columns with statistics ### Column Pruning with Selection[​](#column-pruning-with-selection "Direct link to Column Pruning with Selection") Select only needed columns for maximum performance: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT customer_id, order_date, total_amount, status FROM read_parquet('D:\DATA\orders_large.parquet') WHERE order_date >= '2024-01-01'" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetuser "postgres" ` --targetpassword "YourPassword" ` --targetdatabase "sales" ` --targetschema "public" ` --targettable "recent_orders" ` --parallelmethod "Random" ` --distributekeycolumn "customer_id" ` --mapmethod "Name" ` --loadmode "Append" ` --degree 12 ``` ## Schema and Metadata[​](#schema-and-metadata "Direct link to Schema and Metadata") ### Union Multiple Parquet Files[​](#union-multiple-parquet-files "Direct link to Union Multiple Parquet Files") Union Parquet files with compatible schemas: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT * FROM read_parquet(['D:\DATA\2023\*.parquet', 'D:\DATA\2024\*.parquet'], union_by_name=true)" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "archive" ` --targetschema "dbo" ` --targettable "historical_data" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` Union By Name `union_by_name=true` allows reading files with different column orders or optional columns: * Columns are matched by name instead of position * Missing columns are filled with NULL * Extra columns are ignored * Useful for schema evolution scenarios ### Type Conversion[​](#type-conversion "Direct link to Type Conversion") Convert Parquet data types during import: ``` .\FastTransfer.exe ` --sourceconnectiontype "duckdbstream" ` --sourceserver ":memory:" ` --query "SELECT id, CAST(created_at AS TIMESTAMP) as created_at, amount::DECIMAL(18,2) as amount, status FROM read_parquet('D:\DATA\transactions.parquet')" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "finance" ` --targetschema "dbo" ` --targettable "transactions" ` --parallelmethod "None" ` --mapmethod "Name" ` --loadmode "Truncate" ``` --- # PostgreSQL Examples Comprehensive examples for transferring data from and to PostgreSQL databases using native connectors. ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL transfers support multiple connection types: * **pgsql**: Standard PostgreSQL protocol for reading/writing * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk transfers). Data is copied in binary format when both the source and the target use `pgcopy`, and in text format otherwise ## PostgreSQL to MSSQL - Single-threaded Transfer[​](#postgresql-to-mssql---single-threaded-transfer "Direct link to PostgreSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization using a SQL query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## PostgreSQL to MSSQL - Using Schema and Table[​](#postgresql-to-mssql---using-schema-and-table "Direct link to PostgreSQL to MSSQL - Using Schema and Table") Transfer specifying schema and table names instead of a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#postgresql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on a calculated column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "FLOOR(o_orderkey/10000000)" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Parallel Transfer with the Physical Method[​](#postgresql-to-mssql---parallel-transfer-with-the-physical-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with the Physical Method") PostgreSQL-specific parallel transfer using physical row identifier (ctid). PostgreSQL-Specific On PostgreSQL, the Physical method uses the physical row identifier (ctid) for parallel data distribution. This is very efficient for full table transfers. **For orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ``` **For lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "lineitem" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ` --loglevel "debug" ``` ## PostgreSQL to MSSQL - Parallel Transfer with Random Method[​](#postgresql-to-mssql---parallel-transfer-with-random-method "Direct link to PostgreSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --query "select * from tpch_10.orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode Truncate ``` ## PostgreSQL to MSSQL - Dynamic Degree[​](#postgresql-to-mssql---dynamic-degree "Direct link to PostgreSQL to MSSQL - Dynamic Degree") Use negative degree values to automatically determine parallelism. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## PostgreSQL to MSSQL - Using Input File[​](#postgresql-to-mssql---using-input-file "Direct link to PostgreSQL to MSSQL - Using Input File") Transfer using a SQL query from an external file. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourcedatabase "tpch" ` --fileinput "..\..\..\..\FastTransfert\samples\select_orders.sql" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_2" ` --parallelmethod "Physical" ` --degree 6 ` --loadmode "Truncate" ``` ## PostgreSQL to PostgreSQL - Using Query[​](#postgresql-to-postgresql---using-query "Direct link to PostgreSQL to PostgreSQL - Using Query") Transfer between PostgreSQL databases using a query. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --query "select * from ""tpch_10"".orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## PostgreSQL to PostgreSQL - Using the Physical Method[​](#postgresql-to-postgresql---using-the-physical-method "Direct link to PostgreSQL to PostgreSQL - Using the Physical Method") Transfer between PostgreSQL databases with the parallel Physical method (ctid). * Using pgcopy (COPY) * Using pgsql (INSERT UNNEST) ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 6 ` --loadmode "Truncate" ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgsql" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to PostgreSQL - Using pgcopy Binary[​](#postgresql-to-postgresql---using-pgcopy-binary "Direct link to PostgreSQL to PostgreSQL - Using pgcopy Binary") High-performance transfer using PostgreSQL binary COPY protocol: binary format is used because both the source and the target connection types are `pgcopy`. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **Parallel with Physical - orders table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:15432" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ``` **Parallel with Physical - lineitem table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgcopy" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "pgcopy" ` --targetserver "localhost" ` --targetdatabase "tpch_import" ` --sourceschema "tpch_10" ` --sourcetable "lineitem" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "lineitem" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ``` ## PostgreSQL to Oracle[​](#postgresql-to-oracle "Direct link to PostgreSQL to Oracle") Transfer data from PostgreSQL to Oracle databases. * Using orabulk (Bulk Load) * Using oradirect (Direct Path) **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 100000 ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "orabulk" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 12 ` --loadmode "Truncate" ` --batchsize 100000 ``` **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders limit 10005" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 1000 ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 10 ` --loadmode "Truncate" ` --batchsize 10000 ``` **With DataDriven method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:5432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "oradirect" ` --targetserver "localhost:1521/ORCLPDB" ` --targetdatabase "ORCLPDB" ` --query "select * from tpch_10.orders" ` --targetuser "TPCH_IN" ` --targetpassword "TPCH_IN" ` --targetschema "TPCH_IN" ` --targettable "ORDERS" ` --parallelmethod "DataDriven" ` --distributekeycolumn "(EXTRACT('Year' FROM o_orderdate))" ` --degree 7 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL to SAP HANA[​](#postgresql-to-sap-hana "Direct link to PostgreSQL to SAP HANA") Transfer data from PostgreSQL to SAP HANA. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "None" ` --loadmode "Truncate" ` --batchsize 5000 ` --query "select * from tpch_10.orders limit 100000" ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "hanabulk" ` --targetserver "hxehost:39015" ` --targetdatabase "" ` --targetuser "SYSTEM" ` --targetpassword "YourPassword" ` --targetschema "TPCH" ` --targettable "ORDERS" ` --parallelmethod "Physical" ` --degree 4 ` --loadmode "Truncate" ` --batchsize 5000 ``` ## PostgreSQL to ClickHouse[​](#postgresql-to-clickhouse "Direct link to PostgreSQL to ClickHouse") Transfer data from PostgreSQL to ClickHouse. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --query "select * from tpch_10.orders limit 100000" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Append" ` --batchsize 10000 ``` **With Physical parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "clickhousebulk" ` --targetserver "localhost:8123" ` --targetdatabase "default" ` --targetuser "default" ` --targetpassword "YourPassword" ` --targetschema "default" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 1000000 ``` ## PostgreSQL to Teradata[​](#postgresql-to-teradata "Direct link to PostgreSQL to Teradata") Transfer data from PostgreSQL to Teradata. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:15432" ` --sourcedatabase "tpch" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --targetconnectiontype "teradata" ` --targetserver "192.168.239.129:1025" ` --targetdatabase "TPCH" ` --targetuser "UTPCH" ` --targetpassword "UTPCH" ` --targetschema "TPCH" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 15 ` --loadmode "Truncate" ` --batchsize 10000 ``` ## PostgreSQL (Hyper File) to MSSQL[​](#postgresql-hyper-file-to-mssql "Direct link to PostgreSQL (Hyper File) to MSSQL") Transfer data from a Tableau Hyper file (using pgsql driver) to MSSQL. ``` .\FastTransfer.exe ` --sourceconnectiontype "pgsql" ` --sourceserver "localhost:8095" ` --sourcedatabase "D:\OpenData\TPCH\data\hyper\tpch_sf10.hyper" ` --sourceuser "tableau_internal_user" ` --sourcepassword "" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from ""ORDERS""" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for transferring data from and to SQL Server databases. ## MSSQL to MSSQL - Single-threaded Transfer[​](#mssql-to-mssql---single-threaded-transfer "Direct link to MSSQL to MSSQL - Single-threaded Transfer") Simple transfer without parallelization for smaller datasets. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with Random Method[​](#mssql-to-mssql---parallel-transfer-with-random-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Random Method") Transfer using Random distribution based on a key column. * Windows Authentication * SQL Authentication ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` ## MSSQL to MSSQL - Parallel Transfer with RangeId Method[​](#mssql-to-mssql---parallel-transfer-with-rangeid-method "Direct link to MSSQL to MSSQL - Parallel Transfer with RangeId Method") Transfer using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Using query with filter:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with Ntile Method[​](#mssql-to-mssql---parallel-transfer-with-ntile-method "Direct link to MSSQL to MSSQL - Parallel Transfer with Ntile Method") Transfer using Ntile distribution for evenly distributed chunks. **Full table transfer:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --degree 12 ` --loadmode Truncate ``` **Filtered transfer with date column:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders WHERE o_orderdate between '19950101' and '19951231'" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_1995" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --degree 12 ` --loadmode Append ``` ## MSSQL to MSSQL - Parallel Transfer with DataDriven Method[​](#mssql-to-mssql---parallel-transfer-with-datadriven-method "Direct link to MSSQL to MSSQL - Parallel Transfer with DataDriven Method") Transfer using DataDriven distribution based on distinct values of a column or partition function. **Using partition function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch10_collation_bin2_copy" ` --query "select * from orders_part" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 10 ` --loadmode "Truncate" ``` **Using year function:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --query "select * from dbo.orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "DataDriven" ` --distributekeycolumn "YEAR(o_orderdate)" ` --degree 7 ` --loadmode Append ``` ## MSSQL to MSSQL - Using the Physical Method[​](#mssql-to-mssql---using-the-physical-method "Direct link to MSSQL to MSSQL - Using the Physical Method") Transfer using physical location (should only be used on readonly/snapshot databases). warning On SQL Server, the Physical method (Physloc) should only be used on readonly tables, databases, or snapshots, as it relies on physical page locations that may change during writes. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcetrusted ` --sourcedatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders_15M" ` --targetconnectiontype "msbulk" ` --targetserver "localhost,11433" ` --targettrusted ` --targetdatabase "tpch_test" ` --targetschema "dbo" ` --targettable "orders_ccsi" ` --loadmode "Truncate" ` --batchsize 120000 ` --parallelmethod "Physical" ` --degree 10 ` --mapmethod "Name" ``` ## MSSQL to PostgreSQL[​](#mssql-to-postgresql "Direct link to MSSQL to PostgreSQL") Transfer data from SQL Server to PostgreSQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "pgcopy" ` --targetserver "localhost:5432" ` --targetdatabase "tpch_import" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch_10" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 10 ` --loadmode "Truncate" ``` ## MSSQL to MySQL[​](#mssql-to-mysql "Direct link to MSSQL to MySQL") Transfer data from SQL Server to MySQL. **Without parallelization:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` **With Random method:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree 6 ` --loadmode "Truncate" ``` **With DataDriven method on partitioned table:** ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "mysqlbulk" ` --targetserver "localhost" ` --targetdatabase "tpch" ` --query "select * from dbo.orders_part" ` --targetuser "FastUser" ` --targetpassword "FastPassword" ` --targetschema "tpch" ` --targettable "orders" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$PARTITION.PF_DATE(o_orderdate)" ` --degree 7 ` --loadmode "Truncate" ``` ## MSSQL to DuckDB[​](#mssql-to-duckdb "Direct link to MSSQL to DuckDB") Transfer data from SQL Server to DuckDB. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch10_collation_bin2" ` --sourceschema "dbo" ` --sourcetable "orders_1M" ` --sourcetrusted ` --targetconnectiontype "duckdb" ` --targetdatabase "tpch10_insert" ` --targetschema "tpch10" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ` --targetserver "D:\OpenData\TPCH\data\10\duckdb\tpch10_insert.duckdb" ``` ## Using ODBC Connection[​](#using-odbc-connection "Direct link to Using ODBC Connection") Transfer using ODBC DSN for connection. **Single-threaded:** ``` .\FastTransfer.exe ` --sourceconnectiontype "odbc" ` --sourcedsn "DSNMsSQLTPCH" ` --sourcedatabase "tpch_test" ` --query "select top 1000 * from dbo.orders" ` --sourceuser "FastUser" ` --sourcepassword "FastPassword" ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --loadmode "Truncate" ``` ## Dynamic Degree[​](#dynamic-degree "Direct link to Dynamic Degree") Use negative degree values to automatically determine parallelism based on CPU cores. ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "Random" ` --distributekeycolumn "o_orderkey" ` --degree -4 ` --loadmode "Truncate" ``` info A negative degree value (e.g., `-4`) divides the number of CPU cores by its absolute value to determine the actual degree of parallelism. With 16 cores, `-4` results in 4 parallel threads. ## Load Modes[​](#load-modes "Direct link to Load Modes") FastTransfer supports different load modes for the target table: * `Truncate`: Truncates the target table before loading * `Append`: Appends data to existing table (default) Example with Append mode: ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch_test" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_test" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders_copy" ` --parallelmethod "None" ` --loadmode "Append" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: Samples on this page * [FastTransfer\_​Settings.json](#fasttransfer_settingsjson-for-windows)Console + Files stored on Windows machine + MSSQL * [FastTransfer\_​Settings\_​Linux\_​Console\_​Files.json](#fasttransfer_settings_linux_console_filesjson)Linux with Console + Daily rolling Files * [FastTransfer\_​Settings\_​Map\_​for\_​Windows.json](#fasttransfer_settings_map_for_windowsjson)Console and dynamically named log file targets (Windows) * [FastTransfer\_​Settings\_​Map\_​for\_​Linux\_​and\_​Container.json](#fasttransfer_settings_map_for_linux_and_containerjson)Console and dynamically named log file targets (Linux/Container) * [FastTransfer\_​Settings\_​Log\_​to\_​PGSQL.json](#fasttransfer_settings_log_to_pgsqljson--console--postgresql-log-database)Console + PostgreSQL log database ## FastTransfer\_Settings.json for Windows[​](#fasttransfer_settingsjson-for-windows "Direct link to FastTransfer_Settings.json for Windows") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastTransferLogs": "Server=localhost;Database=FastTransferLogs;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs\\FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastTransferLogs", "sinkOptionsSection": { "TableName": "EventLogs", "SchemaName": "dbo", "DatabaseName": "FastTransferLogs", "AutoCreateSqlDatabase": true, "AutoCreateSqlTable": true, "BatchPostingLimit": 50, "BatchPeriod": "0.00:00:05", "UseSqlBulkCopy": false }, "restrictedToMinimumLevel": "Information", "columnOptionsSection": { "disableTriggers": true, "clusteredColumnstoreIndex": false, "removeStandardColumns": [ "Id", "MessageTemplate", "Properties", "Exception" ], "additionalColumns": [ { "ColumnName": "ErrorSummary", "PropertyName": "rootcauseMessage", "DataType": "nvarchar", "DataLength": 4000 }, { "ColumnName": "EventType", "PropertyName": "EventType", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "FullTargetName", "PropertyName": "fulltargetname", "DataType": "nvarchar", "DataLength": 400 }, { "ColumnName": "Status", "PropertyName": "finalStatus", "DataType": "int" }, { "ColumnName": "Rows", "PropertyName": "loadedRows", "DataType": "bigint" }, { "ColumnName": "Columns", "PropertyName": "loadedCols", "DataType": "int" }, { "ColumnName": "ElaspedMs", "PropertyName": "loadElapsedMs", "DataType": "bigint" }, { "ColumnName": "MachineName", "PropertyName": "MachineName", "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "Application", "PropertyName": "Application", "DataType": "varchar", "DataLength": 50 }, { "ColumnName": "ProcessId", "PropertyName": "ProcessId", "DataType": "int" }, { "ColumnName": "ThreadId", "PropertyName": "ThreadId", "DataType": "int" }, { "ColumnName": "RunId", "PropertyName": "runid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 256 }, { "ColumnName": "TraceId", "PropertyName": "traceid", "nonClusteredIndex": true, "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "SpanId", "PropertyName": "SpanId", "DataType": "varchar", "DataLength": 100 }, { "ColumnName": "Release", "PropertyName": "release", "DataType": "varchar", "DataLength": 32 }, { "ColumnName": "EnvironmentUserName", "PropertyName": "EnvironmentUserName", "DataType": "varchar", "DataLength": 200 }, { "ColumnName": "InputParameters", "PropertyName": "InputParameters", "DataType": "varchar", "DataLength": 8000 } ], "level": { "columnName": "Severity", "storeAsEnum": false, "DataType": "varchar", "DataLength": 50 }, "timeStamp": { "columnName": "EventTimestamp", "nonClusteredIndex": true, "convertToUtc": false }, "logEvent": { "excludeAdditionalProperties": false, "excludeStandardColumns": true }, "message": { "columnName": "EventMsg", "DataType": "varchar", "DataLength": 8000 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Linux\_Console\_Files.json[​](#fasttransfer_settings_linux_console_filesjson "Direct link to FastTransfer_Settings_Linux_Console_Files.json") For Linux with Console + Daily rolling Files: ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "fileSizeLimitBytes": 4194304, "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "path": "Logs/FastTransfer_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Windows.json[​](#fasttransfer_settings_map_for_windowsjson "Direct link to FastTransfer_Settings_Map_for_Windows.json") For Console and dynamically named log file targets (Windows): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "C:\\temp\\Logs\\{logdate}\\{sourcedatabase}\\{sourcetable}\\FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fasttransfer_settings_map_for_linux_and_containerjson "Direct link to FastTransfer_Settings_Map_for_Linux_and_Container.json") For Console and dynamically named log file targets (Linux/Container): ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` ## FastTransfer\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fasttransfer_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastTransfer_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastTransferLogs": "Host=localhost;Port=15432;Database=fastlogs;Username=FastUser;Password=FastPassword" }, "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.PostgreSQL.Alternative", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "PostgreSQL", "Args": { "connectionString": "PG_FastTransferLogs", "tableName": "event_logs", "schemaName": "public", "needAutoCreateTable": true, "needAutoCreateSchema": false, "restrictedToMinimumLevel": "Information", "useCopy": false, "loggerColumnOptions": { "event_timestamp": { "Name": "Timestamp", "Format": "", "WriteMethod": "Timestamp", "NpgsqlDbType": "TimestampTz", "Order": 1 }, "event_msg": { "Name": "RenderedMessage", "Format": "", "WriteMethod": "RenderedMessage", "NpgsqlDbType": "Text", "Order": 2 }, "Level": { "Name": "LevelAsText", "Order": 3 }, "LevelInt": { "Name": "Level", "Order": 4 } }, "loggerPropertyColumnOptions": { "error_summary": { "Name": "rootcauseMessage", "Format": "{0}", "WriteMethod": "ToString", "NpgsqlDbType": "Text", "Order": 5 }, "source_database": { "Name": "SourceDatabase", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 6 }, "source_schema": { "Name": "SourceSchema", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 7 }, "source_table": { "Name": "SourceTable", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 8 }, "output_directory": { "Name": "OutputDirectory", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 9 }, "full_target_name": { "Name": "fulltargetname", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 10 }, "application": { "Name": "Application", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 11 }, "status": { "Name": "finalStatus", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 12 }, "rows": { "Name": "loadedRows", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Numeric", "Order": 13 }, "columns": { "Name": "loadedCols", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 14 }, "elapsed_ms": { "Name": "loadElapsedMs", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Numeric", "Order": 15 }, "machine_name": { "Name": "MachineName", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 16 }, "process_id": { "Name": "ProcessId", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 17 }, "thread_id": { "Name": "ThreadId", "Format": "0", "WriteMethod": "ToString", "NpgsqlDbType": "Integer", "Order": 18 }, "run_id": { "Name": "runid", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 19 }, "trace_id": { "Name": "traceid", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 20 }, "span_id": { "Name": "SpanId", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 21 }, "release": { "Name": "release", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 22 }, "environment_user_name": { "Name": "EnvironmentUserName", "Format": "", "WriteMethod": "Raw", "NpgsqlDbType": "Text", "Order": 23 }, "input_parameters": { "Name": "InputParameters", "WriteMethod": "Raw", "NpgsqlDbType": "Json", "Order": 24 } } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` --- # Log Database FastTransfer supports logging to a **Microsoft SQL Server** or **PostgreSQL** database. To enable database logging, configure the log database connection string in a settings file: * The default settings file is `FastTransfer_Settings.json` * You can specify a custom settings file using the `--settingsfile` parameter warning **In case the database is not reachable, FastTransfer will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastTransfer_Settings.json` file to something else (like `FastTransfer_Settings.json.save`) and FastTransfer will use the console log only. Configuration examples Complete configuration examples for both MSSQL and PostgreSQL * [Console + Files + MSSQL](/latest/documentation/logging/examples.md#fasttransfer_settingsjson-for-windows)`FastTransfer_Settings.json`, Windows * [Console + PostgreSQL log database](/latest/documentation/logging/examples.md#fasttransfer_settings_log_to_pgsqljson--console--postgresql-log-database)`FastTransfer_Settings_Log_to_PGSQL.json` --- # Log Files Names Mapping using variables You can use variables to define the log file path and files names in the `FastTransfer_Settings.json` file. In the `WriteTo` array, you can use a `Map` like this: ``` { "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "Map", "Args": { "keyPropertyName": "TraceId", "defaultKey": "no-trace", "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/{sourcetable}/FastTransfer-log-{filename}-{logtimestamp}-{traceid}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8", "retainedFileCountLimit": 100 } } ] } } ] } ``` The available variables to customize the log path or log file name are: `{logdate}` Current date in yyyy-MM-dd format `{logtimestamp}` Timestamp of the log entry `{sourcedatabase}` Name of the source database `{sourceschema}` Name of the source schema `{sourcetable}` Name of the source table `{filename}` Name of the file being processed `{runid}` Run identifier provided in the command line `{traceid}` Unique identifier generated at runtime Complete configuration examples For both Windows and Linux * [FastTransfer\_​Settings\_​Map\_​for\_​Windows.json](/latest/documentation/logging/examples.md#fasttransfer_settings_map_for_windowsjson)Windows * [FastTransfer\_​Settings\_​Map\_​for\_​Linux\_​and\_​Container.json](/latest/documentation/logging/examples.md#fasttransfer_settings_map_for_linux_and_containerjson)Linux/Container --- # Log Levels FastTransfer uses Serilog for logging and supports multiple log levels to control the verbosity of output. You can set the loglevel using the `--loglevel` parameter followed by a value in the list of available log levels. ## Available Log Levels[​](#available-log-levels "Direct link to Available Log Levels") VERBOSE `Verbose`: most detailed tracing information. Use case: deep troubleshooting. DEBUG `Debug`: detailed diagnostic information. Use case: development and troubleshooting. INFOdefault `Information`: general informational messages. Use case: normal operation. WARNING `Warning`: potentially harmful situations. Use case: issues that don't prevent operation. ERROR `Error`: error events that allow continuation. Use case: operation failures. FATAL `Fatal`: severe errors causing termination. Use case: fatal application errors. note The `--loglevel` parameter accepts `verbose`, `debug`, `information`, `warning` and `error`. `Fatal` can only be set through the `MinimumLevel` property of the settings file. ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastTransfer_Settings.json` file by modifying the `MinimumLevel` property: ``` { "Serilog": { "MinimumLevel": "Debug", "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}" } }, { "Name": "File", "Args": { "path": "Logs\\FastTransfer_.json", "rollingInterval": "Day" } } ] } } ``` --- # Logging Overview ## Parameter Logs targets using FastTransfer\_Settings.json[​](#parameter-logs-targets-using-fasttransfer_settingsjson "Direct link to Parameter Logs targets using FastTransfer_Settings.json") FastTransfer can log information in 3 modes: Log targets * [Console](/latest/documentation/logging/logs-level.md)log levels and console output * [Database](/latest/documentation/logging/log-database.md)MSSQL and PostgreSQL only * [File (or Map)](/latest/documentation/logging/log-files-names-mapping-using-variables.md)log file paths and names built from variables Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastTransfer_Settings.json` file. By default, if no custom path is provided, FastTransfer looks for the settings file in: * the current directory (the working directory) * the same directory where the FastTransfer executable is located (the executable directory). If this file is not present, FastTransfer will use the console log only. You can specify a custom path to the settings file using the `--settingsfile` parameter. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "mssql" ` --sourceserver "localhost" ` --sourcedatabase "tpch" ` --sourcetrusted ` --targetconnectiontype "msbulk" ` --targetserver "localhost" ` --targetdatabase "tpch_copy" ` --query "select * from orders" ` --targettrusted ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "None" ` --settingsfile "D:\logs\config\FastTransfer_Settings.json" ``` ``` ./FastTransfer \ --sourceconnectiontype "mssql" \ --sourceserver "localhost" \ --sourcedatabase "tpch" \ --sourcetrusted \ --targetconnectiontype "msbulk" \ --targetserver "localhost" \ --targetdatabase "tpch_copy" \ --query "select * from orders" \ --targettrusted \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "None" \ --settingsfile "/etc/fasttransfer/FastTransfer_Settings.json" ``` See also * [Configuration Examples](/latest/documentation/logging/examples.md)sample settings files --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` Expand-Archive -Path .\FastTransfer.zip -DestinationPath .\FastTransfer ``` You can verify the installation by checking the version: ``` .\FastTransfer.exe --version ``` To start using FastTransfer, first **[request a trial](https://arpe.io/get-trial?product=FastTransfer)** to download the latest version. Once downloaded, unzip FastTransfer to a directory of your choice. ``` unzip FastTransfer.zip -d FastTransfer ``` On **Linux**, you need to give execution rights to the FastTransfer binary: ``` chmod +x FastTransfer ``` You can verify the installation by checking the version: ``` ./FastTransfer --version ``` FastTransfer is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)**. Pull the latest version: ``` docker pull arpeio/fasttransfer ``` Or pull a specific version: ``` docker pull arpeio/fasttransfer:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fasttransfer:latest --version ``` You are now ready to run FastTransfer Build your first command with the [Doc Wizard](/latest/wizard.md), or follow [Getting Started](/latest/.md). License Information After the trial period you will need a valid license. By default, FastTransfer will try to find a `FastTransfer.lic` file in the same directory as the executable. You can also provide another path, a URL, or even the license content using the `--license` parameter. ## Embedded Drivers[​](#embedded-drivers "Direct link to Embedded Drivers") The following database drivers are embedded in FastTransfer: | Database | Embedded Drivers | | ------------- | ---------------- | | Clickhouse | Supported | | DuckDB | Supported | | MS SQL Server | Supported | | MySQL | Supported | | Netezza | Supported | | Oracle | Supported | | PostgreSQL | Supported | | SAP HANA | Supported | | Teradata | Supported | ### Other databases[​](#other-databases "Direct link to Other databases") ODBC or OLEDB drivers required If you need another database not in the list, you can use ODBC or OLEDB but you will need to install your ODBC or OLEDB drivers of your favorite database. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastTransfer can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. ## Setup in four steps[​](#setup-in-four-steps "Direct link to Setup in four steps") 1. 1Install the Docker provider`apache-airflow-providers-docker`, see [Prerequisites](#prerequisites) 2. 2Create the connectionsSource and target databases, see [Configure Airflow Connections](#configure-airflow-connections) 3. 3Add the DAGA `DockerOperator` task that runs the FastTransfer image, see [Complete DAG Example](#complete-dag-example) 4. 4Check the logsIn the Airflow UI, see [Logging](#logging) ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: `arpeio/fasttransfer:latest`. * [arpeio/fasttransfer on DockerHub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)the prebuilt image * [Docker integration](/latest/integration/docker-integration.md)tags, volumes and logging settings of the image ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastTransfer with Airflow, you need to install the Docker provider package: ``` pip install apache-airflow-providers-docker ``` Or add it to your Airflow requirements: ``` apache-airflow-providers-docker ``` ## Configure Airflow Connections[​](#configure-airflow-connections "Direct link to Configure Airflow Connections") Airflow connections allow you to securely store and manage credentials for external systems. FastTransfer integration requires connections for your source and target databases. 1. Source database connection (MSSQL example) Airflow UI›Admin›Connections 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **ODBC** 4. Configure the connection with the settings below | Field | Value | | ------------------- | ------------------------------------------ | | **Connection Id** | `mssql_tpch10` (or your preferred name) | | **Connection Type** | `ODBC` (select this from the dropdown) | | **Host** | `192.168.65.254` (your database host) | | **Port** | `11433` (your database port) | | **Login** | Your database username (e.g., `FastLogin`) | | **Password** | Your database password | | **Extra** | `{"database":"tpch10"}` | 2. Target database connection (PostgreSQL example) Airflow UI›Admin›Connections 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Postgres** 4. Configure the connection with the settings below | Field | Value | | ------------------- | ------------------------------------------ | | **Connection Id** | `pg_target` (or your preferred name) | | **Connection Type** | `Postgres` (select this from the dropdown) | | **Host** | `192.168.65.254` (your database host) | | **Port** | `25433` (your database port) | | **Schema** | `postgres` *(this is the database name)* | | **Login** | `postgres` (your database username) | | **Password** | Your database password | Good to know * For ODBC connections, the database name should be specified in the Extra JSON field using `{"database":"your_database_name"}`. * For Postgres connections, the database name is specified in the **Schema** field. ## Integration with DockerOperator[​](#integration-with-dockeroperator "Direct link to Integration with DockerOperator") The [`DockerOperator`](https://airflow.apache.org/docs/apache-airflow-providers-docker/stable/operators.html) from the Docker provider allows you to execute FastTransfer commands in a Docker container directly from your Airflow DAGs. ### Complete DAG Example[​](#complete-dag-example "Direct link to Complete DAG Example") Create a DAG file (e.g., `fasttransfer_orders_mssql_to_pg.py`) in your Airflow DAGs folder: ``` from datetime import datetime from airflow import DAG from airflow.sdk.bases.hook import BaseHook from airflow.providers.docker.operators.docker import DockerOperator def _conn_parts(conn_id: str): """ Extract connection details from Airflow connection. Works with: - ODBC connections (for MSSQL): database in Extra JSON {"database":"name"} - Postgres connections: database in Schema field Returns: tuple: (host, port, user, password, database) """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # Database in Extra {"database": "..."} (for ODBC MSSQL) or in Schema (for Postgres) db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': database not found. Add it to Extra JSON " f'{{"database":"..."}} (for ODBC) or Schema field (for Postgres).' ) return host, port, user, pwd, db with DAG( dag_id="fasttransfer_orders_mssql_to_pg", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fasttransfer", "mssql", "postgres", "docker"], ) as dag: # Extract connection details mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _conn_parts("mssql_tpch10") pg_host, pg_port, pg_user, pg_pwd, pg_db = _conn_parts("pg_target") # FastTransfer Docker task transfer_task = DockerOperator( task_id="transfer_orders", image="arpeio/fasttransfer:latest", docker_url="tcp://host.docker.internal:2375", api_version="auto", auto_remove="success", mount_tmp_dir=False, # Avoids the remote-engine tmp mount warning do_xcom_push=False, command=[ "--sourceconnectiontype", "mssql", "--sourceserver", f"{mssql_host},{mssql_port}", "--sourcedatabase", mssql_db, "--sourceuser", mssql_user, "--sourcepassword", mssql_pwd, "--sourceschema", "dbo", "--sourcetable", "orders", "--targetconnectiontype", "pgcopy", "--targetserver", f"{pg_host}:{pg_port}", "--targetdatabase", pg_db, "--targetuser", pg_user, "--targetpassword", pg_pwd, "--targetschema", "public", "--targettable", "orders", "--loadmode", "Truncate", "--mapmethod", "Name", "--parallelmethod", "Ntile", "--degree", "12", "--distributekeycolumn", "o_orderkey", "--nobanner", ], network_mode="bridge", ) ``` ### Key Parameters[​](#key-parameters "Direct link to Key Parameters") `image` Specifies the FastTransfer Docker image `docker_url` Docker daemon endpoint `command` List of FastTransfer CLI arguments `auto_remove` Automatically remove the container after successful execution `mount_tmp_dir` Set to `False` to avoid warnings with remote Docker daemons ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes a utility function to streamline connection management: `_conn_parts(conn_id)` Extracts connection details from an Airflow connection. This function: * Retrieves host, port, username, and password from the connection * Extracts the database name from either the Extra JSON field (for ODBC connections) or the Schema field (for Postgres connections) * Returns all components needed to build the FastTransfer connection parameters * Validates that all required fields are present This approach ensures that credentials are managed centrally in Airflow and never hardcoded in DAG files. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Airflow and can be viewed in the Airflow UI: 1. Open the task logs Airflow UI›DAGs 1. Navigate to **DAGs** in the Airflow UI 2. Click on your DAG (e.g., `fasttransfer_orders_mssql_to_pg`) 3. Click on the task execution (green/red square in the Grid view) 4. Click the **Logs** tab ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") The logs provide detailed information about: * FastTransfer version and configuration * Source and target connection details (with masked passwords) * Data transfer progress * Performance metrics (rows/second, total time) * Exit status Full log of the example DAG run ``` [2026-03-02 15:51:45] INFO - Running docker container: arpeio/fasttransfer:latest [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:45] INFO - 2026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.288 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8415ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.330 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000000 : 2999997 rows x 9 columns in 8458ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.349 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8476ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.442 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8569ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1702771 rows/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15324949 cells/s [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8809 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9135 ms [2026-03-02 15:51:54] INFO - 2026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load [2026-03-02 15:51:54] INFO - Task instance in success state [2026-03-02 15:51:54] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 15:51:54] INFO - Task operator: ``` ## Related pages[​](#related-pages "Direct link to Related pages") Related pages * [Docker](/latest/integration/docker-integration.md)the FastTransfer image, its volumes and logging settings * [Kestra](/latest/integration/kestra-integration.md)run the same image from a Kestra flow * [Parallel parameters](/latest/documentation/cli/parallel_parameters.md)`--parallelmethod`, `--degree` and `--distributekeycolumn` --- # Docker Minimal, production-ready container image to run FastTransfer, a high-performance data transfer utility designed for data integration and automation workflows. ## Image Overview[​](#image-overview "Direct link to Image Overview") | Item | Value | | -------------- | ------------------------------------------------------------------------------------------- | | **Base image** | `debian:trixie-slim` | | **Entrypoint** | `/usr/local/bin/FastTransfer` | | **Updates** | Published automatically via GitHub Actions for each new release and weekly security updates | * [arpeio/fasttransfer on DockerHub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)the prebuilt image * [FastTransfer-Image on GitHub](https://github.com/arpe-io/FastTransfer-Image)repository of the image ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") 1. Docker 24+ (or Podman) A container engine to pull and run the image. 2. Valid FastTransfer license Request a trial license. * [Trial license](https://arpe.io/get-trial?product=FastTransfer) 3. FastTransfer\_Settings.jsonOptional For custom logging configuration. ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") ### Available Tags[​](#available-tags "Direct link to Available Tags") * Version-specific tagsAligned with FastTransfer releases (e.g., `v0.15.0`) * `latest` tagAlways points to the most recent FastTransfer version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * New releasesImages are automatically built when new FastTransfer versions are released * Security updatesThe latest version of each minor branch is automatically rebuilt weekly (every Monday) with the latest base image and security patches ### Pull and Run[​](#pull-and-run "Direct link to Pull and Run") * Pull the image * Basic commands ``` # Latest version docker pull arpeio/fasttransfer:latest # Specific version docker pull arpeio/fasttransfer:v0.15.0 ``` ``` # Get command line help docker run --rm arpeio/fasttransfer:latest -? # Check version docker run --rm arpeio/fasttransfer:latest --version ``` ## License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.14.0, pass the license content directly via `--license "…"`: ``` export licenseContent=$(cat ./FastTransfer.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fasttransfer:latest \ --license "$licenseContent" \ [other parameters...] ``` Best Practice Prefer `--env-file`, Docker/Compose/Kubernetes secrets, or managed identities for cloud credentials. Avoid leaving the license content in shell history. ## Examples[​](#examples "Direct link to Examples") * SQL Server → SQL Server * CSV files → SQL Server Parallel database-to-database transfer: ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ arpeio/fasttransfer:latest \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "dest_db" \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "Ntile" \ --distributekeycolumn "id" \ --loadmode "Truncate" \ --degree 8 \ --license "$licenseContent" ``` Import CSV files to SQL Server in parallel: ``` export licenseContent=$(cat ./FastTransfer.lic) docker run --rm \ -v /local/data:/data \ arpeio/fasttransfer:latest \ --sourceconnectiontype "duckdbstream" \ --sourceserver ":memory:" \ --query "SELECT * FROM read_csv('/data/lineitem*.CSV')" \ --targetconnectiontype "msbulk" \ --targetserver "host.docker.internal,1433" \ --targetuser "DestUser" \ --targetpassword "DestPass" \ --targetdatabase "tpch_test" \ --targetschema "dbo" \ --targettable "lineitem" \ --parallelmethod "Random" \ --distributekeycolumn "l_orderkey" \ --mapmethod "Name" \ --loadmode "Truncate" \ --degree 16 \ --license "$licenseContent" ``` ## Configuration[​](#configuration "Direct link to Configuration") ### Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` `/config`Read-only / Read-many User-provided configuration files (e.g., Serilog settings). Shared across multiple containers; not modified. `/data`Read-many / Write-many Input/output data directory for file-based operations. Stores imported or exported data files. `/work`Read-many / Write-many Temporary working directory (container WORKDIR). Used internally for temporary processing. `/logs`Read-many / Write-many Log output directory (per-run or aggregated logs). Stores runtime and execution logs. ### Configuring FastTransfer Logging[​](#configuring-fasttransfer-logging "Direct link to Configuring FastTransfer Logging") Available from version 0.14.0 FastTransfer supports custom logging configuration through an external Serilog settings file in JSON format. #### Example: Logging to Console, Airflow, and Dynamic Log Files[​](#example-logging-to-console-airflow-and-dynamic-log-files "Direct link to Example: Logging to Console, Airflow, and Dynamic Log Files") * ConsoleLogs to the console for real-time visibility * AirflowRun summary to `/airflow/xcom/return.json`, compatible with Airflow's XCom mechanism * Per-run filesJSON logs under `/logs`, named from the date, source database, file name, timestamp and trace ID FastTransfer\_Settings.json ``` { "Serilog": { "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Enrichers.Environment", "Serilog.Enrichers.Thread", "Serilog.Enrichers.Process", "Serilog.Enrichers.Context", "Serilog.Formatting.Compact" ], "WriteTo": [ { "Name": "Console", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {runid} -|- {Level:u12} -|- {fulltargetname} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console", "applyThemeToRedirectedOutput": false } }, { "Name": "File", "Args": { "path": "/airflow/xcom/return.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" } }, { "Name": "Map", "Args": { "to": [ { "Name": "File", "Args": { "path": "/logs/{logdate}/{sourcedatabase}/log-{filename}-{LogTimestamp}-{TraceId}.json", "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact", "rollingInterval": "Infinite", "shared": false, "encoding": "utf-8" } } ] } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastTransfer" } } } ``` note * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastTransfer automatically creates it. * The file `/airflow/xcom/return.json` is designed to provide run summaries compatible with Airflow's XCom mechanism. #### Available Tokens for Path or Filename Formatting[​](#available-tokens-for-path-or-filename-formatting "Direct link to Available Tokens for Path or Filename Formatting") `{logdate}` Current date in yyyy-MM-dd format `{logtimestamp}` Full timestamp of the log entry `{sourcedatabase}` Name of the source database `{sourceschema}` Name of the source schema `{sourcetable}` Name of the source table `{filename}` Name of the file being processed `{runid}` Run identifier provided in the command line `{traceid}` Unique trace identifier generated at runtime #### Mounting a Custom Settings File[​](#mounting-a-custom-settings-file "Direct link to Mounting a Custom Settings File") ``` # First, copy your config file to a volume location cp ~/FastTransfer_Settings.json /volumes/fasttransfer-config/ # Then run FastTransfer with mounted volumes docker run --rm \ -v fasttransfer-config:/config \ -v fasttransfer-logs:/logs \ arpeio/fasttransfer:latest \ --settingsfile "/config/FastTransfer_Settings.json" \ --sourceconnectiontype "mssql" \ --sourceserver "host.docker.internal,1433" \ --sourceuser "SrcUser" \ --sourcepassword "SrcPass" \ --sourcedatabase "source_db" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "pgcopy" \ --targetserver "host.docker.internal:5432" \ --targetuser "PgUser" \ --targetpassword "PgPass" \ --targetdatabase "pg_db" \ --targetschema "dbo" \ --targettable "orders" \ --degree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --license "$licenseContent" ``` ## Related pages[​](#related-pages "Direct link to Related pages") Related pages * [Apache Airflow](/latest/integration/airflow-integration.md)run the image from a DAG with the DockerOperator * [Kestra](/latest/integration/kestra-integration.md)run the image from a Kestra flow * [Logging overview](/latest/documentation/logging/Overview.md)logging settings and sinks --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastTransfer data migration workflows. FastTransfer can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastTransfer provides an official Docker image available on Docker Hub: `arpeio/fasttransfer:latest`. * [arpeio/fasttransfer on DockerHub](https://hub.docker.com/repository/docker/arpeio/fasttransfer/general)the prebuilt image * [Docker integration](/latest/integration/docker-integration.md)tags, volumes and logging settings of the image ## Integration Methods[​](#integration-methods "Direct link to Integration Methods") Kestra offers two primary methods to orchestrate FastTransfer execution: Docker Run pluginRecommended * Task type`io.kestra.plugin.docker.Run` * Arguments`commands`, one FastTransfer CLI argument per item * Best forA direct way to execute FastTransfer commands in a Docker container Shell commands with Docker task runner * Task type`io.kestra.plugin.scripts.shell.Commands` * ArgumentsA shell command line calling `/usr/local/bin/FastTransfer` * Best forMore flexibility for complex workflows - Method 1: Docker Run plugin - Method 2: Shell commands The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastTransfer commands in a Docker container. ``` id: fasttransfer_docker_kestra_v2 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - FastLogin - --sourcepassword - FastPassword - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - postgres - --targetpassword - postgres - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --parallelmethod - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` Alternatively, you can use the [`io.kestra.plugin.scripts.shell.Commands`](https://kestra.io/plugins/plugin-script-shell/io.kestra.plugin.scripts.shell.commands) plugin with a Docker task runner: ``` id: fasttransfer_docker_kestra namespace: arpe.io tasks: - id: shell type: io.kestra.plugin.scripts.shell.Commands containerImage: arpeio/fasttransfer:latest taskRunner: type: io.kestra.plugin.scripts.runner.docker.Docker host: "tcp://host.docker.internal:2375" commands: - >- /usr/local/bin/FastTransfer --sourceconnectiontype mssql --sourceserver "192.168.65.254,11433" --sourcedatabase "tpch10" --sourceuser "FastLogin" --sourcepassword "FastPassword" --sourceschema "dbo" --sourcetable "orders" --targetconnectiontype pgcopy --targetserver "192.168.65.254:25433" --targetdatabase "postgres" --targetuser "postgres" --targetpassword "postgres" --targetschema "public" --targettable "orders" --loadmode Truncate --mapmethod Name --parallelmethod Ntile --degree 12 --distributekeycolumn "o_orderkey" --nobanner ``` This method allows you to execute shell commands within the FastTransfer Docker container, providing more flexibility for complex workflows. ### Key Parameters[​](#key-parameters "Direct link to Key Parameters") `containerImage` Specifies the FastTransfer Docker image `commands` Array of FastTransfer CLI arguments ## Securing Sensitive Data with Kestra Secrets[​](#securing-sensitive-data-with-kestra-secrets "Direct link to Securing Sensitive Data with Kestra Secrets") To protect sensitive information like passwords and connection strings, Kestra provides a built-in [secrets management](https://kestra.io/docs/concepts/secret) feature. You can store credentials securely and reference them in your flows using the `{{ secret('SECRET_NAME') }}` syntax. ### Creating Secrets in Kestra[​](#creating-secrets-in-kestra "Direct link to Creating Secrets in Kestra") 1. Add the FastTransfer secrets Kestra UI›Tenant›Secrets 1. Navigate to the Kestra UI 2. Go to **Tenant** → **Secrets** 3. Add your secrets with appropriate keys: * `FASTTRANSFER_MSSQL_USER` * `FASTTRANSFER_MSSQL_PASSWORD` * `FASTTRANSFER_PG_USER` * `FASTTRANSFER_PG_PASSWORD` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fasttransfer_docker_kestra_v3 namespace: arpe.io tasks: - id: run type: io.kestra.plugin.docker.Run containerImage: arpeio/fasttransfer:latest host: "tcp://host.docker.internal:2375" commands: - --sourceconnectiontype - mssql - --sourceserver - 192.168.65.254,11433 - --sourcedatabase - tpch10 - --sourceuser - "{{ secret('FASTTRANSFER_MSSQL_USER') }}" - --sourcepassword - "{{ secret('FASTTRANSFER_MSSQL_PASSWORD') }}" - --sourceschema - dbo - --sourcetable - orders - --targetconnectiontype - pgcopy - --targetserver - 192.168.65.254:25433 - --targetdatabase - postgres - --targetuser - "{{ secret('FASTTRANSFER_PG_USER') }}" - --targetpassword - "{{ secret('FASTTRANSFER_PG_PASSWORD') }}" - --targetschema - public - --targettable - orders - --loadmode - Truncate - --mapmethod - Name - --parallelmethod - Ntile - --degree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` This approach ensures that sensitive credentials are never exposed in your flow definitions and can be managed centrally. ## Logging[​](#logging "Direct link to Logging") All FastTransfer execution logs are captured by Kestra and can be viewed directly in the Kestra UI: 1. Open the execution logs Kestra UI›Executions 1. Navigate to the Kestra UI 2. Go to **Executions** 3. Select your flow execution 4. Click on the **Logs** tab ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") The logs provide detailed information about the transfer process: * Configuration parameters * Connection details * Data transfer progress * Performance metrics Full log of the example flow execution ``` 2026-03-02 15:51:45.3752026-03-02T15:51:45.375 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- The "FastTransfer_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer - running in trial mode – trial mode will end on 2026‑03‑27 - normal licensed mode will then start (24 day(s) left). 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Starting 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- FastTransfer Version : 0.16.0.0 Architecture : X64 - Framework : .NET 8.0.24 2026-03-02 15:51:45.3772026-03-02T15:51:45.377 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- OS : Debian GNU/Linux 13 (trixie) 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Process ID : 1 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Generated Run ID : ca195802-59f7-4b13-85e8-0bb73e8f7b32 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection Type : mssql 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source SqlInstance : sql22,1433 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source User : migadmin 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Schema : tpch10 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Type : pgcopy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Server : host.docker.internal:5432 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database : tpch 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Schema : tpch_1_copy 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Table : orders 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Trusted Connection : False 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target User : pytabextract_pguser 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Columns Map Method : Name 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree : -4 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Method : Ntile 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Distribute Column : o_orderkey 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Bulkcopy Batch Size : 1048576 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Load Mode : Truncate 2026-03-02 15:51:45.3782026-03-02T15:51:45.378 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Use Work Tables : False 2026-03-02 15:51:45.3792026-03-02T15:51:45.379 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Connection String : Data Source=sql22,1433;Initial Catalog=tpch;User ID=migadmin;Password=xxxxx;Connect Timeout=120;Encrypt=True;Trust Server Certificate=True;Application Name=FastTransfer;Application Intent=ReadOnly;Command Timeout=10800 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Connection String : Host=host.docker.internal;Port=5432;Database=tpch;Trust Server Certificate=True;Application Name=FastTransfer;Timeout=15;Command Timeout=10800;Username=pytabextract_pguser;Password=xxxxx 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Source Database Version : Microsoft SQL Server 2022 (RTM-CU2) (KB5023127) - 16.0.4015.1 (X64) Feb 27 2023 15:40:01 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.5 LTS) 2026-03-02 15:51:45.5172026-03-02T15:51:45.517 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Target Database Version : PostgreSQL 15.15 (Ubuntu 15.15-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit 2026-03-02 15:51:45.6342026-03-02T15:51:45.634 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Degree of parallelism was computed to 5 (=> 20\4) 2026-03-02 15:51:45.8702026-03-02T15:51:45.870 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Ntile DataSegments Computation Completed in 235 ms 2026-03-02 15:51:45.8722026-03-02T15:51:45.872 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8842026-03-02T15:51:45.884 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.8912026-03-02T15:51:45.891 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9002026-03-02T15:51:45.900 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:45.9112026-03-02T15:51:45.911 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Start Loading Data using distribution method NTile 2026-03-02 15:51:54.2332026-03-02T15:51:54.233 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 3 for o_orderkey between 36000003 and 48000003 : 3000001 rows x 9 columns in 8360ms 2026-03-02 15:51:54.2382026-03-02T15:51:54.238 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 1 for o_orderkey between 12000001 and 24000001 : 3000001 rows x 9 columns in 8365ms 2026-03-02 15:51:54.2412026-03-02T15:51:54.241 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 2 for o_orderkey between 24000002 and 36000002 : 3000001 rows x 9 columns in 8368ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 0 for o_orderkey between 1 and 12000000 : 3000000 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4432026-03-02T15:51:54.443 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load Query 4 for o_orderkey between 48000004 and 60000004 : 3000001 rows x 9 columns in 8570ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total rows : 15000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total columns : 9 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total cells : 135000000 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Rows Throughput : 1766084 rows/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Cells Throughput : 15894756 cells/s 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Transfert time : Elapsed=8494 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Total time : Elapsed=9142 ms 2026-03-02 15:51:54.4462026-03-02T15:51:54.446 +00:00 -|- -|- ca195802-59f7-4b13-85e8-0bb73e8f7b32 -|- INFORMATION -|- tpch.tpch_1_copy.orders -|- Completed Load 2026-03-02 15:51:54.448Command succeed with exit code 0 2026-03-02 15:51:54.450Container deleted: ca0de79e3eb4ede961668cb5080e4c20f858960c118d10731b8e0ade3ad87685 2026-03-02 15:51:54.455Volume deleted: a6b822d7677064a91d2dd555c360dc61ec49e3954149eacd5c22549c2a300850 ``` ## Related pages[​](#related-pages "Direct link to Related pages") Related pages * [Docker](/latest/integration/docker-integration.md)the FastTransfer image, its volumes and logging settings * [Apache Airflow](/latest/integration/airflow-integration.md)run the same image from an Airflow DAG * [Parallel parameters](/latest/documentation/cli/parallel_parameters.md)`--parallelmethod`, `--degree` and `--distributekeycolumn` --- # PostgreSQL The **pg\_fasttransfer** extension allows you to run the FastTransfer tool directly from an SQL function, enabling fast data transfer between databases directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") | Item | Value | | ------------------ | ---------------------------------------------------------------------- | | **Repository** | [arpe-io/pg\_fasttransfer](https://github.com/arpe-io/pg_fasttransfer) | | **License** | MIT | | **Latest version** | v0.16.0 | | **Platforms** | Linux (Debian/Ubuntu) and Windows | ![pg\_fasttransfer Demo](/assets/images/pg_fasttransfer-830298c99dd0228e80b5337126bb0c7c.gif) ## Features[​](#features "Direct link to Features") * Native PostgreSQL IntegrationExecute FastTransfer commands directly from SQL * Secure Password ManagementBuilt-in encryption for sensitive credentials * Detailed Result ReturnGet transfer statistics and performance metrics as SQL results * Cross-PlatformAvailable for both Linux and Windows environments * Flexible ConfigurationSupport for all FastTransfer parameters ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") 1. PostgreSQL 15, 16, 17, or 18 See [Compatibility](#compatibility) for the versions supported on each platform. ![](/img/logos/postgresql.svg) 2. Sudo/Administrator privileges Required to install the extension. 3. Valid FastTransfer license Request a trial license. * [Trial license](https://arpe.io/get-trial?product=FastTransfer) 4. FastTransfer binaries FastTransfer binaries installed on the system. Important The PostgreSQL server process usually runs under the `postgres` user account. You must ensure that this user has the appropriate permissions to execute the `FastTransfer` binary and read the license file. ## Compatibility[​](#compatibility "Direct link to Compatibility") | PostgreSQL Version | Windows | Linux (Debian/Ubuntu 22.04 LTS) | | ------------------ | ------------- | ------------------------------- | | PostgreSQL 18 | Supported | Supported | | PostgreSQL 17 | Supported | Supported | | PostgreSQL 16 | Supported | Supported | | PostgreSQL 15 | Not supported | Supported | Good to know Other distributions or PostgreSQL versions may work but have not been officially tested. ## Installation[​](#installation "Direct link to Installation") Download the appropriate release for your PostgreSQL version and operating system from the [pg\_fasttransfer releases page](https://github.com/arpe-io/pg_fasttransfer/releases). * Linux * Windows ### Automated installation (Linux)[​](#automated-installation-linux "Direct link to Automated installation (Linux)") The easiest way to install the extension on Linux is by using the `install-linux.sh` script included in the archive. 1. Extract the contents of the archive into a folder. This folder should contain `pg_fasttransfer.so`, `pg_fasttransfer.control`, `pg_fasttransfer--1.0.sql` and `install-linux.sh`. 2. Make the script executable: ``` chmod +x install-linux.sh ``` 3. Run the script with administrator privileges: ``` sudo ./install-linux.sh ``` The script will automatically detect your PostgreSQL installation and copy the files to the correct locations. Manual installation If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service: ``` sudo systemctl stop postgresql ``` 2. Locate your PostgreSQL installation directory, typically: `/usr/lib/postgresql/` 3. Copy the files into the appropriate directories: ``` sudo cp pg_fasttransfer.so /usr/lib/postgresql//lib/ sudo cp pg_fasttransfer.control pg_fasttransfer--1.0.sql /usr/share/postgresql//extension/ ``` 4. Restart your PostgreSQL service: ``` sudo systemctl start postgresql ``` ### Permissions setup (Linux)[​](#permissions-setup-linux "Direct link to Permissions setup (Linux)") Ensure the `postgres` user has proper permissions: ``` # Grant execute permission on the FastTransfer binary sudo chmod +x /path/to/FastTransfer sudo chown postgres:postgres /path/to/FastTransfer sudo chmod 750 /path/to/FastTransfer # Grant read permission on the license file sudo chown postgres:postgres /path/to/license.lic sudo chmod 640 /path/to/license.lic ``` ### Automated installation (Windows)[​](#automated-installation-windows "Direct link to Automated installation (Windows)") 1. Extract the contents of the ZIP file into a folder. This folder should contain `pg_fasttransfer.dll`, `pg_fasttransfer.control`, `pg_fasttransfer--1.0.sql` and `install-win.bat`. 2. Right-click on the `install-win.bat` file and select "Run as administrator" 3. The script will automatically detect your PostgreSQL installation and copy the files to the correct locations Manual installation If the automated script fails or you prefer to install the files manually: 1. Stop your PostgreSQL service 2. Locate your PostgreSQL installation folder, typically: ``` C:\Program Files\PostgreSQL\ ``` 3. Copy the `pg_fasttransfer.dll` file into the `lib` folder 4. Copy the `pg_fasttransfer.control` and `pg_fasttransfer--1.0.sql` files into the `share\extension` folder 5. Restart your PostgreSQL service ### Permissions setup (Windows)[​](#permissions-setup-windows "Direct link to Permissions setup (Windows)") Make sure that the PostgreSQL service account (by default `NT AUTHORITY\NetworkService` or `postgres`) has: * Execute permission on the `FastTransfer.exe` binary * Read permission on the `.lic` file ## SQL Setup[​](#sql-setup "Direct link to SQL Setup") After the files are in place, you need to set up the extension in your database. ### Drop existing extension (if any)[​](#drop-existing-extension-if-any "Direct link to Drop existing extension (if any)") ``` DROP EXTENSION IF EXISTS pg_fasttransfer CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fasttransfer CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fasttransfer\_encrypt[​](#pg_fasttransfer_encrypt "Direct link to pg_fasttransfer_encrypt") This function encrypts a given text string using `pgp_sym_encrypt` and encodes the result in base64. It is useful for storing sensitive information, such as passwords, in a secure manner within your SQL scripts. The `xp_RunFastTransfer_secure` function will automatically decrypt any values passed to its `--sourcepassword` and `--targetpassword` arguments. **Syntax:** ``` pg_fasttransfer_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fasttransfer_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastTransfer\_secure[​](#xp_runfasttransfer_secure "Direct link to xp_RunFastTransfer_secure") This is the main function to execute the FastTransfer tool. It takes various parameters to configure the data transfer operation. Password arguments (`sourcepassword`, `targetpassword`) will be automatically decrypted. Syntax: all parameters and the returned table ``` xp_RunFastTransfer_secure( sourceconnectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, sourcedsn text DEFAULT NULL, sourceprovider text DEFAULT NULL, sourceserver text DEFAULT NULL, sourceuser text DEFAULT NULL, sourcepassword text DEFAULT NULL, sourcetrusted boolean DEFAULT FALSE, sourcedatabase text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, query text DEFAULT NULL, fileinput text DEFAULT NULL, targetconnectiontype text DEFAULT NULL, targetconnectstring text DEFAULT NULL, targetserver text DEFAULT NULL, targetuser text DEFAULT NULL, targetpassword text DEFAULT NULL, targettrusted boolean DEFAULT FALSE, targetdatabase text DEFAULT NULL, targetschema text DEFAULT NULL, targettable text DEFAULT NULL, degree integer DEFAULT NULL, method text DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, loadmode text DEFAULT NULL, batchsize integer DEFAULT NULL, useworktables boolean DEFAULT FALSE, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, mapmethod text DEFAULT NULL, license text DEFAULT NULL, loglevel text DEFAULT NULL, nobanner boolean DEFAULT NULL, fasttransfer_path text DEFAULT NULL, debug boolean DEFAULT FALSE ) RETURNS TABLE ( exit_code integer, output text, error_message text, total_rows bigint, total_columns integer, transfer_time_ms bigint, total_time_ms bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") * Linux: PostgreSQL → SQL Server * Windows: SQL Server → PostgreSQL Transfer data from PostgreSQL to SQL Server using the extension: ``` SELECT * FROM xp_RunFastTransfer_secure( targetconnectiontype := 'msbulk', sourceconnectiontype := 'pgsql', sourceserver := 'localhost:5432', sourceuser := 'postgres', sourcepassword := pg_fasttransfer_encrypt('MyActualPassword'), sourcedatabase := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', targetserver := 'localhost,1433', targetuser := 'migadmin', targetpassword := pg_fasttransfer_encrypt('AnotherSecurePassword'), targetdatabase := 'target_db', targetschema := 'tpch_1', targettable := 'orders', loadmode := 'Truncate', license := '/tmp/FastTransfer_linux-x64_v0.15.0/FastTransfer.lic', loglevel := 'information', nobanner := false, fasttransfer_path := '/tmp/FastTransfer_linux-x64_v0.15.0', debug := true ); ``` Transfer data from SQL Server to PostgreSQL: ``` SELECT * FROM xp_RunFastTransfer_secure( sourceconnectiontype := 'mssql', sourceserver := 'localhost', sourcepassword := pg_fasttransfer_encrypt('MyWindowsPassword'), sourceuser := 'FastLogin', sourcedatabase := 'tpch10', sourceschema := 'dbo', sourcetable := 'orders', targetconnectiontype := 'pgcopy', targetserver := 'localhost:15433', targetuser := 'postgres', targetpassword := pg_fasttransfer_encrypt('MyPostgresPassword'), targetdatabase := 'postgres', targetschema := 'public', targettable := 'orders', method := 'Ntile', degree := 12, distributekeycolumn := 'o_orderkey', loadmode := 'Truncate', batchsize := 1048576, mapmethod := 'Position', loglevel := 'information', nobanner := true, fasttransfer_path := 'D:\sources\FastTransfer', debug := true ); ``` ## Function Return Structure[​](#function-return-structure "Direct link to Function Return Structure") The function returns a table with the following columns: `exit_code`integer The exit code of the FastTransfer process. `output`text The full log output from FastTransfer (if debug is TRUE). `error_message`text Only the lines containing ERROR from the output. `total_rows`bigint The total number of rows transferred. `total_columns`integer The total number of columns transferred. `transfer_time_ms`bigint Transfer time in milliseconds. `total_time_ms`bigint Total execution time in milliseconds. ## Debug Parameter[​](#debug-parameter "Direct link to Debug Parameter") The `debug` parameter is a boolean flag that controls whether the full FastTransfer output is returned in the `output` column: debug := true * outputContains the entire log from FastTransfer * error\_messageAny error lines debug := falseDefault * outputAn empty string * error\_messageStill contains any error lines ## Resources[​](#resources "Direct link to Resources") Resources * [pg\_​fasttransfer GitHub Repository](https://github.com/arpe-io/pg_fasttransfer) * [pg\_​fasttransfer releases](https://github.com/arpe-io/pg_fasttransfer/releases)download the extension * [FastTransfer Documentation](https://fasttransfer.arpe.io/) * [Get a Trial License](https://arpe.io/get-trial?product=FastTransfer) * [Report Issues](https://github.com/arpe-io/pg_fasttransfer/issues) --- # SQL Server The **FastWrappers-TSQL** project wraps FastTransfer (and FastBCP) in a CLR Assembly, allowing you to call them directly from T-SQL using extended stored procedures. This enables seamless data transfer operations without leaving your SQL Server environment. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") | Item | Value | | ------------------ | ------------------------------------------------------------------------- | | **Repository** | [aetperf/FastWrappers-TSQL](https://github.com/aetperf/FastWrappers-TSQL) | | **Latest version** | v0.7.0 | | **Platforms** | Windows and Linux | | **Compatibility** | SQL Server 2016+ | info This wrapper includes both **FastTransfer** (for database-to-database transfers and file imports) and **FastBCP** (for database-to-file exports). This documentation focuses on the FastTransfer functionality. ## Features[​](#features "Direct link to Features") * Native SQL Server IntegrationExecute FastTransfer commands directly from T-SQL * Secure Password ManagementBuilt-in AES-256 encryption for sensitive credentials * CLR Assembly IntegrationRuns as extended stored procedures * Detailed Result ReturnGet transfer statistics and performance metrics as SQL results * Flexible ConfigurationSupport for all FastTransfer parameters and connection types * Role-Based SecurityPredefined database roles for access control ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") 1. SQL Server 2016 or later With CLR integration enabled. ![](/img/logos/sqlserver.svg) 2. FastTransfer binaries Valid FastTransfer binaries. 3. Valid FastTransfer license Request a trial license. * [Trial license](https://arpe.io/get-trial?product=FastTransfer) 4. Administrator privileges For the initial setup. Important The SQL Server service account must have read/execute permissions on the FastTransfer directory and binaries. ## Installation[​](#installation "Direct link to Installation") Download the latest release from the [Releases page](https://github.com/aetperf/FastWrappers-TSQL/releases). Choose the installation method based on your SQL Server version: ### Recommended Installation Methods[​](#recommended-installation-methods "Direct link to Recommended Installation Methods") FastWrappers-TSQL.bakSQL Server 2019+ * FormatSQL Server Backup file * InstallRestore using SSMS * After installRequires manual CLR activation and trusted assembly configuration after restore * Download[FastWrappers-TSQL.bak](https://github.com/aetperf/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.bak) FastWrappers-TSQL.sqlSQL Server 2016+ * FormatPure SQL Script * InstallExecute using sqlcmd or SSMS * After installNothing: complete installation in a single script * Download[FastWrappers-TSQL.sql](https://github.com/aetpefl/FastWrappers-TSQL/releases/latest/download/FastWrappers-TSQL.sql) ### Post-Installation Configuration[​](#post-installation-configuration "Direct link to Post-Installation Configuration") info This section only applies to the **.bak** installation method. The **.sql** script includes all necessary configuration steps automatically. After restoring the database, you **must** configure CLR integration. Two options are available: * Trusted Assembly (Recommended) * TRUSTWORTHY ON (Dev/Test) This approach is **more secure** as it keeps TRUSTWORTHY OFF and doesn't require changing the database owner: ``` -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Extract the assembly hash and add it to trusted assemblies DECLARE @hash VARBINARY(64); SELECT @hash = HASHBYTES('SHA2_512', content) FROM sys.assembly_files WHERE assembly_id = ( SELECT assembly_id FROM sys.assemblies WHERE name = 'FastWrappers_TSQL' ); EXEC sys.sp_add_trusted_assembly @hash = @hash, @description = N'FastWrappers_TSQL Assembly v0.7.0'; GO ``` **Advantages:** * TRUSTWORTHY remains OFF (more secure) * No need to change database owner * Only this specific assembly is trusted tip The assembly hash changes with each version. When upgrading, remove the old hash first: ``` EXEC sys.sp_drop_trusted_assembly @hash = ; ``` This approach is simpler but **less secure**. Use only for development/testing environments: ``` -- Enable TRUSTWORTHY for signed UNSAFE assemblies ALTER DATABASE [FastWrappers-TSQL] SET TRUSTWORTHY ON; GO -- Enable CLR integration EXEC sp_configure 'show advanced options', 1; RECONFIGURE; GO EXEC sp_configure 'clr enabled', 1; RECONFIGURE; GO -- Set database owner to 'sa' (required for signed UNSAFE assemblies) EXEC sp_changedbowner 'sa'; GO ``` Critical The `sp_changedbowner 'sa'` command is **required**. Without it, you will encounter error 0x80FC80F1 when executing stored procedures. ## Security Roles[​](#security-roles "Direct link to Security Roles") ### FastTransfer\_Executor[​](#fasttransfer_executor "Direct link to FastTransfer_Executor") The FastWrappers-TSQL database includes a predefined database role that grants `EXECUTE` permission on the **xp\_RunFastTransfer\_secure** stored procedure. ``` -- Add a user to the role ALTER ROLE [FastTransfer_Executor] ADD MEMBER [YourUserName]; GO ``` tip Users also need access to the **dbo.EncryptString** function to generate encrypted passwords: ``` GRANT EXECUTE ON dbo.EncryptString TO [YourUserName]; GO ``` ## Available Functions[​](#available-functions "Direct link to Available Functions") ### dbo.EncryptString - Password Encryption[​](#dboencryptstring---password-encryption "Direct link to dbo.EncryptString - Password Encryption") Encrypts passwords using AES-256 encryption for secure storage and transmission. ``` SELECT dbo.EncryptString('YourPassword') ``` **Returns:** Base64-encoded encrypted string **Example:** ``` SELECT dbo.EncryptString('MySecretPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== ``` ### dbo.xp\_RunFastTransfer\_secure - Data Transfer[​](#dboxp_runfasttransfer_secure---data-transfer "Direct link to dbo.xp_RunFastTransfer_secure - Data Transfer") Wraps the FastTransfer CLI to transfer data between databases with streaming and parallel processing. **Example:** ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'D:\FastTransfer\', @sourceConnectionType = 'mssql', @sourceServer = 'localhost,11433', @sourceUser = 'FastLogin', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = 'tpch10', @sourceSchema = 'dbo', @sourceTable = 'orders', @targetConnectionType = 'pgcopy', @targetServer = 'localhost:25433', @targetUser = 'postgres', @targetPasswordSecure = 'RAAFe/XJ7O0P1I5T0rJhjQ==', @targetDatabase = 'postgres', @targetSchema = 'public', @targetTable = 'orders', @loadmode = 'Truncate', @method = 'Ntile', @distributeKeyColumn = 'o_orderkey', @degree = 12, @mapmethod = 'Name', @debug = 1, @noBanner = 0, @useWorkTables = 0, @loglevel = 'debug' ``` ## Output and Logging[​](#output-and-logging "Direct link to Output and Logging") ### Transfer Metrics[​](#transfer-metrics "Direct link to Transfer Metrics") The **xp\_RunFastTransfer\_secure** stored procedure returns a structured result set: `targetdatabase`nvarchar(128) Target database name `targetSchema`nvarchar(128) Target schema name `targetTable`nvarchar(128) Target table name `TotalRows`bigint Number of rows transferred `TotalColumns`int Number of columns transferred `TotalCells`bigint Total cells transferred (rows × columns) `TotalTimeMs`bigint Total execution time in milliseconds `Status`int Exit code (0 = success, non-zero = error) `StdErr`nvarchar(max) Error message if Status ≠ 0 **Example output:** ``` targetdatabase targetSchema targetTable TotalRows TotalColumns TotalCells TotalTimeMs Status postgres public orders 15000000 9 135000000 27502 0 ``` ### Debug Mode[​](#debug-mode "Direct link to Debug Mode") Set `@debug = 1` to output additional information: * Complete command line being executed (passwords masked) * Full console output from FastTransfer * Real-time progress updates * Performance metrics ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest', -- ... other parameters ... @debug = 1 -- Enable verbose logging ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") * SQL Server → SQL Server * Oracle → SQL Server * PostgreSQL → SQL Server Transfer a table between two SQL Server instances using parallel processing (12 threads): ``` -- First, encrypt your password SELECT dbo.EncryptString('YourPassword') -- Returns: wi1/VHz9s+fp45186iLYYQ== -- Then execute the transfer EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = N'mssql', @sourceServer = N'localhost', @sourceUser = N'FastUser', @sourcePasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @sourceDatabase = N'tpch_test', @sourceSchema = N'dbo', @sourceTable = N'orders', @targetConnectionType = N'msbulk', @targetServer = N'localhost\SS2025', @targetUser = N'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = N'tpch_test', @targetSchema = N'dbo', @targetTable = N'orders_copy', @loadMode = N'Truncate', @batchSize = 130000, @method = N'RangeId', @distributeKeyColumn = N'o_orderkey', @degree = 12, @mapmethod = 'Name', @runId = N'SQL_to_SQL_Parallel_Transfer'; ``` Transfer data from Oracle to SQL Server with parallel RangeId method (12 threads): ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'oraodp', @sourceServer = 'oracle-server:1521/ORCL', @sourceUser = 'oracle_user', @sourcePasswordSecure = '', @sourceSchema = 'SALES', @sourceTable = 'ORDERS', @targetConnectionType = 'msbulk', @targetServer = 'localhost\SS2025', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'tpch_test', @targetSchema = 'dbo', @targetTable = 'orders_from_oracle', @loadMode = 'Truncate', @batchSize = 130000, @method = 'RangeId', @distributeKeyColumn = 'order_id', @degree = 12, @mapmethod = 'Name', @runId = 'Oracle_to_SQL_Transfer'; ``` Use PostgreSQL's native Ctid method for optimal performance (8 threads): ``` EXEC dbo.xp_RunFastTransfer_secure @fastTransferDir = 'C:\FastTransfer\latest\', @sourceConnectionType = 'pgcopy', @sourceServer = 'postgres-server:5432', @sourceUser = 'postgres', @sourcePasswordSecure = '', @sourceDatabase = 'sales_db', @sourceSchema = 'public', @sourceTable = 'customers', @targetConnectionType = 'msbulk', @targetServer = 'localhost', @targetUser = 'FastUser', @targetPasswordSecure = 'wi1/VHz9s+fp45186iLYYQ==', @targetDatabase = 'crm', @targetSchema = 'dbo', @targetTable = 'customers', @loadMode = 'Append', @batchSize = 100000, @method = 'Ctid', @degree = 8, @mapmethod = 'Name', @runId = 'PG_to_SQL_Ctid'; ``` ## Resources[​](#resources "Direct link to Resources") Resources * [FastTransfer Documentation](/latest/.md) * [GitHub Repository](https://github.com/aetperf/FastWrappers-TSQL) * [FastWrappers-TSQL issues](https://github.com/aetperf/FastWrappers-TSQL/issues)report an issue with the wrapper * [Contact ARPE Support](https://arpe.io/contact)questions about FastTransfer --- # Release Notes 0.16 ## New Parameters[​](#new-parameters "Direct link to New Parameters") * Added the `--version` to display the version ## Other[​](#other "Direct link to Other") * Improve logging * Bump dependencies # Fixes * Sap HANA fix drivers inclusion for Linux See [Advanced Parameters](/latest/documentation/cli/advanced_parameters.md) for complete details. ### Notes[​](#notes "Direct link to Notes") * v0.16.2 is the final release supporting .NET 7. ⚠️ Future versions will drop .NET 7 support, which may reduce operating system compatibility. --- # Release Notes 0.17 ## .NET Runtime Updates[​](#net-runtime-updates "Direct link to .NET Runtime Updates") * **Removed .NET 7 support** - FastTransfer no longer supports .NET 7 runtime * **Upgraded to .NET 10.0** - Migrated from .NET 8.0 to .NET 10.0 for improved performance and security ## New Features[​](#new-features "Direct link to New Features") ### Environment Variables[​](#environment-variables "Direct link to Environment Variables") FastTransfer 0.17 introduces support for environment variables to configure runtime behavior: #### FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES[​](#fasttransfer_loadsteptimeout_minutes "Direct link to FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES") Controls the bulk load timeout for `msbulk` and `orabulk` target connection types. * **Default**: 60 minutes * **Usage**: Set this variable to override the default timeout (in minutes) * **Example**: ``` # Windows set FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 # Linux export FASTTRANSFER_LOADSTEPTIMEOUT_MINUTES=120 ``` #### FASTTRANSFER\_SORTEDINPUT[​](#fasttransfer_sortedinput "Direct link to FASTTRANSFER_SORTEDINPUT") Forces the sorted hint for `msbulk` target connections, which can improve performance when data is already sorted by the clustered index. * **Values**: `true` or `false` * **Default**: `false` * **Usage**: Set to `true` to force sorted input mode, or `false` to disable it * **Example**: ``` # Windows set FASTTRANSFER_SORTEDINPUT=true # Linux export FASTTRANSFER_SORTEDINPUT=true ``` See [Environment Variables](/latest/documentation/environment-variables/overview.md) for complete details. ## Other Improvements[​](#other-improvements "Direct link to Other Improvements") --- # Release Notes 0.18 ## 0.18.1 - Security Update[​](#0181---security-update "Direct link to 0.18.1 - Security Update") FastTransfer 0.18.1 is a maintenance release. It fixes two .NET vulnerabilities in a bundled dependency and includes a consistency fix for the `Ctid` method. **Upgrading is recommended for all 0.18.0 users.** ### Security Fixes[​](#security-fixes "Direct link to Security Fixes") FastTransfer 0.18.0 and earlier bundle `System.Security.Cryptography.Pkcs` 9.0.13, a transitive dependency of the SQL Server and Oracle drivers. This version is affected by two vulnerabilities disclosed by Microsoft on **October 13, 2026**: | CVE | Severity | Issue | Platforms | | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------------------- | | [CVE-2026-84008](https://www.cve.org/CVERecord?id=CVE-2026-84008) ([GHSA-846f-f764-76mx](https://github.com/advisories/GHSA-846f-f764-76mx)) | High (CVSS 7.5) | Denial of service: `SignedCms.CheckSignature` can repeatedly reparse attacker-controlled X.509 data, causing CPU exhaustion | Windows, Linux, macOS | | [CVE-2026-70162](https://www.cve.org/CVERecord?id=CVE-2026-70162) ([GHSA-2fmv-rv2c-59x7](https://github.com/advisories/GHSA-2fmv-rv2c-59x7)) | Moderate (CVSS 5.9) | Denial of service: `EnvelopedCms.Decode` can perform quadratic work on attacker-supplied CMS / PKCS#7 data, causing CPU exhaustion | Windows | FastTransfer 0.18.1 ships the patched version, `System.Security.Cryptography.Pkcs` **10.0.13**. **Who is affected?** All FastTransfer versions up to and including 0.18.0 contain the vulnerable library. The actual exposure is low: * Both vulnerabilities only affect **availability** (high CPU usage). They cannot leak or modify your data. * FastTransfer itself does not call the vulnerable APIs, and neither do the bundled drivers in a standard transfer (SQL Server, PostgreSQL, Oracle, MySQL, etc.). The license check does not use this library. * The only related code path is SQL Server **Always Encrypted with secure enclaves (VBS/HGS attestation)**. In that case, the SQL Server driver decodes signed data returned by the attestation service. It does not call the vulnerable `CheckSignature` method. Vulnerability scanners (Dependabot, NuGet audit, binary scanners) flag the vulnerable version whatever the code path, so upgrading is still required for compliance. **How to fix it?** Replace the FastTransfer binary with version 0.18.1. FastTransfer is a self-contained executable that embeds its own .NET runtime and libraries: updating the .NET runtime installed on the server does **not** fix it. ### Dependency Updates[​](#dependency-updates "Direct link to Dependency Updates") | Package | 0.18.0 | 0.18.1 | | ---------------------------------------------------------------------- | --------- | --------- | | System.Security.Cryptography.Pkcs | 9.0.13 | 10.0.13 | | Microsoft.Data.SqlClient | 7.0.1 | 7.1.1 | | Oracle.ManagedDataAccess.Core | 23.26.200 | 23.26.301 | | Npgsql | 10.0.2 | 10.0.3 | | MySqlConnector | 2.5.0 | 2.6.2 | | DuckDB.NET.Data.Full | 1.5.2 | 1.5.6.1 | | Teradata.Client.Provider | 20.0.9 | 20.0.10 | | Microsoft.Extensions.Configuration / Logging, System.Data.Odbc / OleDb | 10.0.8 | 10.0.13 | | Serilog | 4.3.1 | 4.4.0 | The .NET runtime embedded in the binary is 10.0.13, which includes the October 2026 .NET security fixes. ### Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **`Ctid` method, `pgcopy` source and `pgcopy` target**: every chunk now reads from the same snapshot (`REPEATABLE READ` with an exported snapshot). Before, these chunks each used their own `READ COMMITTED` snapshot, so a `Ctid` transfer of a table being written to could be inconsistent across chunks. Queries containing the word `COPY` (for example a table named `COPYTABLE`) are no longer truncated. *** *The sections below describe the changes introduced in 0.18.0.* ## New Parallel Methods[​](#new-parallel-methods "Direct link to New Parallel Methods") ### DBPartition[​](#dbpartition "Direct link to DBPartition") `DBPartition` uses the native partitions of the source table: each partition is transferred in its own stream, biggest partitions first. No distribute key column is needed. * **Sources**: SQL Server (`mssql`, `msoledbsql`), PostgreSQL (`pgsql`, `pgcopy`), Oracle (`oraodp`), MySQL (`mysql`), Teradata (`teradata`, row partitioning only) * **Requires**: `--sourceschema` and `--sourcetable` (`--query` is not allowed) * **Fallback**: if the table is not partitioned, FastTransfer logs a warning and transfers it with `None` ``` ./FastTransfer \ --sourceconnectiontype "mssql" --sourceserver "localhost" --sourcedatabase "tpch" --sourcetrusted \ --sourceschema "dbo" --sourcetable "lineitem_part" \ --targetconnectiontype "pgcopy" --targetserver "localhost:5432" --targetdatabase "tpch" \ --targetuser "postgres" --targetpassword "mypassword" \ --targetschema "public" --targettable "lineitem" \ --parallelmethod "DBPartition" --degree 8 --loadmode "Truncate" ``` See [Parallel Parameters - DBPartition](/latest/documentation/cli/parallel_parameters.md#dbpartition). ### Timepartition[​](#timepartition "Direct link to Timepartition") `Timepartition` splits the data on the time parts of a date column: one stream per year, month, day or ISO week, biggest first. `--distributekeycolumn` is a tuple: | Tuple | One stream per | | ------------------------------ | -------------- | | `(date_column,year)` | Year | | `(date_column,year,month)` | Month | | `(date_column,year,month,day)` | Day | | `(date_column,year,week)` | ISO week | * Works with a source table or a `--query` * Rows with a NULL date are transferred in a dedicated stream ``` ./FastTransfer \ --sourceconnectiontype "mssql" --sourceserver "localhost" --sourcedatabase "tpch" --sourcetrusted \ --query "SELECT * FROM dbo.lineitem WHERE l_shipmode = 'AIR'" \ --targetconnectiontype "pgcopy" --targetserver "localhost:5432" --targetdatabase "tpch" \ --targetuser "postgres" --targetpassword "mypassword" \ --targetschema "public" --targettable "lineitem_air" \ --parallelmethod "Timepartition" --distributekeycolumn "(l_shipdate,year,month)" --degree 8 ``` See [Parallel Parameters - Timepartition](/latest/documentation/cli/parallel_parameters.md#timepartition). ### New Environment Variable: FASTTRANSFER\_DATEFORMAT[​](#new-environment-variable-fasttransfer_dateformat "Direct link to New Environment Variable: FASTTRANSFER_DATEFORMAT") Sets the format of the date bounds sent by the `Timepartition` method: `yyyy-MM-dd` (default) or `yyyyMMdd`. ``` # Windows (PowerShell) $env:FASTTRANSFER_DATEFORMAT = "yyyyMMdd" # Linux export FASTTRANSFER_DATEFORMAT=yyyyMMdd ``` See [FASTTRANSFER\_DATEFORMAT](/latest/documentation/environment-variables/dateformat.md). ## Bug Fixes[​](#bug-fixes-1 "Direct link to Bug Fixes") * **`msbulk` target, partitioned table with a rowstore clustered index**: `DataDriven` (and the new `DBPartition` / `Timepartition` methods) no longer fail with *"Cannot bulk load. The bulk data stream was incorrectly specified as sorted"*. The sorted hint is now only sent to heap and columnstore targets, or when [FASTTRANSFER\_SORTEDINPUT](/latest/documentation/environment-variables/sortedinput.md) is `true`. See [SQL Server target and sorted hint](/latest/documentation/cli/parallel_parameters.md#sql-server-target-and-sorted-hint). * **`pgcopy` target, NULL values**: NULL values coming from a non-PostgreSQL source are now loaded as NULL. Before, NULL dates (and other non-text types) failed the load with *"invalid input syntax"*, and NULL text values were loaded as empty strings. ## Wizard[​](#wizard "Direct link to Wizard") The [Command Wizard](/latest/wizard.md) now offers the `DBPartition` and `Timepartition` methods. --- # Release Notes 1.0 FastTransfer 1.0 is the first major release. It brings a new data path, **ADBC with the Arpe.io drivers bundled in the binary**, which moves data as Arrow columns from end to end. This release also adds **Db2** as a source and a target, and makes the parallel methods simpler to choose. 6 Arpe.io ADBC drivers Bundled, nothing to install 2x Faster cross-database Oracle → PostgreSQL, 6M rows 14x Faster into Oracle Oracle → Oracle, 6M rows 3.7x Faster SQL Server split Physical method, clustered table ## Highlights[​](#highlights "Direct link to Highlights") * **ADBC connections:** six new connection types for SQL Server, PostgreSQL, Oracle, Db2, Teradata and Netezza, as source and target. * **Up to 2x faster** than the native connection types on cross-database transfers, and much more on Oracle targets. * **Db2 for LUW** is now supported, as a source and as a target. * **`Physical`, one parallel method for all physical splits:** FastTransfer picks Ctid, Rowid, Physloc or data slices for you. * **Faster SQL Server physical split:** up to 3.7x faster on clustered tables. ## ADBC Connections[​](#adbc-connections "Direct link to ADBC Connections") The `adbc_*` connection types use the Arpe.io ADBC drivers, shipped inside FastTransfer: there is nothing else to install or configure. | Connection Type | Database | | --------------- | ----------------- | | `adbc_mssql` | SQL Server | | `adbc_pgsql` | PostgreSQL | | `adbc_oracle` | Oracle | | `adbc_db2` | Db2 for LUW (new) | | `adbc_teradata` | Teradata | | `adbc_netezza` | Netezza | The rows are read and written as Arrow columnar data, with no conversion between the two drivers. The command line does not change: the same server, database, user, password and trusted authentication parameters, and all the parallel methods. * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "adbc_oracle" ` --sourceserver "oraserver:1521/ORCLPDB1" ` --sourceuser "TPCH" ` --sourcepassword "mypassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --targetconnectiontype "adbc_mssql" ` --targetserver "localhost" ` --targettrusted ` --targetdatabase "tpch" ` --targetschema "dbo" ` --targettable "orders" ` --parallelmethod "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "adbc_oracle" \ --sourceserver "oraserver:1521/ORCLPDB1" \ --sourceuser "TPCH" \ --sourcepassword "mypassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --targetconnectiontype "adbc_mssql" \ --targetserver "localhost" \ --targettrusted \ --targetdatabase "tpch" \ --targetschema "dbo" \ --targettable "orders" \ --parallelmethod "Physical" \ --degree 8 \ --loadmode "Truncate" ``` ### Performance[​](#performance "Direct link to Performance") LINEITEM table (TPC-H SF1, 6 million rows), `RangeId` method, degree 4, median time in seconds: | Source → Target | DB Editor Driver | Arpe.io ADBC Drivers | Gain | | -------------------------- | ---------------- | -------------------- | ---- | | SQL Server → PostgreSQL | 6.7 | 3.7 | 1.8x | | PostgreSQL → SQL Server | 5.1 | 3.3 | 1.5x | | Oracle → SQL Server | 6.8 | 3.6 | 1.9x | | Oracle → PostgreSQL | 6.8 | 3.2 | 2.1x | | SQL Server → SQL Server | 5.9 | 4.4 | 1.3x | | Oracle → Oracle (degree 1) | 47.7 | 3.4 | 14x | ADBC needs both ends on ADBC, and runs on Windows x64 and Linux x64. The drivers need an ADBC driver block in your license file: contact [Arpe.io](https://www.arpe.io) to add it. See [ADBC Connections](/latest/documentation/cli/adbc_connections.md) and the [ADBC examples](/latest/documentation/examples/adbc.md). ## Simpler Parallel Methods[​](#simpler-parallel-methods "Direct link to Simpler Parallel Methods") ### Physical[​](#physical "Direct link to Physical") `--parallelmethod Physical` replaces the four engine-specific physical methods. FastTransfer chooses the technique from the source type: | Source | Technique | | ---------- | ----------- | | PostgreSQL | Ctid | | Oracle | Rowid | | SQL Server | Physloc | | Netezza | Data slices | No key column to choose: give the source schema and table, and a degree. See [Parallel Parameters - Physical](/latest/documentation/cli/parallel_parameters.md#physical). ### Faster Physloc on SQL Server[​](#faster-physloc-on-sql-server "Direct link to Faster Physloc on SQL Server") The physical split on SQL Server now spreads the rows evenly over all the streams, on rowstore and on clustered columnstore tables. On a clustered rowstore table with 8 streams, the transfer went from about 17.7 s to 4.7 s. ### More sources for DBPartition and Random[​](#more-sources-for-dbpartition-and-random "Direct link to More sources for DBPartition and Random") * `DBPartition` reads the data partitions of a Db2 table (`adbc_db2`), and works with the ADBC types of SQL Server, PostgreSQL, Oracle and Teradata. * `Random` uses the right modulo syntax on Db2 and Teradata. ## Reliability and Security[​](#reliability-and-security "Direct link to Reliability and Security") * **`--useworktables`:** the work tables are merged into the target again, and a failed merge now fails the run. * **`Ntile` and `DataDriven` on date keys:** no rows lost between streams, and rows with a NULL key are transferred. `Ntile` works on Oracle sources. * **Passwords in `uri=` connection strings** are hidden in all the logs. * **Signed build provenance (SLSA)** comes with each release download, so you can check that a binary was built from the FastTransfer sources. ## Upgrading from 0.18[​](#upgrading-from-018 "Direct link to Upgrading from 0.18") Deprecated parallel methods `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` still work in 1.0, with a warning. They will be removed in 2.0: use `Physical`. * `Physloc` (and `Physical` on SQL Server) needs `--sourceschema` and `--sourcetable`. A `--query` can still be added to filter the table. * `NZDataSlice` (and `Physical` on Netezza) no longer needs `--sourceschema` and `--sourcetable`. * Oracle sources: a `PARTITION (...)` clause in the `FROM` of `--query` is now refused. Use the `DBPartition` method instead. ## Known Limitations[​](#known-limitations "Direct link to Known Limitations") * ADBC is not available on Linux ARM64. * With ADBC, time zone offsets from SQL Server and Oracle arrive as the same instant in UTC. * Db2 and Teradata as ADBC targets: a few data types are not supported yet (Db2 `DECFLOAT`, Teradata `PERIOD`). ## Wizard[​](#wizard "Direct link to Wizard") The [Command Wizard](/latest/wizard.md) offers the ADBC connection types and the `Physical` method. --- # Release Notes 1.1 **Your backups are now a data source, and your target tables create themselves.** FastTransfer 1.1 reads tables straight out of SQL Server backup files and Oracle RMAN backup sets: no restore, no spare instance, no load on production. And with the new `Create` load mode, you no longer write a `CREATE TABLE` before a transfer: FastTransfer builds the target table from the source, with column types as strict as your data allows. 0 Restore needed Backups are read as they are 2 Backup formats SQL Server .bak and Oracle RMAN 0 DDL to write The target table is created for you 3 Ways to choose the types fast, allvarchar, best ## Highlights[​](#highlights "Direct link to Highlights") * **Backups as a source:** `backup_mssql` and `backup_rman` load tables from backup files into any ADBC target, in parallel. * **`--loadmode Create`:** FastTransfer creates the target table from a table, a query or files, then loads it. * **`--inferdatatype best`:** Oracle `NUMBER` and `DATE` columns, and CSV, Parquet and JSON files, get the strictest type that holds your data, with a safety net that never lets a value be rounded or truncated. * **A wizard in three families:** Native, Arpe.io ADBC and Backup Files, plus the `Create` load mode. * **More reliable parallel reads:** `Ntile` on Oracle and MySQL sources, and queries with `QUALIFY` or named windows. ## Load Straight From Your Backups[​](#load-straight-from-your-backups "Direct link to Load Straight From Your Backups") Feeding a data warehouse, a test environment or an audit from production usually means one of two things: querying production, or restoring a backup on a spare instance first. Both cost time, licences and people. FastTransfer 1.1 removes the step. Point it at the directory of your backup files and name the table: the bundled driver reads the backup format directly and streams the rows to your target. | Connection Type | Reads | | --------------- | ------------------------------------------------------------------------------------------------------ | | `backup_mssql` | SQL Server full and differential backups (`.bak`): compressed, striped, encrypted or TDE ones included | | `backup_rman` | Oracle RMAN backup sets: full, level 0 and incremental level 1 to 4 | * Windows * Linux ``` .\FastTransfer.exe ` --sourceconnectiontype "backup_mssql" ` --sourceserver "D:\MSSQLBACKUP" ` --sourcedatabase "tpch_full.bak;tpch_diff_*.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --targetconnectiontype "adbc_pgsql" ` --targetserver "localhost:5432" ` --targetdatabase "tpch" ` --targetuser "postgres" ` --targetpassword "mypassword" ` --targetschema "public" ` --targettable "orders" ` --method "Physical" ` --degree 8 ` --loadmode "Truncate" ``` ``` ./FastTransfer \ --sourceconnectiontype "backup_mssql" \ --sourceserver "/backup/mssql" \ --sourcedatabase "tpch_full.bak;tpch_diff_*.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --targetconnectiontype "adbc_pgsql" \ --targetserver "localhost:5432" \ --targetdatabase "tpch" \ --targetuser "postgres" \ --targetpassword "mypassword" \ --targetschema "public" \ --targettable "orders" \ --method "Physical" \ --degree 8 \ --loadmode "Truncate" ``` **Why it matters:** * **No load on production.** The data comes from files your backup job already wrote. * **No instance to provision.** No SQL Server or Oracle licence, no disk for a restore, no wait. * **The latest data, not last week's.** FastTransfer applies the differential or incremental backups on top of the full one and reads the newest version the files hold. * **Parallel by design.** With `--method Physical`, each stream reads its own slice of the table: pages, columnstore rowgroups or Oracle block ranges. * **Safe by default.** The backup is opened and the table looked up before anything touches the target. A backup that cannot be used stops the run with the target untouched, `Truncate` included. Backup sources load into the ADBC targets (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_db2`, `adbc_teradata`, `adbc_netezza`), on Windows x64 and Linux x64. See [Backup Sources](/latest/documentation/cli/backup_sources.md). ## Create the Target Table, Skip the DDL[​](#create "Direct link to Create the Target Table, Skip the DDL") Until now, a transfer started with a chore: write the `CREATE TABLE` on the target, column by column, type by type. With `--loadmode Create`, FastTransfer does it from the source, whether the source is a table, a query or a set of files. ``` ./FastTransfer \ --sourceconnectiontype "oraodp" \ --sourceserver "orahost:1521/ORCLPDB1" \ --sourceuser "SALES" \ --sourcepassword "mypassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --targetconnectiontype "pgcopy" \ --targetserver "localhost:5432" \ --targetdatabase "dwh" \ --targetuser "postgres" \ --targetpassword "mypassword" \ --targetschema "stg" \ --targettable "orders" \ --loadmode "Create" \ --inferdatatype "best" ``` One command line now works on the first run and on every run after it: the table is created when it does not exist, and truncated and reloaded when it does. ### The right types, not just types that work[​](#the-right-types-not-just-types-that-work "Direct link to The right types, not just types that work") Creating a table is easy when you make every column a wide string. Creating one you can join, index and aggregate on is harder, and Oracle makes it harder still: a `NUMBER` says nothing about its size, and a `DATE` always carries a time. `--inferdatatype` gives you three answers: | Mode | What you get | When to use it | | ---------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `fast` (default) | Types from the source metadata. No row is read | Sources with precise metadata: SQL Server, PostgreSQL, MySQL, Db2, Teradata | | `best` | The strictest type that holds every value, found by one scan of the source | Oracle sources, and CSV, Parquet and JSON files | | `allvarchar` | Every column as text, in one stable format | Raw landing zones, where typing happens later | With `best`, an Oracle `NUMBER` holding order numbers becomes an `INT`, a price becomes a `DECIMAL(12,2)`, and a `DATE` with no time part becomes a real `DATE`, instead of three floats and timestamps. ### A safety net on every inferred type[​](#a-safety-net-on-every-inferred-type "Direct link to A safety net on every inferred type") Inferring types from data raises a fair question: what if a row arrives later that does not fit? FastTransfer reads every narrowed column through a guard. A value that does not fit the inferred type **fails the load** instead of being rounded or truncated, and the table created by that run is dropped so the next run infers the types again. You can sample large tables with `FASTTRANSFER_INFER_SAMPLE_PERCENT` and keep the same guarantee. See [Creating the Target Table](/latest/documentation/cli/create_target_table.md). ## Parallel Reads You Can Trust[​](#parallel-reads-you-can-trust "Direct link to Parallel Reads You Can Trust") * **`Ntile` on Oracle and MySQL sources** now works with a query as well as with a table, and splits the rows into even ranges. * **Queries keep every clause.** A source query with `QUALIFY`, a named `WINDOW` or `CONNECT BY` is sent as you wrote it when a parallel method adds its filter. * **`Physical` with a query** works with `allvarchar` and `best`: the filter of each stream is added to your query. ## Also in 1.1[​](#also-in-11 "Direct link to Also in 1.1") * **`FASTTRANSFER_ADBC_SSLMODE`** sets the TLS mode of `adbc_pgsql` and `adbc_netezza` connections, for servers without TLS or with a required certificate check. * **SQL Server `host:port`** is accepted in `--sourceserver` and `--targetserver`. * **`pgcopy` target:** fractional seconds and binary values are now written exactly. * **`adbc_db2` target:** parallel loads commit every 50,000 rows on each stream. * **Command line:** an empty or stray argument gives a clear parsing error. * **Bundled ADBC drivers** updated to their latest releases. With the new SQL Server backup driver, each compressed backup file is read by several threads when a backup is indexed. ## Upgrading from 1.0[​](#upgrading-from-10 "Direct link to Upgrading from 1.0") `--loadmode Replace` `Replace` used to behave like `Append`. In 1.1 it is an alias of `Create`: the target table is created when it does not exist, and **truncated** when it does. Check the scripts that pass `--loadmode Replace`. * A source query with `QUALIFY`, a named `WINDOW` or `CONNECT BY`, read with a parallel method, now keeps that clause. Such a query returned other rows in 1.0. * SQL Server: `tcp:host` and `host\INSTANCE:port` are refused in the server parameter, with a message that gives the accepted forms. ## Known Limitations[​](#known-limitations "Direct link to Known Limitations") * Backup sources load into ADBC targets only, and are not available on Linux ARM64. * `--loadmode Create` is not tested yet on ClickHouse, Netezza, SAP HANA, Teradata as a target, or with a backup source. * `--loadmode Create`: a text column with no declared length gets 256 characters, and a longer value fails the load. Raise `FASTTRANSFER_INFER_DEFAULT_STRING_MAXSIZE` when needed. * SQL Server targets refuse NaN and infinity in `REAL` and `FLOAT` columns. ## Wizard[​](#wizard "Direct link to Wizard") The [Command Wizard](/latest/wizard.md) groups the source connection types in three families, **Native**, **Arpe.io ADBC** and **Backup Files**, and offers the `Create` load mode with its `--inferdatatype` option. --- # Sitemap ## [Installation](/latest/installation.md)[​](#installation "Direct link to installation") ## [Wizard GUI](/latest/wizard.md)[​](#wizard-gui "Direct link to wizard-gui") ## Documentation[​](#documentation "Direct link to Documentation") * [Getting Started](/latest/.md) * CLI * [Authentication](/latest/documentation/cli/authentication.md) * [Source Connection Parameters](/latest/documentation/cli/source_connection_parameters.md) * [Target Connection Parameters](/latest/documentation/cli/target_connection_parameters.md) * [ADBC Connections](/latest/documentation/cli/adbc_connections.md) * [Transfer Parameters](/latest/documentation/cli/transfer_parameters.md) * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/latest/documentation/cli/advanced_parameters.md) * [License](/latest/documentation/cli/license.md) * Environment Variables * [Overview](/latest/documentation/environment-variables/overview.md) * [FASTTRANSFER\_LOADSTEPTIMEOUT\_MINUTES](/latest/documentation/environment-variables/loadsteptimeout.md) * [FASTTRANSFER\_SORTEDINPUT](/latest/documentation/environment-variables/sortedinput.md) * [FASTTRANSFER\_DATEFORMAT](/latest/documentation/environment-variables/dateformat.md) * Logging * [Overview](/latest/documentation/logging/Overview.md) * [Logs Level](/latest/documentation/logging/logs-level.md) * [Log Database](/latest/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/latest/documentation/logging/log-files-names-mapping-using-variables.md) * [Examples](/latest/documentation/logging/examples.md) * Examples * [SQL Server Examples](/latest/documentation/examples/sql-server.md) * [PostgreSQL Examples](/latest/documentation/examples/postgresql.md) * [MySQL Examples](/latest/documentation/examples/mysql.md) * [Oracle Examples](/latest/documentation/examples/oracle.md) * [Other Databases](/latest/documentation/examples/other-databases.md) * [ADBC Examples](/latest/documentation/examples/adbc.md) * [CSV Import](/latest/documentation/examples/csv-import.md) * [JSON Import](/latest/documentation/examples/json-import.md) * [Parquet Import](/latest/documentation/examples/parquet-import.md) * [Advanced Scenarios](/latest/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/latest/documentation/compatibility/sources_platforms.md) * [Operating Systems](/latest/documentation/compatibility/operating_systems.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/latest/integration/docker-integration.md) * [Kestra](/latest/integration/kestra-integration.md) * [PostgreSQL](/latest/integration/postgresql-integration.md) * [SQL Server](/latest/integration/sqlserver-integration.md) * [Airflow](/latest/integration/airflow-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 1.0](/latest/release-notes/release-notes-1.0.md) * [Release Notes 0.18](/latest/release-notes/release-notes-0.18.md) * [Release Notes 0.17](/latest/release-notes/release-notes-0.17.md) * [Release Notes 0.16](/latest/release-notes/release-notes-0.16.md) ## AI Integrations[​](#ai-integrations "Direct link to AI Integrations") * [FastTransfer Agent Skill](/latest/ai/agent-skills.md) * [FastTransfer MCP Server](/latest/ai/mcp-server.md) --- # FastTransfer Command Wizard Transfer (DB to DB) Import Files (Files to DB) Tip: press `→` in an empty field to use its example value.Expand All\[ ] ### Operating SystemWindows Windows ![Linux](/img/tux.svg)Linux ### Source Connection Parameterspgsql Connection Type ? : Native ![](/img/logos/clickhouse.svg)clickhouse ![](/img/logos/duckdb.svg)duckdb ![](/img/logos/duckdb.svg)duckdbstream ![](/img/logos/sap.svg)hana ![](/img/logos/sqlserver.svg)msoledbsql ![](/img/logos/sqlserver.svg)mssql ![](/img/logos/mysql.svg)mysql ![](/img/logos/netezza.svg)nzcopy ![](/img/logos/netezza.svg)nzoledb ![](/img/logos/netezza.svg)nzsql odbc oledb ![](/img/logos/oracle.svg)oraodp ![](/img/logos/postgresql.svg)pgcopy ![](/img/logos/postgresql.svg)pgsql ![](/img/logos/teradata.svg)teradata Arpe.io ADBC ![](/img/logos/db2.svg)adbc\_db2 ![](/img/logos/sqlserver.svg)adbc\_mssql ![](/img/logos/netezza.svg)adbc\_netezza ![](/img/logos/oracle.svg)adbc\_oracle ![](/img/logos/postgresql.svg)adbc\_pgsql ![](/img/logos/teradata.svg)adbc\_teradata Backup Files (no database needed) ![](/img/logos/sqlserver.svg)backup\_mssql ![](/img/logos/oracle.svg)backup\_rman | Server ? : | localhost | | ------------------ | ---------------------------------- | | Connect String ? : | Server=localhost;Database=mydb;... | | DSN ? : | | | Provider ? : | | | Database ? : | mydatabase | | Trusted ? : | \[ ] | | User ? : | username | | Password ? : | •••••••• | ### Target Connection Parametersmsbulk ### Transfer Parameters ### Parallel ParametersNone ### Advanced Parameters ### License ### Generated Command multi-line\[x] sharecopy ``` .\FastTransfer.exe ` --sourceconnectiontype pgsql ` --targetconnectiontype msbulk ` --loadmode Truncate ` --mapmethod Name ` --license "C:\MyFreeTrialLicense.lic" ``` ---